: The `registry.env_specs` property along with `EnvSpecTree` is deprecated. Please use `registry` directly as a dictionary instead. logger.warn( Successfully registered the following environments: ['MetaDrive-validation-v0', 'MetaDrive-10env-v0', 'MetaDrive-100envs-v0', 'MetaDrive-1000envs-v0', 'SafeMetaDrive-validation-v0', 'SafeMetaDrive-10env-v0', 'SafeMetaDrive-100envs-v0', 'SafeMetaDrive-1000envs-v0', 'MARLTollgate-v0', 'MARLBottleneck-v0', 'MARLRoundabout-v0', 'MARLIntersection-v0', 'MARLParkingLot-v0', 'MARLMetaDrive-v0']. Known pipe types: wglGraphicsPipe (all display modules loaded.) Traceback (most recent call last): File "C:\Users\cfmoto\AppData\Local\Programs\Python\Python39\lib\runpy.py", line 197, in _run_module_as_main return _run_code(code, main_globals, None, File "C:\Users\cfmoto\AppData\Local\Programs\Python\Python39\lib\runpy.py", line 87, in _run_code exec(code, run_globals) File "C:\Users\cfmoto\AppData\Local\Programs\Python\Python39\lib\site-packages\metadrive\examples\drive_in_single_agent_env.py", line 56, in <module> raise e File "C:\Users\cfmoto\AppData\Local\Programs\Python\Python39\lib\site-packages\metadrive\examples\drive_in_single_agent_env.py", line 36, in <module> o = env.reset() File "C:\Users\cfmoto\AppData\Local\Programs\Python\Python39\lib\site-packages\metadrive\envs\base_env.py", line 371, in reset self.lazy_init() # it only works the first time when reset() is called to avoid the error when render File "C:\Users\cfmoto\AppData\Local\Programs\Python\Python39\lib\site-packages\metadrive\envs\base_env.py", line 258, in lazy_init engine = initialize_engine(self.config) File "C:\Users\cfmoto\AppData\Local\Programs\Python\Python39\lib\site-packages\metadrive\engine\engine_utils.py", line 12, in initialize_engine cls.singleton = cls(env_global_config) File "C:\Users\cfmoto\AppData\Local\Programs\Python\Python39\lib\site-packages\metadrive\engine\base_engine.py", line 29, in __init__ EngineCore.__init__(self, global_config) File "C:\Users\cfmoto\AppData\Local\Programs\Python\Python39\lib\site-packages\metadrive\engine\core\engine_core.py", line 189, in __init__ gltf.patch_loader(self.loader) AttributeError: module 'gltf' has no attribute 'patch_loader'
时间: 2023-07-09 19:56:03 浏览: 292
CPP-registry.zip_Registry.c_registry.cpp
这是一个错误提示,代码中使用了已经被弃用的 registry.env_specs 和 EnvSpecTree,应该直接使用 registry 字典。另外,还有一个 AttributeError 错误,可能是由于模块 gltf 中找不到 patch_loader 属性引起的。需要检查代码中是否正确导入了 gltf 模块,并且该模块是否包含 patch_loader 属性。
阅读全文