Error occurred during ioServer.start(): 'module' object has no attribute 'run'
<type 'exceptions.AttributeError'>
AttributeError("'module' object has no attribute 'run'",)
[' File "/usr/lib/pymodules/python2.7/psychopy/iohub/launchHubProcess.py", line 55, in run\n gevent.run()\n']
------------------------------
Error in atexit._run_exitfuncs:
Traceback (most recent call last):
File "/usr/lib/python2.7/atexit.py", line 24, in _run_exitfuncs
func(*targs, **kargs)
File "/usr/lib/pymodules/python2.7/psychopy/iohub/datastore/__init__.py", line 466, in close_open_data_files
for fileh in open_files.keys():
AttributeError: '_FileRegistry' object has no attribute 'keys'
Error in sys.exitfunc:
Traceback (most recent call last):
File "/usr/lib/python2.7/atexit.py", line 24, in _run_exitfuncs
func(*targs, **kargs)
File "/usr/lib/pymodules/python2.7/psychopy/iohub/datastore/__init__.py", line 466, in close_open_data_files
for fileh in open_files.keys():
AttributeError: '_FileRegistry' object has no attribute 'keys'
My own scripts as well as the examples I could find online [(..., or workshop resources from the psychopy webpage) .... ] all result in the [...] error
I briefly tested the iohub functionality on the latest psychopy version though and got the same error.
I know I'm not using the latest version of Psychopy - that's because I had trouble to use an existing experiment with the latest version.
My own scripts as well as the examples I could find online [(..., or workshop resources from the psychopy webpage) .... ] all result in the [...] errorWhat version of the gevent package are you running?If you are going to use 1.78.01 then you also need to use an older version of the gevent 1.0 package, '1.0b3' I /think/. Versions of gevent after that have an api change, removing the gevent.run() function that was being used by iohub in 1.78.01.
/usr/lib/python2.7/dist-packages/pkg_resources.py:1031: UserWarning: /home/sabrina/.python-eggs is writable by group/others and vulnerable to attack when used with get_resource_filename. Consider a more secure location (set with .set_extraction_path or the PYTHON_EGG_CACHE environment variable).
warnings.warn(msg, UserWarning)
/usr/lib/python2.7/dist-packages/pkg_resources.py:1031: UserWarning: /home/sabrina/.python-eggs is writable by group/others and vulnerable to attack when used with get_resource_filename. Consider a more secure location (set with .set_extraction_path or the PYTHON_EGG_CACHE environment variable).
warnings.warn(msg, UserWarning)
Xfixes DLL could not be loaded. Cursor visiblity support is unavailable.
Exception in thread Thread-1:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 810, in __bootstrap_inner
self.run()
File "/usr/lib/pymodules/python2.7/psychopy/iohub/devices/pyXHook.py", line 140, in run
self.record_dpy.record_enable_context(self.ctx, self.processevents)
File "/usr/lib/python2.7/dist-packages/Xlib/ext/record.py", line 238, in enable_context
context = context)
File "/usr/lib/python2.7/dist-packages/Xlib/ext/record.py", line 215, in __init__
rq.ReplyRequest.__init__(self, *args, **keys)
File "/usr/lib/python2.7/dist-packages/Xlib/protocol/rq.py", line 1478, in __init__
self.reply()
File "/usr/lib/python2.7/dist-packages/Xlib/protocol/rq.py", line 1490, in reply
self._display.send_and_recv(request = self._serial)
File "/usr/lib/python2.7/dist-packages/Xlib/protocol/display.py", line 556, in send_and_recv
gotreq = self.parse_response(request)
File "/usr/lib/python2.7/dist-packages/Xlib/protocol/display.py", line 643, in parse_response
gotreq = self.parse_request_response(request) or gotreq
File "/usr/lib/python2.7/dist-packages/Xlib/protocol/display.py", line 729, in parse_request_response
req._parse_response(self.data_recv[:self.request_length])
File "/usr/lib/python2.7/dist-packages/Xlib/ext/record.py", line 219, in _parse_response
self._callback(r)
File "/usr/lib/pymodules/python2.7/psychopy/iohub/devices/pyXHook.py", line 196, in processevents
hookevent = self.keypressevent(event)
File "/usr/lib/pymodules/python2.7/psychopy/iohub/devices/pyXHook.py", line 241, in keypressevent
return self.makekeyhookevent(keysym, event)
File "/usr/lib/pymodules/python2.7/psychopy/iohub/devices/pyXHook.py", line 390, in makekeyhookevent
int(storewm["handle"], base=16)
ValueError: invalid literal for int() with base 16: ".Window'>("
I briefly tested the iohub functionality on the latest psychopy version though and got the same error.Are you sure you got the /actual same/ error vs. some other error? If you can use the latest psychopy, please retest with a recent demo. If you are still getting an error send the details along please.
I know I'm not using the latest version of Psychopy - that's because I had trouble to use an existing experiment with the latest version.Maybe we can help determine why the old experiment does not work if more info on the issue / error is provided.
Error in atexit._run_exitfuncs:
Traceback (most recent call last):
File "/usr/lib/python2.7/atexit.py", line 24, in _run_exitfuncs
func(*targs, **kargs)
File "/usr/lib/pymodules/python2.7/psychopy/iohub/datastore/__init__.py", line 466, in close_open_data_files
for fileh in open_files.keys():
AttributeError: '_FileRegistry' object has no attribute 'keys'
Error in sys.exitfunc:
Traceback (most recent call last):
File "/usr/lib/python2.7/atexit.py", line 24, in _run_exitfuncs
func(*targs, **kargs)
File "/usr/lib/pymodules/python2.7/psychopy/iohub/datastore/__init__.py", line 466, in close_open_data_files
for fileh in open_files.keys():
AttributeError: '_FileRegistry' object has no attribute 'keys'
(By the way, to make the eye tracker sample code run, the file 'iohub_config.yaml' needs to be renamed to 'ioHub_config.yaml' - note the capital H)
File "/usr/lib/pymodules/python2.7/psychopy/iohub/devices/pyXHook.py", line 390, in makekeyhookevent
int(storewm["handle"], base=16)
ValueError: invalid literal for int() with base 16: ".Window'>("
File "/usr/lib/pymodules/python2.7/psychopy/iohub/datastore/__init__.py", line 466, in close_open_data_files
for fileh in open_files.keys():
AttributeError: '_FileRegistry' object has no attribute 'keys'
Traceback (most recent call last):
- iohub/eyetracking/gcCursor:
File "run.py", line 315, in <module>
runtime=ExperimentRuntime(module_directory(ExperimentRuntime.run), "experiment_config.yaml")
Error saving event: [1, 1, 0, 288, 23, 243.865, 11.52069902420044, 11.52069902420044, 0.0, 0.0, 0, None, 65, 32L, 0, ' ', 8192, 67108872, ' ', 0.13553094863891602, 271]
- the same error ("long() argument must be a string or a number") also occurs when running the iohub/eyetracking/validation demo.
Traceback (most recent call last):
- iohub/eyetracking/gcCursor:
File "run.py", line 315, in <module>
runtime=ExperimentRuntime(module_directory(ExperimentRuntime.run), "experiment_config.yaml")Did you modify the experiment_config.yaml file in the script directory you are running? This error indicates the file is no longer in valid YAML format. If you did edit it, you can send it and I can point out what the issue is.If you did not, let me know.
Error saving event: [1, 1, 0, 288, 23, 243.865, 11.52069902420044, 11.52069902420044, 0.0, 0.0, 0, None, 65, 32L, 0, ' ', 8192, 67108872, ' ', 0.13553094863891602, 271]
- the same error ("long() argument must be a string or a number") also occurs when running the iohub/eyetracking/validation demo.
This seems to be coming from keyboard release events. The field that is None is the 'auto_repeated' event field, which should be 0 for any keyboard release, so this is a bug.Can you remind me what OS you are using and i will look at fixing whatever the issue is.If you are using Linux, I think I see the issue and will submit a bug fix for it today. Thanks!
I submitted a BF to psychopy/psychopy master stream that should fix the keyboard release issue you were seeing. Please let me know if it does not.
Re the yaml file, can you attach the file? The indentation matters for YAML similar to how it does for Python.
I submitted a BF to psychopy/psychopy master stream that should fix the keyboard release issue you were seeing. Please let me know if it does not.
I'll test it and let you know soon.
By the way, the YAML parser error message is gone as well (have no idea why though).
I think I found the yaml error, it's just a typo in the demo:
in line 156 of the iohub_config.yaml, there should be a ':' instead of the '.' at the end of the line.
This seems to fix the issue.
I think I found the yaml error, it's just a typo in the demo:
in line 156 of the iohub_config.yaml, there should be a ':' instead of the '.' at the end of the line.
This seems to fix the issue.Is this for the latest version of the gccursor demo, in demos.coder.iohub.eyetracking ? Line 156 of the iohub_config file I have (which seems to be what is on psychopy/psychopy) is a commented out line, and the demo runs without any parsing errors. Could you let me know where you are downloading the source files from?