When I write a pyglet program using Mac pro, the window I ran does not close properly, shrinks, resizes

55 views
Skip to first unread message

6258...@qq.com

unread,
Apr 16, 2019, 4:09:25 AM4/16/19
to pyglet-users
/usr/local/bin/python3.6 /Volumes/Work/PycharmWorkspace/Warships_emotion/test.py
2019-04-16 16:01:11.703 Python[9915:563026] ApplePersistenceIgnoreState: Existing state will not be touched. New state will be written to (null)
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pyglet/libs/darwin/cocoapy/runtime.py", line 755, in __call__
    result = f(objc_id, self.selector, *args)
ctypes.ArgumentError: argument 1: <class 'RecursionError'>: maximum recursion depth exceeded in __instancecheck__

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "_ctypes/callbacks.c", line 234, in 'calling callback function'
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pyglet/libs/darwin/cocoapy/runtime.py", line 1121, in objc_method
    result = f(py_self, *args)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pyglet/window/cocoa/pyglet_window.py", line 25, in nextEventMatchingMask_untilDate_inMode_dequeue_
    if self.inLiveResize():
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pyglet/libs/darwin/cocoapy/runtime.py", line 785, in __call__
    return self.method(self.objc_id, *args)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pyglet/libs/darwin/cocoapy/runtime.py", line 764, in __call__
    error.args += ('selector = ' + self.name,
TypeError: must be str, not bytes

Process finished with exit code 139 (interrupted by signal 11: SIGSEGV)


6258...@qq.com

unread,
Apr 16, 2019, 4:28:05 AM4/16/19
to pyglet-users

Change the Pyglet version to 1.2.4 to solve it.

pip install pyglet==1.24


在 2019年4月16日星期二 UTC+8下午4:09:25,6258...@qq.com写道:

Benjamin Moran

unread,
Apr 17, 2019, 3:53:15 AM4/17/19
to pyglet-users

Paul Everitt

unread,
Aug 27, 2019, 9:43:11 AM8/27/19
to pyglet-users
No luck.

Benjamin Moran

unread,
Sep 4, 2019, 9:23:51 PM9/4/19
to pyglet-users
There is now an issue open on the Github tracker:   https://github.com/pyglet/pyglet/issues/5
Reply all
Reply to author
Forward
0 new messages