I think this is a not a programming specific bug, but is caused by some libraries.
I am transferring my project to a new PC, which I have freshly setup with anaconda etc. using python 3.7.6. Executing the task on the old machine works fine, here I have also used anaconda with python 3.7 (not sure if it was 3.7.6 but I could check this, i just used while creating the environment python=3.7).
When I now try to run my program, I receive:
Exception in Tkinter callback
Traceback (most recent call last):
...
TypeError: item 1 in _argtypes_ passes a union by value, which is unsupported.
The error is quite long, but it is caused by the following libraries: calling gym.envs which then calls some pyglet.libs
The last line in the error is
...from pyglet.libs.x11 import xlib
File "...7/lib/python3.7/site-packages/pyglet/libs/x11/xlib.py", line 2928, in <module>
XEHeadOfExtensionList.argtypes = [XEDataObject]
Thank you for your help! I do not know how to solve this or even start solving it.
Downgrade your pyttsx3 version:
pip install pyttsx3==2.71
It seems like there is simply no support currently for using gym+pyglet in python version 3.7.6+.
The pyglet error is fixed in 1.4.9+ but gym is currently not compatible with those versions.
Still it is possible to simply downgrade python to 3.7.4 and everything works fine as it is supposed to do.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With