I am new to Psychopy, and I am trying to tinker around to create a stimulus with the psychopy module in Python.
I am in Linux (Ubuntu) and use a virtual environment in PyCharm with a Python 3.8 interpreter.
When I run the code normally, everything works fine however if I put a break point anywhere and run the debugger it throws me this error:
Traceback (most recent call last):
File "<string>", line 25, in <module>
NameError: name 'raw_input' is not defined
python-BaseException
This is the only import statement I have:
from psychopy import visual, core, event
I am not sure how to interpret that, as it seems to me the “” and are placeholders for a real file name?
Has anyone else experience that? Any idea which module/file it might be?
Hello,
Thanks for your reply!
Unfortunately no, it is just text with no links in it.
Edit: I did some more testing and when I use the statement import psychopy
and then use psychopy.visual.Window(...) in the code
I get the error Traceback (most recent call last): File "/snap/pycharm-community/267/plugins/python-ce/helpers/pydev/pydevd.py", line 1483, in _exec pydev_imports.execfile(file, globals, locals) # execute the script File "/snap/pycharm-community/267/plugins/python-ce/helpers/pydev/_pydev_imps/_pydev_execfile.py", line 18, in execfile exec(compile(contents+"\n", file, 'exec'), glob, loc) File "/Path/to/my/script.py", line 32, in <module> frame = MainWindow(None, "Controller") File "/Path/to/my/script.py", line 15, in __init__ win = psychopy.visual.Window([800, 600], monitor="DLP", units="deg") AttributeError: module 'psychopy' has no attribute 'visual'
But I can use the debugger fine in that case. I checked the psychopy folder and there is a visual folder, and it still works if I use from psychopy import visual and don’t use the debugger…