To reproduce:
Make this file structure:
test
main.py
someFolder
test.py
in test.py put any import (such as "import os")
main.py can be empty
run packp3d, something like this:
Craig:Panda Craig$ panda3d /Developer/Panda3D/lib/direct/p3d/packp3d.p3d -o x.p3d -d test
Traceback (most recent call last):
File "/Users/rdb/pandaworker/panda3d-1.7.0/built_cmu/direct/showbase/Messenger.py", line 352, in __taskChainDispatch
File "/Users/rdb/pandaworker/panda3d-1.7.0/built_cmu/direct/showbase/Messenger.py", line 410, in __dispatch
File "/Users/rdb/pandaworker/panda3d-1.7.0/built_cmu/direct/p3d/AppRunner.py", line 493, in __startIfReady
File "VFSImporter", line 153, in load_module
File "/Users/rdb/pandaworker/panda3d-1.7.0/built_cmu/direct/p3d/packp3d.py", line 219, in <module>
File "/Users/rdb/pandaworker/panda3d-1.7.0/built_cmu/direct/p3d/packp3d.py", line 209, in makePackedApp
File "/Users/rdb/pandaworker/panda3d-1.7.0/built_cmu/direct/p3d/Packager.py", line 2352, in endPackage
File "/Users/rdb/pandaworker/panda3d-1.7.0/built_cmu/direct/p3d/Packager.py", line 403, in close
File "/Users/rdb/pandaworker/panda3d-1.7.0/built_cmu/direct/p3d/Packager.py", line 493, in installMultifile
File "/Users/rdb/pandaworker/panda3d-1.7.0/built_cmu/direct/showutil/FreezeTool.py", line 845, in done
File "/Users/rdb/pandaworker/panda3d-1.7.0/built_cmu/direct/showutil/FreezeTool.py", line 919, in __loadModule
File "/Users/rdb/pandaworker/panda3d-1.7.0/built_cmu/direct/showutil/FreezeTool.py", line 1358, in load_module
File "/Users/rdb/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/modulefinder.py", line 305, in load_module
File "/Users/rdb/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/modulefinder.py", line 414, in scan_code
File "/Users/rdb/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/modulefinder.py", line 323, in _safe_import_hook
File "/Users/rdb/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/modulefinder.py", line 125, in import_hook
File "/Users/rdb/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/modulefinder.py", line 162, in determine_parent
KeyError: 'someFolder'
:task(error): Exception occurred in PythonTask Messenger-default
Traceback (most recent call last):
File "/Users/rdb/pandaworker/panda3d-1.7.0/built_cmu/direct/p3d/AppRunner.py", line 411, in run
File "/Users/rdb/pandaworker/panda3d-1.7.0/built_cmu/direct/task/Task.py", line 496, in run
File "/Users/rdb/pandaworker/panda3d-1.7.0/built_cmu/direct/task/Task.py", line 454, in step
File "/Users/rdb/pandaworker/panda3d-1.7.0/built_cmu/direct/showbase/Messenger.py", line 352, in __taskChainDispatch
File "/Users/rdb/pandaworker/panda3d-1.7.0/built_cmu/direct/showbase/Messenger.py", line 410, in __dispatch
File "/Users/rdb/pandaworker/panda3d-1.7.0/built_cmu/direct/p3d/AppRunner.py", line 493, in __startIfReady
File "VFSImporter", line 153, in load_module
File "/Users/rdb/pandaworker/panda3d-1.7.0/built_cmu/direct/p3d/packp3d.py", line 219, in <module>
File "/Users/rdb/pandaworker/panda3d-1.7.0/built_cmu/direct/p3d/packp3d.py", line 209, in makePackedApp
File "/Users/rdb/pandaworker/panda3d-1.7.0/built_cmu/direct/p3d/Packager.py", line 2352, in endPackage
File "/Users/rdb/pandaworker/panda3d-1.7.0/built_cmu/direct/p3d/Packager.py", line 403, in close
File "/Users/rdb/pandaworker/panda3d-1.7.0/built_cmu/direct/p3d/Packager.py", line 493, in installMultifile
File "/Users/rdb/pandaworker/panda3d-1.7.0/built_cmu/direct/showutil/FreezeTool.py", line 845, in done
File "/Users/rdb/pandaworker/panda3d-1.7.0/built_cmu/direct/showutil/FreezeTool.py", line 919, in __loadModule
File "/Users/rdb/pandaworker/panda3d-1.7.0/built_cmu/direct/showutil/FreezeTool.py", line 1358, in load_module
File "/Users/rdb/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/modulefinder.py", line 305, in load_module
File "/Users/rdb/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/modulefinder.py", line 414, in scan_code
File "/Users/rdb/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/modulefinder.py", line 323, in _safe_import_hook
File "/Users/rdb/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/modulefinder.py", line 125, in import_hook
File "/Users/rdb/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/modulefinder.py", line 162, in determine_parent
KeyError: 'someFolder'
Successfully joined thread: 0
Failure on startup.
Craig:Panda Craig$
Any python file not at the root level or in a package that contains any import will cause an error like this as far as I know.
Noted. I will submit a fix. In the meantime, I expect this can be resolved by placing an empty __init__.py in someFolder, thus making someFolder a proper Python package.