Skip to content

[BUG] Cannot run random agent if the agents folder is outside the NetSecgame folder #94

@MariaRigaki

Description

@MariaRigaki

Describe the bug
If the NetSecGameAgents folder installation is not inside the NetSecGame folder, running the agents results in an error:

python3 -m agents.attackers.random.random_agent
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/home/maria/repos/NetSecGameAgents/agents/attackers/random/random_agent.py", line 10, in <module>
    from NetSecGameAgents.agents.base_agent import BaseAgent
ModuleNotFoundError: No module named 'NetSecGameAgents'

The agent runs successfully if the imports in the agent are changed to:

from agents.base_agent import BaseAgent
from agents.agent_utils import generate_valid_actions

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions