Farama-Foundation / ViZDoom

Reinforcement Learning environments based on the 1993 game Doom :godmode:
https://vizdoom.farama.org/
1.73k stars 401 forks source link

AttributeError : basic.py failed #365

Open geonyeong-park opened 5 years ago

geonyeong-park commented 5 years ago

Hi, I am using ubuntu 18.04, conda 4.5.11 with python 3.6.7 and installed most current version of vizdoom by git cloning. However, when i tried to run basic.py, it returns error such as:

Traceback (most recent call last): File "/home/geonyoung/ViZDoom/examples/python/basic.py", line 52, in game.set_objects_info_enabled(True) AttributeError: 'vizdoom.vizdoom.DoomGame' object has no attribute 'set_objects_info_enabled'

After i skipped this line, 'set_sectors_info_enabled' make exactly same error.

By the way, Thank you for your great supports and projects!

mwydmuch commented 5 years ago

Hi @ParkGeonYeong, are you sure than you installed the current master version? After installing using (the version should be 1.1.8):

pip install git+https://github.com/mwydmuch/ViZDoom

The example works fine for me.

mihahauke commented 5 years ago

I've run into the same error for 1.1.7. It works for 1.1.8. @ParkGeonYeong Can you confirm it is the case for you too?

blearn-cmu commented 5 years ago

I have the same problem using Windows 10, conda 4.6.2, python 3.7.2. I used the pre-compiled Windows binaries for release 1.1.7. (ViZDoom-1.1.7-Win-Python37-x86_64.zip).

I also tried python 3.6.8 in another conda environment on the same system, using the appropriate pre-compiled binaries for 1.1.7 (ViZDoom-1.1.7-Win-Python36-x86_64.zip)

When can we expect the 1.1.8 pre-compiled Windows binaries?

blearn-cmu commented 5 years ago

Oops, sorry this was user error. All I had to do was move to the 1.1.7 tag of the source tree.

$ git checkout tag/1.1.7

nainglinwai1 commented 5 years ago

Hi, I am using ubuntu 18.04, conda 4.5.11 with python 3.6.7 and installed most current version of vizdoom by git cloning. However, when i tried to run basic.py, it returns error such as:

Traceback (most recent call last): File "/home/geonyoung/ViZDoom/examples/python/basic.py", line 52, in game.set_objects_info_enabled(True) AttributeError: 'vizdoom.vizdoom.DoomGame' object has no attribute 'set_objects_info_enabled'

After i skipped this line, 'set_sectors_info_enabled' make exactly same error.

By the way, Thank you for your great supports and projects!

is the error solved

SCKnife commented 5 years ago

I have some problems ,please help me!Iet me give you a brief account of how I built it: First,I downloaded the windows binaries 1.1.7Python 3.7 (64-bit), and copy it to the C:\ProgramData\Anaconda3\envs\py1\Lib\site-packages,so I can successfully import vizdoom. Second,I clone the vizdoom from the Github to the local,then I open the cmd, move to the file until examples/python, when I carry out the command of "python basic.py",here are the error: Traceback (most recent call last): File "basic.py", line 52, in game.set_objects_info_enabled(True) AttributeError: 'vizdoom.vizdoom.DoomGame' object has no attribute 'set_objects_info_enabled' So what should I do?Please help me!Thank you!

takkiraz commented 5 years ago

Set_objects_info_enabled is only available in version 1.1.8. So you have to build it yourself or use it on Linux or Mac.

Tie-1 commented 2 years ago

Hi, I am using ubuntu 18.04, conda 4.5.11 with python 3.6.7 and installed most current version of vizdoom by git cloning. However, when i tried to run basic.py, it returns error such as:

Traceback (most recent call last): File "/home/geonyoung/ViZDoom/examples/python/basic.py", line 52, in game.set_objects_info_enabled(True) AttributeError: 'vizdoom.vizdoom.DoomGame' object has no attribute 'set_objects_info_enabled'

After i skipped this line, 'set_sectors_info_enabled' make exactly same error. By the way, Thank you for your great supports and projects!

is the error solved

Can you describe it in more detail and how to solve it?

romulofff commented 2 years ago

EDIT: Nevermind, I could run adding the solution in https://github.com/mwydmuch/ViZDoom/pull/486

Hi, I'm using Ubuntu 20.04, Python 3.8.10 and I have the same error

AttributeError: 'vizdoom.vizdoom.DoomGame' object has no attribute 'set_soft_sound_enabled'

I tried reducing my code to this 4 lines, and still had the same problem:

import vizdoom
game = vizdoom.DoomGame()
game.set_soft_sound_enabled(True)
game.init()

I installed vizdoom first with pip install vizdoom. Then tried pip install git+https://github.com/mwydmuch/ViZDoom and it failed again. Any fix for this?