A3C for Gridworld
akileshbadrinaaraayanan opened this issue · 0 comments
I am trying to implement A3C for gridworld by appropriately modifying run() method of A3C cartpole example. However, I am getting the below error:
Exception ignored in: <bound method PhotoImage.del of <PIL.ImageTk.PhotoImage object at 0x7f7b807077b8>>
Traceback (most recent call last):
File "/home/akb/.local/lib/python3.4/site-packages/PIL/ImageTk.py", line 130, in del
name = self.__photo.name
AttributeError: 'PhotoImage' object has no attribute '_PhotoImage__photo'
Exception in thread Thread-3:
Traceback (most recent call last):
File "/usr/lib/python3.4/threading.py", line 920, in _bootstrap_inner
self.run()
File "deep_a3c.py", line 159, in run
env = Env()
File "/home/akb/reinforcement-learning/1-grid-world/6-deep-sarsa/environment_a3c.py", line 21, in init
self.shapes = self.load_images()
File "/home/akb/reinforcement-learning/1-grid-world/6-deep-sarsa/environment_a3c.py", line 58, in load_images
Image.open("../img/rectangle.png").resize((30, 30)))
File "/home/akb/.local/lib/python3.4/site-packages/PIL/ImageTk.py", line 124, in init
self.__photo = tkinter.PhotoImage(**kw)
File "/usr/lib/python3.4/tkinter/init.py", line 3419, in init
Image.init(self, 'photo', name, cnf, master, **kw)
File "/usr/lib/python3.4/tkinter/init.py", line 3375, in init
self.tk.call(('image', 'create', imgtype, name,) + options)
RuntimeError: main thread is not in main loop
Any help on this error. If possible, could you provide an implementation of A3C on Gridworld.
Thanks,
Akilesh