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

Crash when launching scene and mlagnets-learn #6091

Closed
longdeadline opened this issue Mar 29, 2024 · 3 comments
Closed

Crash when launching scene and mlagnets-learn #6091

longdeadline opened this issue Mar 29, 2024 · 3 comments
Labels
bug Issue describes a potential bug in ml-agents. stale Issues that have been idle for a while. Automatically closed by a bot if idle for too long.

Comments

@longdeadline
Copy link

longdeadline commented Mar 29, 2024

As soon as I start the scene it crashes, I don't know why, the mlagents-learn version matches the package version.


            ┐  ╖
        ╓╖╬│╡  ││╬╖╖
    ╓╖╬│││││┘  ╬│││││╬╖
 ╖╬│││││╬╜        ╙╬│││││╖╖                               ╗╗╗
 ╬╬╬╬╖││╦╖        ╖╬││╗╣╣╣╬      ╟╣╣╬    ╟╣╣╣             ╜╜╜  ╟╣╣
 ╬╬╬╬╬╬╬╬╖│╬╖╖╓╬╪│╓╣╣╣╣╣╣╣╬      ╟╣╣╬    ╟╣╣╣ ╒╣╣╖╗╣╣╣╗   ╣╣╣ ╣╣╣╣╣╣ ╟╣╣╖   ╣╣╣
 ╬╬╬╬┐  ╙╬╬╬╬│╓╣╣╣╝╜  ╫╣╣╣╬      ╟╣╣╬    ╟╣╣╣ ╟╣╣╣╙ ╙╣╣╣  ╣╣╣ ╙╟╣╣╜╙  ╫╣╣  ╟╣╣
 ╬╬╬╬┐     ╙╬╬╣╣      ╫╣╣╣╬      ╟╣╣╬    ╟╣╣╣ ╟╣╣╬   ╣╣╣  ╣╣╣  ╟╣╣     ╣╣╣┌╣╣╜
 ╬╬╬╜       ╬╬╣╣      ╙╝╣╣╬      ╙╣╣╣╗╖╓╗╣╣╣╜ ╟╣╣╬   ╣╣╣  ╣╣╣  ╟╣╣╦╓    ╣╣╣╣╣
 ╙   ╓╦╖    ╬╬╣╣   ╓╗╗╖            ╙╝╣╣╣╣╝╜   ╘╝╝╜   ╝╝╝  ╝╝╝   ╙╣╣╣    ╟╣╣╣
   ╩╬╬╬╬╬╬╦╦╬╬╣╣╗╣╣╣╣╣╣╣╝                                             ╫╣╣╣╣
      ╙╬╬╬╬╬╬╬╣╣╣╣╣╣╝╜
          ╙╬╬╬╣╣╣╜
             ╙
        
 Version information:
  ml-agents: 0.30.0,
  ml-agents-envs: 0.30.0,
  Communicator API: 1.5.0,
  PyTorch: 1.11.0
[INFO] Listening on port 5004. Start training by pressing the Play button in the Unity Editor.
[INFO] Connected to Unity environment with package version 2.3.0-exp.3 and communication version 1.5.0
[ERROR] UnityEnvironment worker 0: environment raised an unexpected exception.
Traceback (most recent call last):
  File "/Users/ivan/MLAgents/venv/lib/python3.9/site-packages/mlagents/trainers/subprocess_env_manager.py", line 211, in worker
    env.reset()
  File "/Users/ivan/MLAgents/venv/lib/python3.9/site-packages/mlagents_envs/environment.py", line 323, in reset
    self._update_behavior_specs(outputs)
  File "/Users/ivan/MLAgents/venv/lib/python3.9/site-packages/mlagents_envs/environment.py", line 292, in _update_behavior_specs
    agent_infos = output.rl_output.agentInfos[brain_param.brain_name]
  File "/Users/ivan/MLAgents/venv/lib/python3.9/site-packages/google/protobuf/internal/containers.py", line 70, in __getitem__
    return self._values[key]
TypeError: list indices must be integers or slices, not str
Traceback (most recent call last):
  File "/Users/ivan/MLAgents/venv/bin/mlagents-learn", line 8, in <module>
    sys.exit(main())
  File "/Users/ivan/MLAgents/venv/lib/python3.9/site-packages/mlagents/trainers/learn.py", line 264, in main
    run_cli(parse_command_line())
  File "/Users/ivan/MLAgents/venv/lib/python3.9/site-packages/mlagents/trainers/learn.py", line 260, in run_cli
    run_training(run_seed, options, num_areas)
  File "/Users/ivan/MLAgents/venv/lib/python3.9/site-packages/mlagents/trainers/learn.py", line 136, in run_training
    tc.start_learning(env_manager)
  File "/Users/ivan/MLAgents/venv/lib/python3.9/site-packages/mlagents_envs/timers.py", line 305, in wrapped
    return func(*args, **kwargs)
  File "/Users/ivan/MLAgents/venv/lib/python3.9/site-packages/mlagents/trainers/trainer_controller.py", line 172, in start_learning
    self._reset_env(env_manager)
  File "/Users/ivan/MLAgents/venv/lib/python3.9/site-packages/mlagents_envs/timers.py", line 305, in wrapped
    return func(*args, **kwargs)
  File "/Users/ivan/MLAgents/venv/lib/python3.9/site-packages/mlagents/trainers/trainer_controller.py", line 105, in _reset_env
    env_manager.reset(config=new_config)
  File "/Users/ivan/MLAgents/venv/lib/python3.9/site-packages/mlagents/trainers/env_manager.py", line 68, in reset
    self.first_step_infos = self._reset_env(config)
  File "/Users/ivan/MLAgents/venv/lib/python3.9/site-packages/mlagents/trainers/subprocess_env_manager.py", line 446, in _reset_env
    ew.previous_step = EnvironmentStep(ew.recv().payload, ew.worker_id, {}, {})
  File "/Users/ivan/MLAgents/venv/lib/python3.9/site-packages/mlagents/trainers/subprocess_env_manager.py", line 101, in recv
    raise env_exception
TypeError: list indices must be integers or slices, not str
@longdeadline longdeadline added the bug Issue describes a potential bug in ml-agents. label Mar 29, 2024
@TaqiRaza512
Copy link

Dear! This is the same error I am getting on my side. I am also trying to setup mlagents in unity. If you find some remedy to it. Please share with me as well.

Copy link

This issue is stale because it has been open for 30 days with no activity.

@github-actions github-actions bot added the stale Issues that have been idle for a while. Automatically closed by a bot if idle for too long. label Apr 28, 2024
Copy link

This issue was closed because it has been inactive for 14 days since being marked as stale. Please open a new issue for related bugs.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale May 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue describes a potential bug in ml-agents. stale Issues that have been idle for a while. Automatically closed by a bot if idle for too long.
Projects
None yet
Development

No branches or pull requests

2 participants