pygame 1.9.6 Hello from the pygame community. https://www.pygame.org/contribute.html Traceback (most recent call last): File "train_sac.py", line 78, in <module> enable_preview, steps_per_episode, seed) File "train_sac.py", line 14, in main action_type, enable_preview, steps_per_episode, playing=False) File "/home/rong/gym-carla/RL-Carla/Carla-RL/carla_env.py", line 29, in __init__ self.client, self.world, self.frame, self.server = setup(town=town, fps=fps, client_timeout=timeout) File "/home/rong/gym-carla/RL-Carla/Carla-RL/setup.py", line 65, in setup server = subprocess.Popen(f'DISPLAY= ' + str(os.path.join(os.environ.get("CARLA_ROOT"), "CarlaUE4.sh")) + f' -opengl '+ f' -carla-rpc-port={port}' + f" -quality-level=Epic ", stdout=None, stderr=subprocess.STDOUT, preexec_fn=os.setsid, env=env, shell=True) File "/home/rong/anaconda3/envs/DRL/lib/python3.7/posixpath.py", line 80, in join a = os.fspath(a) TypeError: expected str, bytes or os.PathLike object, not NoneType
时间: 2024-04-28 16:22:51 浏览: 159
https://blog.csdn.net/ChaoChao66666/article/details/12578559的图片
这是一个 Python 的错误,看起来是在运行 train_sac.py 中出现的。最后一行错误信息中,显示在第 65 行的代码中,期望得到一个字符串、字节或 os.PathLike 对象,但实际上得到的是 NoneType。这可能是因为在运行该脚本时,某些环境变量或参数未正确设置导致的。建议检查一下代码中的相关变量和参数是否正确设置。
阅读全文