Export save as game engine run time errors.

Every time I go to use the export>> save as game engine run time the script fails. It gives me an error that says:

Traceback (most recent call last):
  File "/usr/share/blender/2.62/scripts/addons/game_engine_save_as_runtime.py", line 228, in execute
    self.report,
  File "/usr/share/blender/2.62/scripts/addons/game_engine_save_as_runtime.py", line 158, in WriteRuntime
    CopyPythonLibs(dst, overwrite_lib, report)
  File "/usr/share/blender/2.62/scripts/addons/game_engine_save_as_runtime.py", line 62, in CopyPythonLibs
    shutil.copytree(src, dst, ignore=lambda dir, contents: [i for i in contents if i == '__pycache__'])
  File "/usr/lib/python3.2/shutil.py", line 239, in copytree
    raise Error(errors)
shutil.Error: [('/usr/lib/python3.2/config', '/home/eddie/My Blends/TerrainScene/2.62/python/lib/python3.2/config', "[Errno 21] Is a directory: '/usr/lib/python3.2/config'")]

If I copy all the libraries manually, and run the export again with the overwrite lib option disabled I don’t get any errors. That is until I try to run the executable that it produces. If I run from a console I am able to retrieve this error:

 [email protected]:~/My Blends/TerrainScene$ ./terrain1 
connect failed: No such file or directory
ndof: spacenavd not found
usage:   /usr/bin/blenderplayer-bin [-w [w h l t]] [-f [fw fh fb ff]] [-g gamengineoptions] [-s stereomode] [-m aasamples] filename.blend
  -h: Prints this command summary

  -w: display in a window
       --Optional parameters--
       w = window width
       h = window height

       l = window left coordinate
       t = window top coordinate
       Note: If w or h is defined, both must be defined.
          Also, if l or t is defined, all options must be used.

  -f: start game in full screen mode
       --Optional parameters--
       fw = full screen mode pixel width
       fh = full screen mode pixel height

       fb = full screen mode bits per pixel
       ff = full screen mode frequency
       Note: If fw or fh is defined, both must be defined.
          Also, if fb is used, fw and fh must be used. ff requires all options.

  -s: start player in stereo
       stereomode: hwpageflip       (Quad buffered shutter glasses)
                   syncdoubling     (Above Below)
                   sidebyside       (Left Right)
                   anaglyph         (Red-Blue glasses)
                   vinterlace       (Vertical interlace for autostereo display)
                             depending on the type of stereo you want

  -D: start player in dome mode
       --Optional parameters--
       angle    = field of view in degrees
       tilt     = tilt angle in degrees
       warpdata = a file to use for warping the image (absolute path)
       mode: fisheye                (Fisheye)
             truncatedfront         (Front-Truncated)
             truncatedrear          (Rear-Truncated)
             cubemap                (Cube Map)
             sphericalpanoramic     (Spherical Panoramic)
                             depending on the type of dome you are using

  -m: maximum anti-aliasing (eg. 2,4,8,16)

  -i: parent windows ID

  -d: turn debugging on

  -g: game engine options:

       Name                       Default      Description
       ------------------------------------------------------------------------
       fixedtime                      0         "Enable all frames"
       nomipmap                       0         Disable mipmaps
       show_framerate                 0         Show the frame rate
       show_properties                0         Show debug properties
       show_profile                   0         Show profiling information
       blender_material               0         Enable material settings
       ignore_deprecation_warnings    1         Ignore deprecation warnings

  - : all arguments after this are ignored, allowing python to access them from sys.argv

example: /usr/bin/blenderplayer-bin -w 320 200 10 10 -g noaudio/home/user/filename.blend
example: /usr/bin/blenderplayer-bin -g show_framerate = 0 /home/user/filename.blend
example: /usr/bin/blenderplayer-bin -i 232421 -m 16 /home/user/filename.blend

Segmentation fault
./terrain1: 14: Syntax error: ";;" unexpected

The game itself does nothing except produce a small window for a very short moment.

I have tried this on many computers through many different versions of Blender. I am currently using Blender 2.62 on Ubuntu 11.10. I have tried on Windows too. I didn’t want to post this as a bug because I haven’t seen anyone else with this problem. I figure maybe I am doing some thing wrong.

Really no one else has this problem?

no they do theres just not an answer yet im having the same problem im running blender 2.59 on ubuntu 11.10

There’s an issue with symbolic links. I’ll try to be as clear as I can. Linux has a feature called “likns” such liks are ways to avoid copying a file many times. For instance suppose I have a program that looks for a known function inside a library. This program will look for that file in a certain directory. However said library might be installed some where else. To avoid that you create a link in the folder that the program will look for and you lik it where the real library is. For some reason I can’t get shutil.copytree is not working fine in your and my coputer when it comes to symbolic links (a type of link). Maybe this was fixed in a later version. Therefore each time the directory “/usr/lib/python3.2/config” is called you get an error since that directory is a symbolic link.

I add " , ignore_dangling_symlinks=True" in line 63 of the game_engine_save_as_runtime.py before the final parenthesis. That python script can be found in /usr/lib/blender/scripts/addons. you will need super user permits toedit the file.

You should replace with:

            shutil.copytree(src, dst, symlinks=False, ignore=lambda dir, contents: [i for i in contents if i == '__pycache__'], ignore_dangling_symlinks=True)

where you read

            shutil.copytree(src, dst, symlinks=False,  ignore=lambda dir, contents: [i for i in contents if i ==  '__pycache__'])

I’m still verifing if this works so stay in touch

There’s an issue with symbolic links. I’ll try to be as clear as I can. Linux has a feature called “likns” such liks are ways to avoid copying a file many times. For instance suppose I have a program that looks for a known function inside a library. This program will look for that file in a certain directory. However said library might be installed some where else. To avoid that you create a link in the folder that the program will look for and you lik it where the real library is. For some reason I can’t get shutil.copytree is not working fine in your and my coputer when it comes to symbolic links (a type of link). Maybe this was fixed in a later version. Therefore each time the directory “/usr/lib/python3.2/config” is called you get an error since that directory is a symbolic link.

I add " , ignore_dangling_symlinks=True" in line 63 of the game_engine_save_as_runtime.py before the final parenthesis. That python script can be found in /usr/lib/blender/scripts/addons. you will need super user permits toedit the file.

You should replace with:

            shutil.copytree(src, dst, symlinks=False, ignore=lambda dir, contents: [i for i in contents if i == '__pycache__'], ignore_dangling_symlinks=True)

where you read

            shutil.copytree(src, dst, symlinks=False,  ignore=lambda dir, contents: [i for i in contents if i ==  '__pycache__'])

I’m still verifing if this works so stay in touch

I think this is not a real solution but i have the Feeling that it works better - At least for me.

Copy the game_engine_save_as_runtime.py from the beta release to the normal release. The beta at all is crashing often.