You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SYSTEM INFORMATION
MacBook Pro 2017, it has a TouchBar
MacOS Ventura 13.6.1
python 3.11.6
pyglet 2.0.10
HOW TO REPRODUCE
import pyglet
pyglet.input.ControllerManager()
ERROR PRODUCED
Traceback (most recent call last):
File "", line 1, in
File "/Volumes/WIP/conda/cs212/lib/python3.11/site-packages/pyglet/input/macos/darwin_hid.py", line 587, in init
if controller := _create_controller(device, display):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Volumes/WIP/conda/cs212/lib/python3.11/site-packages/pyglet/input/macos/darwin_hid.py", line 624, in _create_controller
if not device.transport and device.transport.upper() in ('USB', 'BLUETOOTH'):
^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'upper'
EXPLANATION
This line does not make sense since if the device has no attribute named transport (not device.transport) it will attempt to call the method upper() on a NoneType. In my case the device that it is causing the problem u=is HIDDevice(name=TouchBarUserDevice), since this device does not have a property named transport.
HOW TO FIX
line 624 in darwin_hid.py needs to be changed
FROM
if not device.transport and device.transport.upper() in ('USB', 'BLUETOOTH'):
TO
if not (device.transport and device.transport.upper() in ('USB', 'BLUETOOTH')):
The text was updated successfully, but these errors were encountered:
BUG DESCRIPTION
ControllerManager crashes
SYSTEM INFORMATION
MacBook Pro 2017, it has a TouchBar
MacOS Ventura 13.6.1
python 3.11.6
pyglet 2.0.10
HOW TO REPRODUCE
import pyglet
pyglet.input.ControllerManager()
ERROR PRODUCED
Traceback (most recent call last):
File "", line 1, in
File "/Volumes/WIP/conda/cs212/lib/python3.11/site-packages/pyglet/input/macos/darwin_hid.py", line 587, in init
if controller := _create_controller(device, display):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Volumes/WIP/conda/cs212/lib/python3.11/site-packages/pyglet/input/macos/darwin_hid.py", line 624, in _create_controller
if not device.transport and device.transport.upper() in ('USB', 'BLUETOOTH'):
^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'upper'
EXPLANATION
This line does not make sense since if the device has no attribute named transport (not device.transport) it will attempt to call the method upper() on a NoneType. In my case the device that it is causing the problem u=is HIDDevice(name=TouchBarUserDevice), since this device does not have a property named transport.
HOW TO FIX
line 624 in darwin_hid.py needs to be changed
FROM
if not device.transport and device.transport.upper() in ('USB', 'BLUETOOTH'):
TO
if not (device.transport and device.transport.upper() in ('USB', 'BLUETOOTH')):
The text was updated successfully, but these errors were encountered: