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

It only generated a text file, not WAD #1

Closed
wzbbbb opened this issue Apr 13, 2018 · 15 comments
Closed

It only generated a text file, not WAD #1

wzbbbb opened this issue Apr 13, 2018 · 15 comments
Labels
bug Something isn't working

Comments

@wzbbbb
Copy link

wzbbbb commented Apr 13, 2018

I used the example. However, it only generated a text file. Not sure what I missed.

from oblige import *
seed=2042
another_seed=203234
generator = DoomLevelGenerator(seed)
generator.set_seed(another_seed)
#generator.set_config({"key_to_update": "value"})
number_of_generate_maps = generator.generate("test_wad")

By the way, the link is broken.
Example of usage with ViZDoom: ViZDoom/examples/python/oblige.py.

@mihahauke
Copy link
Collaborator

Are you sure? I copy-pasted the code and it produces a tet file and the wad as well.

The link has been corrected.

@wzbbbb
Copy link
Author

wzbbbb commented Apr 13, 2018

Yes, I tried several times, it only generate a text file. Unless the WAD file will be in a different directory?
Is there a way to trace the operation?

@mihahauke
Copy link
Collaborator

No, the directory should be the same.
To see output files use:
number_of_generated_maps = generator.generate("test_wad",verbose=True)

@wzbbbb
Copy link
Author

wzbbbb commented Apr 17, 2018

Sorry for the delay! I tried again. Here is the output

...
...
Oblige executable path: Oblige_src/Oblige
Exit code: 3
Oblige output:
Making MAP01
Script Error
FAILED!

>>> import oblige
>>> oblige.__version__
'0.1.0'
Ubuntu 16.04.4 LTS

@johny-c
Copy link

johny-c commented Apr 23, 2018

Same output here.

@agiantwhale
Copy link

agiantwhale commented Apr 25, 2018

I'm getting the same output from the latest git version (fc10ce2). I am on OSX.

@Trinkle23897
Copy link

Trinkle23897 commented Apr 28, 2018

It seems on my laptop Ubuntu 16.04, the code only runs well on python3.5, but failed on python2.7 and my manually installed python3.6; however, on my server computer Ubuntu14.04, it fails to run in all python versions, include 2.7, 3.4, 3.5, 3.6.
I've tried to manually run script ./Oblige --batch ~/test.wad --load ~/github/ViZDoom/examples/python/test.txt in /usr/local/lib/python3.6/site-packages/oblige/Oblige_src, and it outputs like this
Making MAP01 Script Error FAILED!
looks something strange...

@mihahauke
Copy link
Collaborator

mihahauke commented Apr 29, 2018

Could you post the files that are included in the pip package after installation?

e.g. tree python3 -c "import oblige; print(oblige.path[0])"``
(please don't copy the whole text, just attach the file with output)

@Trinkle23897
Copy link

Trinkle23897 commented Apr 30, 2018

Python 3.5.2 (default, Nov 23 2017, 16:37:01) 
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import oblige
>>> oblige.path
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: module 'oblige' has no attribute 'path'

same as py2.7 && py3.6 on my laptop

@Trinkle23897
Copy link

Trinkle23897 commented Apr 30, 2018

And I run command tree /usr/local/lib/python3.5/dist-packages/oblige, the output is attached after
filetree.txt
I've updated my oblige version to 0.1.2, and was the same output which couldn't find it's path.

@Trinkle23897
Copy link

localtree.txt is the pyoblige github repo in my /home dir

@mwydmuch
Copy link
Owner

Hi @Trinkle23897,
thanks for your help so far. @mihahauke meant oblige.__path__[0] instead of oblige.path[0], but it's not that important. It seems that you have all relevant files.

With 0.1.2 I extended output when verbose option is set to True. Please run:

generator = DoomLevelGenerator()
maps = generator.generate("test.wad", verbose=True)

this should print explanation of Oblige's error.

@Trinkle23897
Copy link

Trinkle23897 commented Apr 30, 2018

verbose_server.txt
I know how is the error generated on my server...... the home dir is /media/ST\wengjiayi/trinkle and contains '\', maybe the code can't handle the character '\'.
I move it to another dir which doesn't contain '\' and works well.

On my laptop, the new version 0.1.2 works in py2.7 && py3.5, but py3.6 crashed. It outputs

Traceback (most recent call last):
File "pyoblige.py", line 12, in <module>
from vizdoom import *
File "/usr/local/lib/python3.6/site-packages/vizdoom/init.py", line 1, in <module>
from .vizdoom import version as version
ImportError: /usr/local/lib/python3.6/site-packages/vizdoom/vizdoom.so: undefined symbol: _Py_ZeroStruct

and I look at the py3.6 lib dir
n+e:/usr/local/lib/python3.5/dist-packages/vizdoom ls
bots.cfg freedoom2.wad init.py pycache scenarios vizdoom vizdoom.pk3 vizdoom.so
n+e:/usr/local/lib/python3.5/dist-packages/vizdoom ls ../../../python3.6/site-packages/vizdoom
bots.cfg freedoom2.wad init.py init.pyc scenarios vizdoom _vizdoom vizdoom.pk3 vizdoom.so
it looks fine... I don't know what's happened.

@devinjdangelo
Copy link

I had this issue as well on Ubuntu 16.04 and both python 3.5/3.6. The issue went away when I changed the directory of where to generate the WAD file to a location that did not have any spaces anywhere in the path. E.g. ~/Wad Path/test.wad fails but ~/WadPath/test.wad works fine.

@mwydmuch mwydmuch added the bug Something isn't working label May 13, 2018
@mwydmuch
Copy link
Owner

Hello @devinjdangelo, thank you for finding it out!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

7 participants