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

ModuleNotFoundError: No module named 'SBEnvironment' #3

Closed
rl-2 opened this issue Nov 18, 2021 · 4 comments
Closed

ModuleNotFoundError: No module named 'SBEnvironment' #3

rl-2 opened this issue Nov 18, 2021 · 4 comments

Comments

@rl-2
Copy link

rl-2 commented Nov 18, 2021

I was trying to run ./TestPythonHeuristicAgent.sh RandomAgent and got this error ModuleNotFoundError: No module named SBEnvironment.

I've tested on both Ubuntu and MacOS and it seems the error is cross-platform.

@Cheng-Xue
Copy link
Collaborator

Hi Rodger, sorry for the late reply. The issue is fixed, please try again on Ubuntu.

@rl-2
Copy link
Author

rl-2 commented Nov 29, 2021

Thanks, Cheng! The ModuleNotFoundError: No module named SBEnvironment issue goes away.

However, a new issue comes up after several agent runs:

running 1_01_01
agent 1 running
agent 2 running
agent 3 running
agent 4 running
agent 5 running
agent 6 running
agent 7 running
agent 8 running
2021-11-29 19:50:23,829 - Environment Wrapper - CRITICAL - Error in client-server communication: [Errno 111] Connection refused
Exception in thread Thread-2:
Traceback (most recent call last):
  File "/home/ubuntu/anaconda3/envs/pytorch_p37/lib/python3.7/threading.py", line 926, in _bootstrap_inner
    self.run()
  File "/home/ubuntu/RL-AngryBirds/sciencebirdsagents/HeuristicAgents/HeuristicAgentThread.py", line 24, in run
    state_representation_type=self.agent.state_representation_type)
  File "/home/ubuntu/RL-AngryBirds/sciencebirdsagents/SBEnvironment/SBEnvironmentWrapper.py", line 83, in make
    info = self.agent.ar.configure(self.agent.id)
  File "/home/ubuntu/RL-AngryBirds/sciencebirdsagents/Client/agent_client.py", line 171, in configure
    self.playing_mode.value
  File "/home/ubuntu/RL-AngryBirds/sciencebirdsagents/Client/agent_client.py", line 131, in _send_command
    self.server_socket.sendall(msg)
BrokenPipeError: [Errno 32] Broken pipe

That might be related to #4

@Cheng-Xue
Copy link
Collaborator

it seems like the game server is not initialized. can u try to go to sciencebirdsgames/Linux and run java -jar ./game_playing_interface.jar first before running the agent? is the server successfully initialized? if not please also check if you are using java 13. Thanks.

@rl-2
Copy link
Author

rl-2 commented Nov 30, 2021

Thanks, Cheng. The issue went away after initializing the server by java -jar ./game_playing_interface.jar.

Closing the issue.

@rl-2 rl-2 closed this as completed Nov 30, 2021
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

2 participants