I get a "location unknown" error when I try to export my current blender file into a runtime file for playing. It seems to create an executable, but what I see running the runtime is completely different from what I see in blender.
From inside blender
From the created runtime...
The error message I'm getting out...
Copying Python files... Saving runtime to '/tmp/game4/game4'
Writing runtime... done
Traceback (most recent call last):
File "/usr/lib/blender/scripts/addons/game_engine_save_as_runtime.py", line 228, in execute
File "/usr/lib/blender/scripts/addons/game_engine_save_as_runtime.py", line 158, in WriteRuntime
CopyPythonLibs(dst, overwrite_lib, report)
File "/usr/lib/blender/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
shutil.Error: [('/usr/lib/python3.2/config', '/tmp/game4/2.62/python/lib/python3.2/config', "[Errno 21] Is a directory: '/usr/lib/python3.2/config'")]
I'm assuming this error is causing the game to not run at all since I use a lot of python controllers in the little game setup I've created. Is there something I can do to resolve this?
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