VS doesn't load right -- ImportError on modules/vsrandom.py

Trying to build your own version of Vega Strike and having problems? Unix users, paste your config.log here (stderr output alone is not helpful).

VS doesn't load right -- ImportError on modules/vsrandom.py

Postby ermo » Sun Jul 28, 2013 12:05 pm

I'm seeing some interesting behaviour with my locally compiled r13636, as it appears that the statement "from __future__ import print_function" fails when loading the game, yet it works fine when executed in a python 2.7.5 interpreter started from the command line on the same system. I used the system boost and installed boost-devel, which pulls in boost-python, which is presumably linked against python-2.7.5 (how do I double check this?).

Here's what the standard game log looks like with a small patch which shows the python version that runs the script which fails after I run (a symbolic link to) "./vegastrike" in data/:

Code: Select all
Registering codec ogg.
 In path /home/ermo/VegaStrike/trunk/vegastrike/build
Vega Strike 
See http://www.gnu.org/copyleft/gpl.html for license details.

GOT SUBDIR ARG =
Found data in /home/ermo/VegaStrike/trunk/data
Using /home/ermo/VegaStrike/trunk/data as data directory
Using .vegastrike as the home directory
Found MODDIR = /home/ermo/VegaStrike/trunk/data/mods
USING HOMEDIR : /home/ermo/.vegastrike As the home directory
CONFIGFILE - Found a config file in home directory, using : /home/ermo/.vegastrike/vegastrike.config
DATADIR - No datadir specified in config file, using ; /home/ermo/VegaStrike/trunk/data
SIMULATION_ATOM: 0.01
MISSION_NAME is empty using : main_menu.mission
running import sys
print(sys.path)
sys.path = ["",r"/home/ermo/VegaStrike/trunk/data/modules/builtin",r"/home/ermo/VegaStrike/trunk/data/modules/quests",r"/home/ermo/VegaStrike/trunk/data/modules/missions",r"/home/ermo/VegaStrike/trunk/data/modules/ai",r"/home/ermo/VegaStrike/trunk/data/modules",r"/home/ermo/VegaStrike/trunk/data/bases"] + sys.path
testing VS randomrunning import sys
print(sys.path)
['/usr/lib64/python27.zip', '/usr/lib64/python2.7/', '/usr/lib64/python2.7/plat-linux2', '/usr/lib64/python2.7/lib-tk', '/usr/lib64/python2.7/lib-old', '/usr/lib64/python2.7/lib-dynload']
['', '/home/ermo/VegaStrike/trunk/data/modules/builtin', '/home/ermo/VegaStrike/trunk/data/modules/quests', '/home/ermo/VegaStrike/trunk/data/modules/missions', '/home/ermo/VegaStrike/trunk/data/modules/ai', '/home/ermo/VegaStrike/trunk/data/modules', '/home/ermo/VegaStrike/trunk/data/bases', '/usr/lib64/python27.zip', '/usr/lib64/python2.7/', '/usr/lib64/python2.7/plat-linux2', '/usr/lib64/python2.7/lib-tk', '/usr/lib64/python2.7/lib-old', '/usr/lib64/python2.7/lib-dynload']
Creating scene manager...
Creating template manager...
  Initializing renderer...
0 joysticks were found.

The names of the joysticks are:
radeon: Acquired access to Hyper-Z.
FactionXML:LoadXML factions.xml
Min (0.000000, 0.000000, 0.000000) Max(0.000000, 0.000000, 0.000000) MinLumin 1.000000, MaxLumin 1.000000Read In Star Count 0 used: 2000
Min (0.000000, 0.000000, 0.000000) Max(0.000000, 0.000000, 0.000000) MinLumin 1.000000, MaxLumin 1.000000Read In Star Count 0 used: 38
using NV_CUBE_MAP
Loading a starsystem
Loading Star System Special/Empty
FOUND MODIFICATION = player FOR PLAYER #0
CREATING A LOCAL SHIP : dumbfire
Hi helper play 0
HereInitializing optimizer
Compilation of technique fixed successful
Compilation of technique default successful
Compilation of technique default_simple successful
pox 119990000000.000000 -9000000.000000 -109990000000.000000

!! --
!!
!! vsrandom.py is being interpreted by python version:

2.7.5 (default, Jul  8 2013, 09:48:59)
[GCC 4.8.1 20130603 (Red Hat 4.8.1-1)]

!! and the python sys.path looks like this:

['', '/home/ermo/VegaStrike/trunk/data/modules/builtin', '/home/ermo/VegaStrike/trunk/data/modules/quests', '/home/ermo/VegaStrike/trunk/data/modules/missions', '/home/ermo/VegaStrike/trunk/data/modules/ai', '/home/ermo/VegaStrike/trunk/data/modules', '/home/ermo/VegaStrike/trunk/data/bases', '/usr/lib64/python27.zip', '/usr/lib64/python2.7/', '/usr/lib64/python2.7/plat-linux2', '/usr/lib64/python2.7/lib-tk', '/usr/lib64/python2.7/lib-old', '/usr/lib64/python2.7/lib-dynload']

!! --

Traceback (most recent call last):
  File "main_menunightprivateer.py", line 7, in <module>
  File "/home/ermo/VegaStrike/trunk/data/bases/computer_lib.py", line 5, in <module>
    import universe
  File "/home/ermo/VegaStrike/trunk/data/modules/universe.py", line 9, in <module>
    import vsrandom
  File "/home/ermo/VegaStrike/trunk/data/modules/vsrandom.py", line 74, in <module>
    from __future__ import print_function, division
ImportError: cannot import name print_function
ERROR: there are no rooms in basefile "main_menunight.py" ...
Traceback (most recent call last):
  File "<string>", line 8, in <module>
  File "/home/ermo/VegaStrike/trunk/data/modules/missions/privateer.py", line 1, in <module>
    from trading import trading
  File "/home/ermo/VegaStrike/trunk/data/modules/trading.py", line 2, in <module>
    import vsrandom
  File "/home/ermo/VegaStrike/trunk/data/modules/vsrandom.py", line 74, in <module>
    from __future__ import print_function, division
ImportError: cannot import name print_function
Force feedback support disabled when compiled
Loading completed, now network init
Loading active missions True
radeon: Released access to Hyper-Z.
Shutting down renderer...
Thank you for playing!
Writing Save Game Autosave-main_menuHi helper play 0
AL lib: (WW) FreeDevice: (0x25407b0) Deleting 1 Buffer(s)
Here
Attachments
verbose_import_of_vsrandom.patch
modifies the output to explicitly show the python interpreter used to import the vsrandom.py script
(743 Bytes) Downloaded 83 times
Privateer: Wing Commander Universe -- the continuation of chuck_starchaser's Privateer: Parallel Universe mod.
ermo
Mercenary
Mercenary
 
Posts: 104
Topics: 5
Joined: Tue Oct 30, 2012 12:46 pm

Share On:

Share on Facebook Facebook Share on Twitter Twitter Share on Digg Digg

Re: VS doesn't load right -- ImportError on modules/vsrandom

Postby klauss » Sun Jul 28, 2013 2:37 pm

You can also tell it's using 2.7 by checking the include path (it points to 2.7).

It's certainly weird behavior. Weird and distribution-specific.

Please attach your CMakeCache.txt (it's in the build folder), and the link command right at the end of a verbose build. That should hold the detail of what is linked to what.

Also some detailed info about your distribution and related package versions, so I may check their sources to see if they have anything nonstandard in them.
Oíd mortales, el grito sagrado...
Call me "Menes, lord of Cats"
Wing Commander Universe
User avatar
klauss
Elite
Elite
 
Posts: 7243
Topics: 55
Joined: Mon Apr 18, 2005 7:40 am
Location: LS87, Buenos Aires, República Argentina

Re: VS doesn't load right -- ImportError on modules/vsrandom

Postby ermo » Mon Jul 29, 2013 11:45 am

I just re-installed my f19 OS on the same box and then re-downloaded the VS trunk source and compiled it.

The result? No issues whatsoever, so my installation must have been partially corrupt (it was an old install, which had been upgraded from a prior version of fedora).

Case closed as far as I'm concerned.
Privateer: Wing Commander Universe -- the continuation of chuck_starchaser's Privateer: Parallel Universe mod.
ermo
Mercenary
Mercenary
 
Posts: 104
Topics: 5
Joined: Tue Oct 30, 2012 12:46 pm

Re: VS doesn't load right -- ImportError on modules/vsrandom

Postby klauss » Mon Jul 29, 2013 11:54 am

So... the windows treatment worked :?

Cool that it works tho :)
Oíd mortales, el grito sagrado...
Call me "Menes, lord of Cats"
Wing Commander Universe
User avatar
klauss
Elite
Elite
 
Posts: 7243
Topics: 55
Joined: Mon Apr 18, 2005 7:40 am
Location: LS87, Buenos Aires, República Argentina

Re: VS doesn't load right -- ImportError on modules/vsrandom

Postby loki1950 » Mon Jul 29, 2013 1:39 pm

klauss wrote:So... the windows treatment worked :?

Cool that it works tho :)


Not really fedora has always recommended clean installs and has only recently introduced a distro update system and results have been a bit mixed that's just from my own experience and fedora forum reading over the years since fedora core 3 :|

Enjoy the Choice :)
my box::HP Envy i5-6400 @2Q70GHzx4 8 Gb ram/1 Tb(Win10 64)/3 Tb Mint 18/GTX745 4Gb acer S243HL K222HQL
Q8200/Asus P5QDLX/8 Gb ram/WD 2Tb 2-500 G HD/GF GT640 2Gb Mint 17.3 64 bit Win 10 32 bit acer and DELL E6400 4GB ram/100 GB HD Mint 17.3 6
User avatar
loki1950
The Shepherd
 
Posts: 5723
Topics: 51
Joined: Fri May 13, 2005 1:37 pm
Location: Ottawa

Re: VS doesn't load right -- ImportError on modules/vsrandom

Postby pheonixstorm » Mon Jul 29, 2013 10:42 pm

klauss wrote:So... the windows treatment worked :?

Cool that it works tho :)


Hope the "windows" treatment doesn't become a trend for other linux distros :roll:
Because of YOU Arbiter, MY kids? can't get enough gas. OR NIPPLE! How does that mkae you feeeel? ~ Halo
User avatar
pheonixstorm
Elite
Elite
 
Posts: 1567
Topics: 113
Joined: Mon Jan 25, 2010 7:03 pm



Return to Compiling Problems [paste config.log]

Who is online

Users browsing this forum: No registered users and 1 guest

cron