Inline script code parsing errors Mac OS X
Hi Sebastiaan,
I gave the Mac OS X version another spin and found out that the code window of the inline script does indeed still do peculiar things to the code you enter to it. For instance, if I write a simple for loop containing:
for n in range(0,20): print n
(In OpenSesame I of course use tabs for indentation, but this does not seem to be possible here)
OpenSesame immediately crashes with the following error message:
Error: Script error Description: Failed to instantiate module 'inline_script' as 'inline_script': Error: Script error Description: Error parsing ' set _run "for n in range(0,20):' in item 'inline_script': No closing quotation
Trying to find out what this means, I tried the following:
print "Starting" for n in range(0,20): print n
Now the error message looks like this:
Traceback (most recent call last): File "libopensesame/inline_script.pyc", line 97, in prepare File "", line 2 or n in range(0,20): ^ SyntaxError: invalid syntax
Sooo, the mac version is indeed still not working as it should...
It seems that (in both cases) OpenSesame doesn't register the character after (or before?) an newline character.
I hope I will have time soon to dive into this a little bit deeper, but as it looks right now, that will be end of October for me. Have you had any other reports of this problem lately?
Comments
Hi Daniel,
Yes, someone recently reported this issue as well: http://forum.cogsci.nl/index.php?p=/discussion/comment/814#Comment_814
It must have something to do with the end-of-line encoding on Mac OS, but beyond that I'm not sure what it can be. I don't have a Mac here to test it on, so it would be great if you would look into it once you have time!
My guess would be that the problem isn't specific to inline_script items, but affects all multi-line variables. For example, if you play around with the notepad plug-in, do you get the similar problems (i.e. garbled text around newlines?)
For now I filed in issue in the bug tracker: https://github.com/smathot/OpenSesame/issues/102
Cheers,
Sebastiaan
Check out SigmundAI.eu for our OpenSesame AI assistant!
Fixed from OpenSesame 0.27.1 onwards