Closed Shenjwei closed 2 years ago
Hi,
Could you try annotating
from gym import error
and the related codes using error
?
I try to install gym package as the annotating,but anothor error occurs.
Traceback (most recent call last):
File "test.py", line 93, in
I
This is due to the incorrect directory for --model-save
. You can set it to the correct one and then it works.
I set it to the correct one .I install the gym package from anaconda search package ,but it doesn't work. Then i use pip to install gym package.It occur such error.
The best solution could be removing the from gym import error
and the related codes for error
.
Another solution is dropping windows and embracing Ubuntu.
I'm sorry to bother you again I use the command python test.py --save-path trial322/model_save --alg maddpg --alias 0 --scenario case322_3min_final --voltage-barrier-type l1 --test-mode single --test-day 730 --render Then the program occur such error:
Traceback (most recent call last): File "test.py", line 108, in
record = test.run(argv.test_day, 15, 1)
File "F:\MAPDN\utilities\tester.py", line 43, in run
self.env.render()
File "F:\MAPDN\environments\var_voltage_control\voltage_control_env.py", line 648, in render
self._init_render()
File "F:\MAPDN\environments\var_voltage_control\voltage_control_env.py", line 642, in _init_render
from .rendering_voltage_control_env import Viewer
File "F:\MAPDN\environments\var_voltage_control\rendering_voltage_control_env.py", line 6, in
from gym import error
File "D:\anaconda3\envs\mapdn\lib\site-packages\gym__init.py", line 13, in
from gym.envs import make, spec, register
File "D:\anaconda3\envs\mapdn\lib\site-packages\gym\envs__init.py", line 10, in
_load_env_plugins()
File "D:\anaconda3\envs\mapdn\lib\site-packages\gym\envs\registration.py", line 276, in load_env_plugins
fn = plugin.load()
File "D:\anaconda3\envs\mapdn\lib\site-packages\importlib_metadata__init.py", line 194, in load
module = import_module(match.group('module'))
File "D:\anaconda3\envs\mapdn\lib\importlib__init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "D:\anaconda3\envs\mapdn\lib\site-packages\ale_py\gym.py", line 5, in
from ale_py.roms.utils import rom_name_to_id, rom_id_to_name
File "D:\anaconda3\envs\mapdn\lib\site-packages\ale_py\roms__init__.py", line 94, in
_RESOLVED_ROMS = _resolve_roms()
File "D:\anaconda3\envs\mapdn\lib\site-packages\ale_py\roms__init__.py", line 46, in _resolve_roms
supported, unsupported = package.resolve()
File "D:\anaconda3\envs\mapdn\lib\site-packages\ale_py\roms\utils.py", line 60, in resolve
lambda file: file.suffix == ".bin", resources.files(self.package).iterdir()
File "D:\anaconda3\envs\mapdn\lib\site-packages\importlib_resources_common.py", line 22, in files
return from_package(get_package(package))
File "D:\anaconda3\envs\mapdn\lib\site-packages\importlib_resources_common.py", line 53, in get_package
resolved = resolve(package)
File "D:\anaconda3\envs\mapdn\lib\site-packages\importlib_resources_common.py", line 44, in resolve
return cand if isinstance(cand, types.ModuleType) else importlib.import_module(cand)
File "D:\anaconda3\envs\mapdn\lib\importlib\ init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "D:\anaconda3\envs\mapdn\lib\site-packages\atari_py\init__.py", line 1, in
from .ale_python_interface import *
File "D:\anaconda3\envs\mapdn\lib\site-packages\atari_py\ale_python_interface.py", line 18, in
'ale_interface/ale_c.dll'))
File "D:\anaconda3\envs\mapdn\lib\ctypes\ init__.py", line 442, in LoadLibrary
return self._dlltype(name)
File "D:\anaconda3\envs\mapdn\lib\ctypes\ init.py", line 364, in init__
self._handle = _dlopen(self._name, mode)
OSError: [WinError 126]
What should i do next,how should I use this module --rendering_voltage_control_env.py?