Error Message (Error 1):
TypeError: render() got an unexpected keyword argument ‘mode‘
Solution for Error1:
Tried setting gym and pyglet to
- gym:0.17.1
- pyglet:1.5.0
Note: This method will solve the problem above.
However, An new error (Error 2) will be reported:
AttributeError: ‘HTMLWriter’ object has no attribute ‘_temp_names’
Solution for Error2:
- Open the .py file where you wrote your code (the same file you wrote your code in)
- Find your animate_frames method. (If you don’t have it, you can ignore it, I don’t have it, then just put the first block of code from step 3 at the top)
- Add the code before the animate_frames method (add the package to the top).
import matplotlib.pyplot as plt
from IPython.display import HTML
def display_animation(anim):
plt.close(anim._fig)
return HTML(anim.to_jshtml())
Find the following code:
display(display_animation(anim, default_mode='XXX'))
Change it to:
display(display_animation(anim))
The following code can be deleted or ignored:
from JSAnimation.IPython_display import display_animation
Read More:
- [Solved] AttributeError: ‘DataFrame‘ object has no attribute ‘tolist‘
- AttributeError: DatetimeProperties object has no attribute
- [Solved] AttributeError: ‘_IncompatibleKeys’ object has no attribute
- [Solved] AttributeError: DataFrame object has no attribute’xxx’
- [Solved] AttributeError: ‘DataParallel‘ object has no attribute ‘save‘
- [Solved] AttributeError: ‘str‘ object has no attribute ‘decode‘
- [Solved] AttributeError: ‘NoneType‘ object has no attribute ‘append‘
- [Solved] Paramiko error: AttributeError: ‘NoneType’ object has no attribute ‘time’
- [Solved] AttributeError: ‘PngImageFile‘ object has no attribute ‘imshow‘
- [Solved] AttributeError: ‘NoneType‘ object has no attribute ‘astype‘
- [Solved] AttributeError WriteOnlyWorksheet object has no attribute cell
- [Solved] AttributeError: ‘_IncompatibleKeys‘ object has no attribute ‘parameters‘
- [Solved] AttributeError: ‘DataFrame‘ object has no attribute ‘map‘
- [Solved] AttributeError: ‘str‘ object has no attribute ‘decode‘
- [Solved] AttributeError: ‘WebDriver‘ object has no attribute ‘find_element_by_id‘
- [Solved] django AttributeError: ‘UserComment‘ object has no attribute ‘save‘
- How to Solve Python AttributeError: ‘module’ object has no attribute ‘xxx’
- [Solved] vpython: AttributeError: ‘box‘ object has no attribute ‘idx‘
- [Modified] AttributeError: ‘socket‘ object has no attribute ‘ioctl‘ python linux
- [Solved] Networkx Error: Attributeerror: ‘graph’ object has no attribute ‘node’