amitnilams / sdwan-gym

AI gym for SD-WAN
9 stars 4 forks source link

While running python files deterministic_trail.py and random_trial.py ,getting the error, "ImportError: No module named 'gym_sdwan_stat' " #1

Closed turtle-23 closed 5 years ago

turtle-23 commented 5 years ago

Traceback (most recent call last): File "/usr/local/lib/python3.5/dist-packages/pkg_resources/init.py", line 359, in get_provider module = sys.modules[moduleOrReq] KeyError: 'gym_sdwan_stat'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "deterministic_trial.py", line 7, in env = gym.make('Sdwan-v0') File "/home/ubuntu/.local/lib/python3.5/site-packages/gym/envs/registration.py", line 156, in make return registry.make(id, kwargs) File "/home/ubuntu/.local/lib/python3.5/site-packages/gym/envs/registration.py", line 101, in make env = spec.make(kwargs) File "/home/ubuntu/.local/lib/python3.5/site-packages/gym/envs/registration.py", line 72, in make cls = load(self._entry_point) File "/home/ubuntu/.local/lib/python3.5/site-packages/gym/envs/registration.py", line 17, in load mod = importlib.import_module(mod_name) File "/usr/lib/python3.5/importlib/init.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 986, in _gcd_import File "", line 969, in _find_and_load File "", line 958, in _find_and_load_unlocked File "", line 673, in _load_unlocked File "", line 665, in exec_module File "", line 222, in _call_with_frames_removed File "/home/ubuntu/sdwan-gym/gym_sdwan/envs/init.py", line 4, in from gym_sdwan.envs.sdwan_env import SdwanEnv File "/home/ubuntu/sdwan-gym/gym_sdwan/envs/sdwan_env.py", line 26, in filepath = pkg_resources.resource_filename('gym_sdwan_stat', path) File "/usr/local/lib/python3.5/dist-packages/pkg_resources/init.py", line 1144, in resource_filename return get_provider(package_or_requirement).get_resource_filename( File "/usr/local/lib/python3.5/dist-packages/pkg_resources/init.py", line 361, in get_provider import(moduleOrReq) ImportError: No module named 'gym_sdwan_stat'

To install the environment, I went to sdwan-gym folder and run the command - pip install -e . ubuntu version :16.04 python version : 3.5.2

amitnilams commented 5 years ago

Fixed the error - 'gym_sdwan_stat' is to be replaced by 'gym_sdwan'.I have already made the change and checked in.Check -  sdwan-gym/gym_sdwan/envs/sdwan_env.py line 26 On Friday, May 31, 2019, 4:18:21 PM GMT+5:30, turtle-23 notifications@github.com wrote:

Traceback (most recent call last): File "/usr/local/lib/python3.5/dist-packages/pkg_resources/init.py", line 359, in get_provider module = sys.modules[moduleOrReq] KeyError: 'gym_sdwan_stat'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "deterministic_trial.py", line 7, in env = gym.make('Sdwan-v0') File "/home/ubuntu/.local/lib/python3.5/site-packages/gym/envs/registration.py", line 156, in make return registry.make(id, kwargs) File "/home/ubuntu/.local/lib/python3.5/site-packages/gym/envs/registration.py", line 101, in make env = spec.make(kwargs) File "/home/ubuntu/.local/lib/python3.5/site-packages/gym/envs/registration.py", line 72, in make cls = load(self._entry_point) File "/home/ubuntu/.local/lib/python3.5/site-packages/gym/envs/registration.py", line 17, in load mod = importlib.import_module(mod_name) File "/usr/lib/python3.5/importlib/init.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 986, in _gcd_import File "", line 969, in _find_and_load File "", line 958, in _find_and_load_unlocked File "", line 673, in _load_unlocked File "", line 665, in exec_module File "", line 222, in _call_with_frames_removed File "/home/ubuntu/sdwan-gym/gym_sdwan/envs/init.py", line 4, in from gym_sdwan.envs.sdwan_env import SdwanEnv File "/home/ubuntu/sdwan-gym/gym_sdwan/envs/sdwan_env.py", line 26, in filepath = pkg_resources.resource_filename('gym_sdwan_stat', path) File "/usr/local/lib/python3.5/dist-packages/pkg_resources/init.py", line 1144, in resource_filename return get_provider(package_or_requirement).get_resource_filename( File "/usr/local/lib/python3.5/dist-packages/pkg_resources/init.py", line 361, in get_provider import(moduleOrReq) ImportError: No module named 'gym_sdwan_stat'

To install the environment, I went to sdwan-gym folder and run the command - pip install -e . ubuntu version :16.04 python version : 3.5.2

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.