Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error on simple "hello world" #45

Open
nicoADSP opened this issue Nov 21, 2024 · 0 comments
Open

Error on simple "hello world" #45

nicoADSP opened this issue Nov 21, 2024 · 0 comments

Comments

@nicoADSP
Copy link

Hi there, I cloned master and I tried to do a small hello world:

  path = inspect.getfile(CybORG)
  path = dirname(path) + f'/Simulator/Scenarios/scenario_files/Scenario1.yaml'
  sg = FileReaderScenarioGenerator(path)
  env = CybORG(scenario_generator=sg,seed=1)

However, when instantiating CybORG I get the following error:

Traceback (most recent call last):
  File "/adaptors/start-worker.py", line 105, in <module>
    configure_core_env()
  File "/adaptors/env_adaptor.py", line 35, in configure_core_env
    env = CybORG(scenario_generator=sg,seed=1)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/cage/CybORG/env.py", line 80, in __init__
    self.environment_controller = self._create_env_controller(env_config, agents)
                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/cage/CybORG/env.py", line 95, in _create_env_controller
    return SimulationController(self.scenario_generator, agents, self.np_random)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/cage/CybORG/Simulator/SimulationController.py", line 26, in __init__
    super().__init__(scenario_generator, agents, np_random)
  File "/cage/CybORG/Shared/EnvironmentController.py", line 49, in __init__
    scenario = scenario_generator.create_scenario(np_random)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/cage/CybORG/Simulator/Scenarios/FileReaderScenarioGenerator.py", line 74, in create_scenario
    scenario = copy.deepcopy(self.scenario)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/copy.py", line 172, in deepcopy
    y = _reconstruct(x, memo, *rv)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/copy.py", line 271, in _reconstruct
    state = deepcopy(state, memo)
            ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/copy.py", line 146, in deepcopy
    y = copier(x, memo)
        ^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/copy.py", line 231, in _deepcopy_dict
    y[deepcopy(key, memo)] = deepcopy(value, memo)
                             ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/copy.py", line 146, in deepcopy
    y = copier(x, memo)
        ^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/copy.py", line 231, in _deepcopy_dict
    y[deepcopy(key, memo)] = deepcopy(value, memo)
                             ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/copy.py", line 172, in deepcopy
    y = _reconstruct(x, memo, *rv)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/copy.py", line 271, in _reconstruct
    state = deepcopy(state, memo)
            ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/copy.py", line 146, in deepcopy
    y = copier(x, memo)
        ^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/copy.py", line 231, in _deepcopy_dict
    y[deepcopy(key, memo)] = deepcopy(value, memo)
                             ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/copy.py", line 172, in deepcopy
    y = _reconstruct(x, memo, *rv)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/copy.py", line 271, in _reconstruct
    state = deepcopy(state, memo)
            ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/copy.py", line 146, in deepcopy
    y = copier(x, memo)
        ^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/copy.py", line 231, in _deepcopy_dict
    y[deepcopy(key, memo)] = deepcopy(value, memo)
                             ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/copy.py", line 172, in deepcopy
    y = _reconstruct(x, memo, *rv)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/copy.py", line 265, in _reconstruct
    y = func(*args)
        ^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/gym/utils/seeding.py", line 111, in _generator_ctor
    raise ValueError(
ValueError: <numpy.random._pcg64.PCG64 object at 0x7f57b2057270> is not a known BitGenerator module.

Since its a simple hello world, I am wondering that perhaps I should not clone from master?

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant