p-christ / Deep-Reinforcement-Learning-Algorithms-with-PyTorch

PyTorch implementations of deep reinforcement learning algorithms and environments
MIT License
5.48k stars 1.18k forks source link

TypeError: can't pickle _thread.RLock objects #44

Open shuferhoo opened 4 years ago

shuferhoo commented 4 years ago

I run the Cart_Pole.py with A3C&A2C on windows and got the error.

Traceback (most recent call last): File "D:/学习/Deep-Reinforcement-Learning-Algorithms-with-PyTorch-master/results/Cart_Pole.py", line 142, in trainer.run_games_for_agents() File "D:\学习\Deep-Reinforcement-Learning-Algorithms-with-PyTorch-master\agents\Trainer.py", line 79, in run_games_for_agents self.run_games_for_agent(agent_number + 1, agent_class) File "D:\学习\Deep-Reinforcement-Learning-Algorithms-with-PyTorch-master\agents\Trainer.py", line 121, in run_games_for_agent game_scores, rolling_scores, time_taken = agent.run_n_episodes() File "D:\学习\Deep-Reinforcement-Learning-Algorithms-with-PyTorch-master\agents\actor_critic_agents\A3C.py", line 35, in run_n_episodes optimizer_worker.start() File "D:\Programs\Python\Python36\lib\multiprocessing\process.py", line 105, in start self._popen = self._Popen(self) File "D:\Programs\Python\Python36\lib\multiprocessing\context.py", line 223, in _Popen return _default_context.get_context().Process._Popen(process_obj) File "D:\Programs\Python\Python36\lib\multiprocessing\context.py", line 322, in _Popen return Popen(process_obj) File "D:\Programs\Python\Python36\lib\multiprocessing\popen_spawn_win32.py", line 65, in init reduction.dump(process_obj, to_child) File "D:\Programs\Python\Python36\lib\multiprocessing\reduction.py", line 60, in dump ForkingPickler(file, protocol).dump(obj) TypeError: can't pickle _thread.RLock objects

nizhihao commented 3 years ago

Hello. Have you solve this problem?

ImYanghan commented 3 years ago

Hello,I have this question too. Have you solve it now?