isolver / ioHub

A Python program, running as an independent process, that provides a 'proxy like' service for experiment runtimes ( psychopy ) and devices ( keyboard, mouse, parallel port, eye tracker, ... ).
19 stars 14 forks source link

iohub on linux with python 64 bit: yaml ParseError? #81

Closed isolver closed 8 years ago

isolver commented 10 years ago

Reported by Jonas Lindeløv , using Mint Linux with 64 bit python.

psychopy.ohub fails on my linux box. Any ideas what might be the cause or the fix? The following script:

from psychopy import iohub io = iohub.launchHubServer()

... produces a long error, pasted in the bottom of this post - something about a parser in yaml. The error is the same when I run the iohub demo scripts. PsychoPy stimuli work flawlessly. I'm running psychopy 1.79.01 on linux mint 16 (based on ubuntu 13.10), 64 bit. Current package versions seem to meet the dependencies mentioned on the iohub webpage. As a note (and maybe help for other linux mint users), I needed to install some modules for iohub to run without import errors. I did this: sudo apt-get install python-wxgtk2.8 python-yaml python-psutil msgpack-pythondo python-tables To get gevent 1.0, add this PPA: https://launchpad.net/~x2go/+archive/ppa and run "sudo apt-get update" and then "sudo apt-get install python-gevent". Best, Jonas

Error in console:

Error during device creation .... <class 'yaml.parser.ParserError'> ParserError() [' File "/usr/lib/pymodules/python2.7/psychopy/iohub/server.py", line 548, in createNewMonitoredDevice\n device_instance_and_config=self.addDeviceToMonitor(device_class_name,deviceConfig)\n', ' File "/usr/lib/pymodules/python2.7/psychopy/iohub/server.py", line 744, in addDeviceToMonitor\n self.processDeviceConfigDictionary(device_module_path, device_class_name, device_config,default_device_config)\n', ' File "/usr/lib/pymodules/python2.7/psychopy/iohub/server.py", line 530, in processDeviceConfigDictionary\n device_config_errors=validateDeviceConfiguration(device_module_path,device_class_name,device_config_dict)\n', ' File "/usr/lib/pymodules/python2.7/psychopy/iohub/devices/deviceConfigValidation.py", line 421, in validateDeviceConfiguration\n device_settings_validation_dict=loadYamlFile(validation_file_path,print_file=True)\n', ' File "/usr/lib/pymodules/python2.7/psychopy/iohub/devices/deviceConfigValidation.py", line 351, in loadYamlFile\n yaml_file_contents=load(file(yaml_file_path,\'r\'), Loader=Loader)\n', ' File "/usr/lib/python2.7/dist-packages/yaml/init.py", line 71, in load\n return loader.get_single_data()\n', ' File "/usr/lib/python2.7/dist-packages/yaml/constructor.py", line 37, in get_single_data\n node = self.get_single_node()\n', ' File "_yaml.pyx", line 708, in _yaml.CParser.get_single_node (ext/_yaml.c:7987)\n', ' File "_yaml.pyx", line 905, in _yaml.CParser._parse_next_event (ext/_yaml.c:10654)\n'] Error during device creation .... <class 'psychopy.iohub.util.exception_tools.ioHubError'> ioHubError: Args: ('Error during device creation ....',)

[' File "/usr/lib/pymodules/python2.7/psychopy/iohub/server.py", line 486, in init\n self.createNewMonitoredDevice(device_class_name,deviceConfig)\n', ' File "/usr/lib/pymodules/python2.7/psychopy/iohub/server.py", line 560, in createNewMonitoredDevice\n raise ioHubError("Error during device creation ....")\n'] <class 'psychopy.iohub.util.exception_tools.ioHubError'> ioHubError: Args: ('Error during device creation ....',)

[' File "/usr/lib/pymodules/python2.7/psychopy/iohub/launchHubProcess.py", line 31, in run\n s = ioServer(rootScriptPathDir, ioHubConfig)\n', ' File "/usr/lib/pymodules/python2.7/psychopy/iohub/server.py", line 490, in init\n raise ioHubError("Error during device creation ....")\n'] ioHub could not be contacted, exiting....