tensorflow / tensor2tensor

Library of deep learning models and datasets designed to make deep learning more accessible and accelerate ML research.
Apache License 2.0
15.6k stars 3.51k forks source link

'NoneType' object has no attribute 'copy' #1922

Open sjtuzhaoxh opened 1 year ago

sjtuzhaoxh commented 1 year ago

C:\Users\zhaoxianghui\AppData\Local\Programs\Python\Python38\python.exe D:\project\python\tensor2tensor-master\tensor2tensor\bin\t2t-trainer --registry_help Traceback (most recent call last): File "D:\project\python\tensor2tensor-master\tensor2tensor\bin\t2t-trainer", line 23, in from tensor2tensor.bin import t2t_trainer File "D:\project\python\tensor2tensor-master\tensor2tensor\bin\t2t_trainer.py", line 24, in from tensor2tensor import models # pylint: disable=unused-import File "D:\project\python\tensor2tensor-master\tensor2tensor\models__init__.py", line 51, in from tensor2tensor.models.research import rl File "D:\project\python\tensor2tensor-master\tensor2tensor\models\research\rl.py", line 27, in from tensor2tensor.envs import tic_tac_toe_env File "D:\project\python\tensor2tensor-master\tensor2tensor\envs__init__.py", line 23, in from tensor2tensor.envs import tic_tac_toe_env File "D:\project\python\tensor2tensor-master\tensor2tensor\envs\tic_tac_toe_env.py", line 244, in register() File "D:\project\python\tensor2tensor-master\tensor2tensor\envs\tic_tac_toe_env.py", line 239, in register unused_tictactoe_id, unused_tictactoe_env = gym_utils.register_gym_env( File "D:\project\python\tensor2tensor-master\tensor2tensor\rl\gym_utils.py", line 360, in register_gym_env return env_name, gym.make(env_name) File "C:\Users\zhaoxianghui\AppData\Local\Programs\Python\Python38\lib\site-packages\gym\envs\registration.py", line 572, in make kwargs = spec.kwargs.copy() AttributeError: 'NoneType' object has no attribute 'copy'

sjtuzhaoxh commented 1 year ago

@TimOgden Change kwargs=None optional parameter to **kwargs this works to me