Examples do not work when started directly
When trying to execute the "main.py" file of the examples, the execution fails because of an incorrect import path for the agent/environment.
Traceback (most recent call last):
File "C:\usr\eta_utility\eta_x\config.py", line 36, in _get_class
cls = getattr(importlib.import_module(module), cls_name)
File "C:\Program Files\Python38\lib\importlib\__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 961, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 961, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 973, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'examples'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "c:/usr/examples/cyber_physical_system/main.py", line 82, in <module>
main()
File "c:/usr/examples/cyber_physical_system/main.py", line 32, in main
experiment(root_path)
File "c:/usr/examples/cyber_physical_system/main.py", line 41, in experiment
experiment = ETAx(
File "C:\usr\eta_utility\eta_x\eta_x.py", line 60, in __init__
self.config: ConfigOpt = ConfigOpt.from_json(self.path_config, root_path, config_overwrite)
File "C:\usr\eta_utility\eta_x\config.py", line 141, in from_json
setup = ConfigOptSetup.from_dict(_setup)
File "C:\usr\eta_utility\eta_x\config.py", line 335, in from_dict
return ConfigOptSetup(
File "<attrs generated init eta_utility.eta_x.config.ConfigOptSetup>", line 12, in __init__
File "C:\usr\eta_utility\eta_x\config.py", line 241, in __attrs_post_init__
_get_class(self, _fields.agent_import, self.agent_import)
File "C:\usr\eta_utility\eta_x\config.py", line 38, in _get_class
raise ModuleNotFoundError(
ModuleNotFoundError: Could not find module 'examples'. While importing class 'DirectControl' from 'agent_import' value.