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

[Bug Report] AttributeError: module 'nmmo.lib.material' has no attribute 'Forest' #17

Open
liuqi8827 opened this issue Jul 21, 2023 · 1 comment

Comments

@liuqi8827
Copy link

liuqi8827 commented Jul 21, 2023

OS: Ubuntu 16.04

Description:

  1. mkdir neural-mmo && cd neural-mmo
  2. git clone https://github.com/neuralmmo/environment.git
  3. git clone https://github.com/neuralmmo/baselines.git
  4. cd environment && pip install -e .[all]
  5. cd baselines && pip install -r requirements.txt
  6. python train.py
    Then, the error occurred:
Traceback (most recent call last):
  File "/home/xxx/neural-mmo/baselines/train.py", line 14, in <module>
    from model.realikun.baseline_agent import BaselineAgent
  File "/home/xxx/neural-mmo/baselines/model/realikun/baseline_agent.py", line 10, in <module>
    from model.realikun.policy import BaselinePolicy
  File "/home/xxx/neural-mmo/baselines/model/realikun/policy.py", line 5, in <module>
    from env.nmmo_team_env import NMMOTeamEnv
  File "/home/xxx/neural-mmo/baselines/env/nmmo_team_env.py", line 8, in <module>
    from feature_extractor.feature_extractor import FeatureExtractor
  File "/home/xxx/neural-mmo/baselines/feature_extractor/feature_extractor.py", line 6, in <module>
    from feature_extractor.map_helper import MapHelper
  File "/home/xxx/neural-mmo/baselines/feature_extractor/map_helper.py", line 9, in <module>
    from nmmo.io import action
ModuleNotFoundError: No module named 'nmmo.io'
  1. I solved the error ModuleNotFoundError: No module named 'nmmo.io' by changing from nmmo.io import action to from nmmo.core import action in /home/xxx/neural-mmo/baselines/feature_extractor/map_helper.py", line 9.
  2. However, another error occurred when I run python train.py:
Traceback (most recent call last):
  File "/home/xxx/neural-mmo/baselines/train.py", line 14, in <module>
    from model.realikun.baseline_agent import BaselineAgent
  File "/home/xxx/neural-mmo/baselines/model/realikun/baseline_agent.py", line 10, in <module>
    from model.realikun.policy import BaselinePolicy
  File "/home/xxx/neural-mmo/baselines/model/realikun/policy.py", line 5, in <module>
    from env.nmmo_team_env import NMMOTeamEnv
  File "/home/xxx/neural-mmo/baselines/env/nmmo_team_env.py", line 8, in <module>
    from feature_extractor.feature_extractor import FeatureExtractor
  File "/home/xxx/neural-mmo/baselines/feature_extractor/feature_extractor.py", line 6, in <module>
    from feature_extractor.map_helper import MapHelper
  File "/home/xxx/neural-mmo/baselines/feature_extractor/map_helper.py", line 34, in <module>
    material.Forest.index: material.Scrub.index,
AttributeError: module 'nmmo.lib.material' has no attribute 'Forest'

9. Thus, there are some bugs, can the baselines repository run successfully?

@liuqi8827 liuqi8827 changed the title [Bug Report] ModuleNotFoundError: No module named 'nmmo.io' [Bug Report] AttributeError: module 'nmmo.lib.material' has no attribute 'Forest' Jul 21, 2023
@tangyunlong
Copy link

tangyunlong commented Aug 13, 2023

Hi, the problem I have encountered is the same as yours, and I am trying to solve it. Do you have any solutions now? Thank you.
@jsuarez5341

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