Skip to content
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

Repeated Pyglet Attribute Error #33

Closed
mdratva opened this issue Nov 18, 2021 · 2 comments
Closed

Repeated Pyglet Attribute Error #33

mdratva opened this issue Nov 18, 2021 · 2 comments

Comments

@mdratva
Copy link

mdratva commented Nov 18, 2021

Hi @jfkominsky

We are building a looking-time experiment using PsychoPy 2021.2.3 and PyHab 0.9.3 on a MacOS Monterey 12.0.1.

We were able to build the experiment and run it using two monitors, but it would crash sometime between trial 8-15. Additionally, everytime we tried to open stimulus settings, it crashed and gave us the error that has already been addressed on this github: 'AttributeError: module 'pyglet.window' has no attribute 'get_platform'.

However, we downgraded the pyglet on the computer (pip3 install pyglet==1.3.2), yet got the same error. We also attempted to run the same experiment Launcher on PsychoPy version 2020.2.8, and still got the pyglet attribute error. We began changing the source code within PyHabbuilder according to what we found online about pyglet attributes, including importing packages and calling canvas.window instead. We also attempted changing preferred window type from pyglet to pygame in user preferences, but this still raised an error upon opening stimulus settings. After all of the errors, we have changed the code back to the default defDisp setup. We even contacted the computational team here at UCSD for help with this issue, and they recommended multiple version changes and attempted them as well with no success

Are there any other suggestions you can think of? We believe its due to incompatible version types between our downloaded PyHab version, PsychoPy version, Python/Pyglet versions, and MacOS.

@jfkominsky
Copy link
Owner

This sounds like two separate issues.

First, with regard to the crashing on trials 8-15, does it produce an error message when this happens? What kind of stimuli are you presenting? It may be easiest to share the whole experiment with me so I can check these things myself.

Second, with regard to the pyglet issue, there is a solution offered here that involves downgrading pyglet yet further to 1.3.0b1: https://discourse.psychopy.org/t/error-module-pyglet-window-has-no-attribute-get-platform-fixed-solution-below/8897

The underlying issue seems to be that pyglet changed something around 1.3.1 that deprecated get_platform, but something is still calling it. To help me pin it down, does this crash only occur when accessing the stimulus settings, or does it occur when trying to access any settings window?

@jfkominsky
Copy link
Owner

Both issues should be addressed with the fixes in release 0.9.4, please reopen this issue if not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants