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

IndexError: index 6 is out of bounds for axis 0 with size 1 #11

Open
Arashiailing opened this issue Feb 20, 2023 · 4 comments
Open

IndexError: index 6 is out of bounds for axis 0 with size 1 #11

Arashiailing opened this issue Feb 20, 2023 · 4 comments

Comments

@Arashiailing
Copy link

Hi,I'm trying to run the code,but found multiple errors,such as
1.module 'numpy' has no attribute 'float'
2.IndexError: index 6 is out of bounds for axis 0 with size 1
May I ask you about numpy's version?

@crond-jaist
Copy link
Collaborator

Hi,

Thanks for reporting. I was able to confirm your issue, which is caused by a recent change in the numpy library. See the link below for more details:
https://levelup.gitconnected.com/fix-attributeerror-module-numpy-has-no-attribute-float-d7d68c5a4971

To fix this you simply need to replace "np.float" with "float" in the files DQN/learn/generateMap.py and DQN/confirm_path.py.

The problem is then solved, but I encountered some new issues related to changes in the gym library. The error was the following:
AssertionError: The environment must specify an observation space. https://www.gymlibrary.dev/content/environment_creation/

I tried some quick fixes, but it didn't work, so I was not able to solve the issue, and the student who developed this system left our university a couple of years ago. I may find the time to fix this in the future, but for now you can try to fix the issue by yourself if you can find a way.

Best wishes,
Razvan

@Arashiailing
Copy link
Author

Arashiailing commented Feb 25, 2023 via email

@Arashiailing
Copy link
Author

I change the version and add to the requirements.txt and the problem is sloved.There is my version
gym==0.13.0
torch==1.10.2
matplotlib==3.3.4
graphviz==0.19.1
jinja2==3.0.3
msgpack==1.0.4
requests==2.18.4

@crond-jaist
Copy link
Collaborator

Hi,
Thank you for investigating the issue and posting the requirements.txt file. I shall test it on my side as well in the following weeks, and if everything goes well I'll update the file in the repository. I'll keep this issue open for now though, until I get to update the repository.
Best wishes,
Razvan

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