New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TypeError: unsupported operand type(s) for &: 'long' and 'LP_c_void' when using the pyglet backend #1779
Comments
More info: this is under Windows 10 with pyglet 1.3.2. |
Thanks for the info. Puzzling because the old code appears to be doing the same but didn't have a type error. I'll do my best to work it out though :-/ Are you sure that this version of pyglet worked with 1.85.3. I'm just wondering whether you might have updated both at the same time (and maybe something changed in pyglet)? |
I'm also having trouble with this issue. My setup is Windows 10 X64, Python 2.7.10 X86, PsychoPy 1.90.0 and Pyglet 1.3.0. I read source code of pyglet and found that the content of Type of the return value of
Changing |
FYI: replacing pyglet 1.3.0 with 1.2.4 seems to fix this issue in my setup. In addition, pyglet 1.3.0 works fine with Windows10 x64, Python 3.6.1 x64 and the latest PsychoPy. |
At the beginning, when I installed PsychoPy 1.90.0, pyglet was giving me the following error: NameError: name 'PUINT' is not defined I have updated afterwards pyglet, according to what it is reported here. I used the following command line: pip install --upgrade https://bitbucket.org/pyglet/pyglet/get/tip.zip Then, it gave the error that I reported in the first instance of this thread. Afterwards, I downgraded my PsychoPy version to 1.85.3 and it solved the problem. |
With PsychoPy 1.90.1 / Pyglet 1.4 / Python 2.7 / Windows 7 32 bit I was having the same problem as described by alpinho and hsogo. Downgrading to Pyglet 1.24 solved the issue. |
I tried the latest master with following setups. Both work fine now.
|
Great, thanks! So this seems to be resolved. |
Sorry, I noticed that the issue is not fixed in Python 2.7 x86 and Pyglet 1.3.2. |
Do not downgrade pyglet - it is nice. The error fixed with patch to pygletbackend.py : 338
|
Thanks @sherdim I didn't know that works. But there are other installations where it's needed, so I'll apply that using a try...except and hopefully everything will be happy! |
fixes psychopy#1779 Where the error was: TypeError: unsupported operand type(s) for &: 'long' and 'LP_c_void' It turns out the code forcing the screen pointer into a long format int wasn't necessary on the systems where the error occurred
Under python 2.7 and psychopy 1.90.0 I get the following error:
This protocol works fine with psychopy 1.85.3.
The text was updated successfully, but these errors were encountered: