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

BUG?/ENH: weird behavior on Windows machine / improve Windows support #78

Closed dengemann closed 10 years ago

dengemann commented 10 years ago

Hi @isolver we're currently trying to get started with ioHub using Tobii Trackers on Windows lab computers.

For Windows XP the Pychopy example would fail, since pytables does not import. This can be tracked down to a silenced WindowsError related to kernel features not present in older Windows OS numbers...

See here: winerror

Would it be possible not to use hdf5 here and just write a plain vanilla ascii file? My feeling is that the entire functionality should not depend on availability of hdf5...

Second, on a more recent machine with Windows 7 hdf5 and the other dependencies seem fine. However, after fixing an initial permissions problem, ioHub exits silently, only telling that 'ioHub could not be contacted, exiting ...'

I've got no clue where to start digging. Any pointers would be appreciated how to debug this ...

dengemann commented 10 years ago

... the latter issue (exiting) seems to be related to server connection problems (found the related line of code in client.py), which is weird since there was no obvious issue (checked trivial things like cables plugged). Btw. I think a RuntimeError should be thrown in such a situation.

isolver commented 10 years ago

Hi Denis,

Thanks for the message.

The only ioHub side data saving format if using hdf5. I may switch the whole ioDataStore to use pandas at some point, and if that is done you will be able to save using all the supported output formats supported by pandas. I first have to do performance tests to see how much overhead using pandas during experiment runtime there is.

For now, if you would like to save an ascii type file, you could do so by disabling the ioDataStore and only sending events to the psychopy process. Then as you read the events, ave what you need / want to a file from psychopy.

I have attached a modified example that does this (in the most simple of ways, not likely the exact output format you want), and is also setup to use the Tobii system by default (as per the iohub_config.yaml file). Unpack the attached 7z file to the desktop of your windows PC (or other dir where you have write permissions), open the run.py python file in a python ide or run it from command line. An example of the current output is also provided.

Regarding the other issue, it is likely caused by one of two things:

1) An instance of the iohub process is still running on your PC from an earlier session that crashed and the iohub process was not properly terminated. This is not likely to occur, but does occasionally. To check this, open the Windows Task Manager and in the process tab look for any python.exe processes. If there is one (or more) and you are not running any python based software, kill the python processes. If this turns out to be the issue, please let me know how you are starting the python script.

2) You are running the example script from a directory that you do not have write permission for. Unfortunately on Windows, PsychoPy demos are put in a sub folder of the Program Files(x86) folder, which runtime user applications can not write to. To fix this, copy the example to a folder that you can write to, like your desktop or a folder right off the c:\ root directory that you create. Then start the copied script file in this new location.

If neither of these end up being the issue, please let me know: 1) Does the iohub_basic/iohub_keyboard.py example run (if copied to your desktop first) 2) What eye tracking example you are testing, 3) How are you starting the experiment script. 4) WHat exception output is being given when the script crashes.

Thanks again, let me know how it goes,

Sol

Let me know if you have any more Q's.

Thanks,

Sol

On Fri, Oct 4, 2013 at 11:46 AM, Denis A. Engemann <notifications@github.com

wrote:

Hi @isolver https://github.com/isolver we're currently trying to get started with ioHub using Tobii Trackers on Windows lab computers.

For Windows XP the Pychopy example would fail, since pytables does not import. This can be tracked down to a silenced WindowsError related to kernel features not present in older Windows OS numbers...

See here: [image: winerror]https://f.cloud.github.com/assets/1908618/1270533/4d44fb64-2d0b-11e3-9692-693970b43b1f.PNG

Would it be possible not to use hdf5 here and just write a plain vanilla ascii file? My feeling is that the entire functionality should not depend on availability of hdf5...

Second, on a more recent machine with Windows 7 hdf5 and the other dependencies seem fine. However, after fixing an initial permissions problem, ioHub exits silently, only telling that 'ioHub could not be contacted, exiting ...'

I've got no clue where to start digging. Any pointers would be appreciated how to debug this ...

— Reply to this email directly or view it on GitHubhttps://github.com/isolver/ioHub/issues/78 .

isolver commented 10 years ago

Sorry, forgot to mention that you should be sure to get the latest iohub directory from here:

https://github.com/isolver/psychopy/tree/master/psychopy

and replace the current psychopy.iohub folder in your site-packages folder with the one from github.

Thanks again,

Sol

On Fri, Oct 4, 2013 at 12:54 PM, Sol Simpson sol@isolver-software.comwrote:

Hi Denis,

Thanks for the message.

The only ioHub side data saving format if using hdf5. I may switch the whole ioDataStore to use pandas at some point, and if that is done you will be able to save using all the supported output formats supported by pandas. I first have to do performance tests to see how much overhead using pandas during experiment runtime there is.

For now, if you would like to save an ascii type file, you could do so by disabling the ioDataStore and only sending events to the psychopy process. Then as you read the events, ave what you need / want to a file from psychopy.

I have attached a modified example that does this (in the most simple of ways, not likely the exact output format you want), and is also setup to use the Tobii system by default (as per the iohub_config.yaml file). Unpack the attached 7z file to the desktop of your windows PC (or other dir where you have write permissions), open the run.py python file in a python ide or run it from command line. An example of the current output is also provided.

Regarding the other issue, it is likely caused by one of two things:

1) An instance of the iohub process is still running on your PC from an earlier session that crashed and the iohub process was not properly terminated. This is not likely to occur, but does occasionally. To check this, open the Windows Task Manager and in the process tab look for any python.exe processes. If there is one (or more) and you are not running any python based software, kill the python processes. If this turns out to be the issue, please let me know how you are starting the python script.

2) You are running the example script from a directory that you do not have write permission for. Unfortunately on Windows, PsychoPy demos are put in a sub folder of the Program Files(x86) folder, which runtime user applications can not write to. To fix this, copy the example to a folder that you can write to, like your desktop or a folder right off the c:\ root directory that you create. Then start the copied script file in this new location.

If neither of these end up being the issue, please let me know: 1) Does the iohub_basic/iohub_keyboard.py example run (if copied to your desktop first) 2) What eye tracking example you are testing, 3) How are you starting the experiment script. 4) WHat exception output is being given when the script crashes.

Thanks again, let me know how it goes,

Sol

Let me know if you have any more Q's.

Thanks,

Sol

On Fri, Oct 4, 2013 at 11:46 AM, Denis A. Engemann < notifications@github.com> wrote:

Hi @isolver https://github.com/isolver we're currently trying to get started with ioHub using Tobii Trackers on Windows lab computers.

For Windows XP the Pychopy example would fail, since pytables does not import. This can be tracked down to a silenced WindowsError related to kernel features not present in older Windows OS numbers...

See here: [image: winerror]https://f.cloud.github.com/assets/1908618/1270533/4d44fb64-2d0b-11e3-9692-693970b43b1f.PNG

Would it be possible not to use hdf5 here and just write a plain vanilla ascii file? My feeling is that the entire functionality should not depend on availability of hdf5...

Second, on a more recent machine with Windows 7 hdf5 and the other dependencies seem fine. However, after fixing an initial permissions problem, ioHub exits silently, only telling that 'ioHub could not be contacted, exiting ...'

I've got no clue where to start digging. Any pointers would be appreciated how to debug this ...

— Reply to this email directly or view it on GitHubhttps://github.com/isolver/ioHub/issues/78 .

dengemann commented 10 years ago

Hi Sol,

thanks for your quick reply. I won't get back to this by Tuesday / Monday. Yes, making sure to run the latest versions is definitely scheduled. As I said I don't think it's a permission issue, I already fixed the problems related to Windows permission peculiarities. I'll inquire next week using the materials you provided (thanks!!!). Btw. I think Pandas is definitely a good choice and will allow for more flexible handling. I would not worry about performance. For example the parsers are about a factor 2 faster than numpy.

Best, Denis

dengemann commented 10 years ago

I have attached a modified example that does this (in the most simple of ways, not likely the exact output format you want), and is also setup to use the Tobii system by default (as per the iohub_config.yaml file).

@isolver ping. Did I miss your attachment / link? Also looked into my mailbox but no success. Thanks again.

dengemann commented 10 years ago

discussion continued in #79 I'll leave this open since the actual issue is still present.

isolver commented 10 years ago

The issue of write permissions for the iohub demos is really a psychopy issue, as the iohub demos are within the psychopy demo's folder.

This folder is currently in the program Files(x86) dir, so non admin users can not write to the demo folders.

IMO, the demo's should be installed in the C:\Users\a_user\psychopy\demos folder; that way there will be no issues with write permissions.

So closing here and will raise in psychopy.