Can't create atlas files when using unknown-horizons-git from AUR #2716

Open
a123qwertz567 opened this Issue Jun 11, 2017 · 17 comments

Comments

Projects
None yet
5 participants
@a123qwertz567

a123qwertz567 commented Jun 11, 2017

Edit (squiddy): Was ModuleNotFoundError: No module named 'run_uh'

When I start the game to main menu I get this error. I have serious perfomance hits and lags in the scenario, too. The lags appear when I have about 200-250 population and half of the island full with production buildings.

Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/horizons/engine/generate_atlases.py", line 64, in <module>
    from run_uh import init_environment # isort:skip
ModuleNotFoundError: No module named 'run_uh'
Atlas generation failed. Continuing without atlas support.
This just means that the game will run a bit slower.
It will still run fine unless there are other problems.

connect(2) call to /dev/shm/jack-1000/default/jack_0 failed (err=No such file or directory)
attempt to connect to server failed
^C
Oh my god! They killed UH. 
You bastards!
AL lib: (EE) alc_cleanup: 1 device not closed

Last part is probaly from me killing the program in the terminal :)

My setup:

  • Installed git version via AUR
  • Linux manjaro.network 4.7.10-1-MANJARO #1 SMP PREEMPT Sat Oct 22 19:15:11 UTC 2016 x86_64 GNU/Linux
  • Intel(R) Core(TM) i5-4670 CPU @ 3.40GHz
  • 12 GB RAM
  • AMD RX 480 with xf86-video-amdgpu 1.3.0-1
@a123qwertz567

This comment has been minimized.

Show comment
Hide comment
@a123qwertz567

a123qwertz567 Jun 12, 2017

The thing is, I cant find any reference in the repo to this module...can I install it by hand? Where should it me included?

The thing is, I cant find any reference in the repo to this module...can I install it by hand? Where should it me included?

@LinuxDonald

This comment has been minimized.

Show comment
Hide comment
@LinuxDonald

LinuxDonald Jun 12, 2017

Member

Are you using fifechan-git/fife-git/unknown-horizons-git packages? With lastest changes?

Member

LinuxDonald commented Jun 12, 2017

Are you using fifechan-git/fife-git/unknown-horizons-git packages? With lastest changes?

@a123qwertz567

This comment has been minimized.

Show comment
Hide comment
@a123qwertz567

a123qwertz567 Jun 12, 2017

Quick answer: I installed this with yaourt from AUR. I will do some digging.

EDIT:

manjaro@> yaourt -Ss unknown-horizons-git  | grep installed
aur/unknown-horizons-git 2017.2.373.g8319a4773-1 [installed: 2017.2.746.gfe451b8a1-1] (49) (0.01)

From AUR:
Last Updated: 2017-04-19 21:11

But for me it looks like the pkgbuild builds directly from the git repo.

a123qwertz567 commented Jun 12, 2017

Quick answer: I installed this with yaourt from AUR. I will do some digging.

EDIT:

manjaro@> yaourt -Ss unknown-horizons-git  | grep installed
aur/unknown-horizons-git 2017.2.373.g8319a4773-1 [installed: 2017.2.746.gfe451b8a1-1] (49) (0.01)

From AUR:
Last Updated: 2017-04-19 21:11

But for me it looks like the pkgbuild builds directly from the git repo.

@squiddy

This comment has been minimized.

Show comment
Hide comment
@squiddy

squiddy Jun 12, 2017

Member

The thing is, I cant find any reference in the repo to this module...can I install it by hand? Where should it me included?

That file is contained in the root directory of this repo, run_uh.py. The thing is, according to it's content, the main code under horizons can be somewhere else in the filesystem than the launcher. Which is fine, because in run_uh.py we're trying to figure out where the rest of the code is.

However, once we're in the horizons code, we can't possible figure out where run_uh is..

We should move more code into horizons, that makes the code size of run_uh smaller and should avoid such problems.

Member

squiddy commented Jun 12, 2017

The thing is, I cant find any reference in the repo to this module...can I install it by hand? Where should it me included?

That file is contained in the root directory of this repo, run_uh.py. The thing is, according to it's content, the main code under horizons can be somewhere else in the filesystem than the launcher. Which is fine, because in run_uh.py we're trying to figure out where the rest of the code is.

However, once we're in the horizons code, we can't possible figure out where run_uh is..

We should move more code into horizons, that makes the code size of run_uh smaller and should avoid such problems.

@a123qwertz567

This comment has been minimized.

Show comment
Hide comment
@a123qwertz567

a123qwertz567 Jun 12, 2017

Can anyone say something to this part of my post?

I have serious perfomance hits and lags in the scenario, too. The lags appear when I have about 200-250 population and half of the island full with production buildings.

The game gets really unplayable. Is this normal or just my setup?

Can anyone say something to this part of my post?

I have serious perfomance hits and lags in the scenario, too. The lags appear when I have about 200-250 population and half of the island full with production buildings.

The game gets really unplayable. Is this normal or just my setup?

@LinuxDonald

This comment has been minimized.

Show comment
Hide comment
@LinuxDonald

LinuxDonald Jun 12, 2017

Member

For testing I would need your savegame that slow down the game.

Member

LinuxDonald commented Jun 12, 2017

For testing I would need your savegame that slow down the game.

squiddy added a commit that referenced this issue Jun 12, 2017

Remove init_environment call when generating atlases
Passing False means that we don't want to setup fife, which is all that
function is doing anyway.

This import probably caused some problems when the git version of the
game is installed in the system. While run_uh.py has no problem
importing horizons (it is in sys.path after all), the other way around
doesn't work. When inside horizons code, we don't know where run_uh.py
actually is, and the current working directory might not be in sys.path.

See #2716
@squiddy

This comment has been minimized.

Show comment
Hide comment
@squiddy

squiddy Jun 12, 2017

Member

@a123qwertz567 If you could re-install that package and try again, I just pushed a change that should fix the error you're seeing. If all is well, atlases should then be generated on your system, helping with performance.

Member

squiddy commented Jun 12, 2017

@a123qwertz567 If you could re-install that package and try again, I just pushed a change that should fix the error you're seeing. If all is well, atlases should then be generated on your system, helping with performance.

@a123qwertz567

This comment has been minimized.

Show comment
Hide comment
@a123qwertz567

a123qwertz567 Jun 12, 2017

@LinuxDonald I will first try squiddys suggestion maybe this avoids some work for you

@squiddy with a reinstall I got 3 new dependencies:
Packages (3) python2-olefile-0.43-2 python2-pillow-4.1.1-1 python2-yaml-3.12-2
But the simple reinstall yaourt -S unknown-horizons-git gave a dependency cycle between fife-git and fifechan-git . I had to perform a complete uninstall and install.

Finally you were right the message disapeared. But a new one came up:

manjaro@> unknown-horizons 
Recreating all atlases
Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/horizons/engine/generate_atlases.py", line 428, in <module>
    generator.recreate()
  File "/usr/lib/python3.6/site-packages/horizons/engine/generate_atlases.py", line 266, in recreate
    self.save()
  File "/usr/lib/python3.6/site-packages/horizons/engine/generate_atlases.py", line 216, in save
    with open(PATHS.ATLAS_DB_PATH, 'w') as atlas_db_file:
PermissionError: [Errno 13] Permission denied: 'content/atlas.sql'
Atlas generation failed. Continuing without atlas support.
This just means that the game will run a bit slower.
It will still run fine unless there are other problems.

connect(2) call to /dev/shm/jack-1000/default/jack_0 failed (err=No such file or directory)
attempt to connect to server failed

Despite this fact the game was fine for the 10 minutes a played, some mini-lags (I think the autosave?!) but thegame was playable. I will do some more testing soon.

Would it maybe be better if I build directly from git? Shouldn't make a difference...?

@LinuxDonald I will first try squiddys suggestion maybe this avoids some work for you

@squiddy with a reinstall I got 3 new dependencies:
Packages (3) python2-olefile-0.43-2 python2-pillow-4.1.1-1 python2-yaml-3.12-2
But the simple reinstall yaourt -S unknown-horizons-git gave a dependency cycle between fife-git and fifechan-git . I had to perform a complete uninstall and install.

Finally you were right the message disapeared. But a new one came up:

manjaro@> unknown-horizons 
Recreating all atlases
Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/horizons/engine/generate_atlases.py", line 428, in <module>
    generator.recreate()
  File "/usr/lib/python3.6/site-packages/horizons/engine/generate_atlases.py", line 266, in recreate
    self.save()
  File "/usr/lib/python3.6/site-packages/horizons/engine/generate_atlases.py", line 216, in save
    with open(PATHS.ATLAS_DB_PATH, 'w') as atlas_db_file:
PermissionError: [Errno 13] Permission denied: 'content/atlas.sql'
Atlas generation failed. Continuing without atlas support.
This just means that the game will run a bit slower.
It will still run fine unless there are other problems.

connect(2) call to /dev/shm/jack-1000/default/jack_0 failed (err=No such file or directory)
attempt to connect to server failed

Despite this fact the game was fine for the 10 minutes a played, some mini-lags (I think the autosave?!) but thegame was playable. I will do some more testing soon.

Would it maybe be better if I build directly from git? Shouldn't make a difference...?

@squiddy

This comment has been minimized.

Show comment
Hide comment
@squiddy

squiddy Jun 12, 2017

Member

Would it maybe be better if I build directly from git? Shouldn't make a difference...?

If you would run directly from git it should work. That is:

$ git clone git://github.com/unknown-horizons/unknown-horizons.git
$ cd unknown-horizons
$ python run_uh.py

This is a weird situation: Typically users will install a regular release, and the atlas files will be included already. For developers, running from git directly will create the atlas files.

Here we're trying to run a development version of UH that has been installed systemwide. And I'm guessing it is now attempting to write the generated atlas files into wherever the content dir is, probably /usr/share/something, giving us the PermissionError.

Member

squiddy commented Jun 12, 2017

Would it maybe be better if I build directly from git? Shouldn't make a difference...?

If you would run directly from git it should work. That is:

$ git clone git://github.com/unknown-horizons/unknown-horizons.git
$ cd unknown-horizons
$ python run_uh.py

This is a weird situation: Typically users will install a regular release, and the atlas files will be included already. For developers, running from git directly will create the atlas files.

Here we're trying to run a development version of UH that has been installed systemwide. And I'm guessing it is now attempting to write the generated atlas files into wherever the content dir is, probably /usr/share/something, giving us the PermissionError.

@a123qwertz567

This comment has been minimized.

Show comment
Hide comment
@a123qwertz567

a123qwertz567 Jun 14, 2017

Runs without the error. I will play a little bit to check the performance.

manjaro@> python run_uh.py 
Recreating all atlases
connect(2) call to /dev/shm/jack-1000/default/jack_0 failed (err=No such file or directory)
attempt to connect to server failed
Thank you for using Unknown Horizons!
manjaro@> 

Maybe the AUR package can create the atlases during the installation when the installer has permissions to write on /usr/share/whatever.

Runs without the error. I will play a little bit to check the performance.

manjaro@> python run_uh.py 
Recreating all atlases
connect(2) call to /dev/shm/jack-1000/default/jack_0 failed (err=No such file or directory)
attempt to connect to server failed
Thank you for using Unknown Horizons!
manjaro@> 

Maybe the AUR package can create the atlases during the installation when the installer has permissions to write on /usr/share/whatever.

@squiddy

This comment has been minimized.

Show comment
Hide comment
@squiddy

squiddy Jun 15, 2017

Member

Glad it works now.

Maybe the AUR package can create the atlases during the installation when the installer has permissions to write on /usr/share/whatever.

Sounds like a good idea. Can we do that @LinuxDonald?

Member

squiddy commented Jun 15, 2017

Glad it works now.

Maybe the AUR package can create the atlases during the installation when the installer has permissions to write on /usr/share/whatever.

Sounds like a good idea. Can we do that @LinuxDonald?

@LinuxDonald

This comment has been minimized.

Show comment
Hide comment
@LinuxDonald

LinuxDonald Jun 15, 2017

Member

I will take an look at it. But I think it should work :-)

Member

LinuxDonald commented Jun 15, 2017

I will take an look at it. But I think it should work :-)

@squiddy squiddy changed the title from ModuleNotFoundError: No module named 'run_uh' to Can't create atlas files when using unknown-horizons-git from AUR Jun 15, 2017

@squiddy squiddy added the O-macOS label Jun 18, 2017

@AndyMender

This comment has been minimized.

Show comment
Hide comment
@AndyMender

AndyMender Sep 16, 2017

Member

@LinuxDonald still an issue or was it fixed?

Member

AndyMender commented Sep 16, 2017

@LinuxDonald still an issue or was it fixed?

@LinuxDonald

This comment has been minimized.

Show comment
Hide comment
@LinuxDonald

LinuxDonald Sep 16, 2017

Member

not yet fixed

Member

LinuxDonald commented Sep 16, 2017

not yet fixed

@jmdejong jmdejong removed the O-macOS label May 6, 2018

@LinuxDonald

This comment has been minimized.

Show comment
Hide comment
@LinuxDonald

LinuxDonald May 16, 2018

Member

Completely forgotten this...

Member

LinuxDonald commented May 16, 2018

Completely forgotten this...

@LinuxDonald LinuxDonald added this to the 2018.1 milestone May 16, 2018

@jmdejong

This comment has been minimized.

Show comment
Hide comment
@jmdejong

jmdejong May 17, 2018

Contributor

I think a simple python3 horizons/engine/generate_atlases.py 2048 could solve this.
Should it be fixed in PKGBUILD or in setup.py?

Contributor

jmdejong commented May 17, 2018

I think a simple python3 horizons/engine/generate_atlases.py 2048 could solve this.
Should it be fixed in PKGBUILD or in setup.py?

@LinuxDonald

This comment has been minimized.

Show comment
Hide comment
@LinuxDonald

LinuxDonald May 17, 2018

Member

I think in setup.py it would be better than all Linux distros could use it.

Member

LinuxDonald commented May 17, 2018

I think in setup.py it would be better than all Linux distros could use it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment