[solved] probably bug when displaying numbers
Hi
I am trying to display number figures on a sketchpad with the flowing code:
draw textline 224 0 " [ans2] " center=1 color=black font_family="mono" font_size=24 font_italic=no font_bold=no show_if="always" html="yes"
but when running I gen an error message
line: 604
exception message: 'int' object has no attribute 'decode'
exception type: AttributeError
Traceback:
File "dist\libqtopensesame\misc\process.py", line 130, in run
File "dist\libopensesame\experiment.py", line 291, in run
File "dist\libopensesame\sequence.py", line 56, in run
File "dist\libopensesame\loop.py", line 144, in run
File "dist\libopensesame\sequence.py", line 108, in prepare
File "dist\libopensesame\sketchpad.py", line 205, in prepare
File "dist\openexp\_canvas\legacy.py", line 792, in text
File "dist\libopensesame\html.py", line 141, in render
File "dist\bidi\algorithm.py", line 604, in get_display
AttributeError: 'int' object has no attribute 'decode'
only solution I found so far is to wrap the variable name with '
like this: '[ans2]'
is it something familiar?
Comments
Hi,
Yes, @drorgarbi reported the same problem a while back. It's due to bi-directional language support and will be fixed in 2.8.2.
Workarounds for now would be to:
canvasobject in aninline_script, where you can use thebidikeyword argument.Cheers!
Sebastiaan
Check out SigmundAI.eu for our OpenSesame AI assistant!