Message11323

Author psterdale
Recipients psterdale, stefan.richthofer
Date 2017-04-25.14:42:25
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1493131345.77.0.501007948283.issue2579@psf.upfronthosting.co.za>
In-reply-to
Content
Hi Stefan,
As per your suggestion with your jar when i provide absolute path it is able to load the module from pyc file.
But in production my modules and pyc files will be added to class path.
So internally jython should be able to load pyc file from path relative to its launch path.

Also if bigger module does not have pyc file its throwing below exeption


java.lang.NullPointerException

	at org.python.compiler.Module.loadPyBytecode(Module.java:740)

	at org.python.compiler.Module.compile(Module.java:925)

	at org.python.core.imp.compileSource(imp.java:367)

	at org.python.core.imp.compileSource(imp.java:352)

	at org.python.core.util.importer.getModuleCode(importer.java:229)

	at org.python.core.util.importer.importer_load_module(importer.java:102)

	at org.python.core.ClasspathPyImporter.ClasspathPyImporter_load_module(ClasspathPyImporter.java:170)

	at org.python.core.ClasspathPyImporter$ClasspathPyImporter_load_module_exposer.__call__(Unknown Source)

	at org.python.core.PyBuiltinMethodNarrow.__call__(PyBuiltinMethodNarrow.java:46)

	at org.python.core.imp.loadFromLoader(imp.java:591)

	at org.python.core.imp.find_module(imp.java:543)

	at org.python.core.PyModule.impAttr(PyModule.java:111)

	at org.python.core.imp.import_next(imp.java:837)

	at org.python.core.imp.import_module_level(imp.java:952)

	at org.python.core.imp.importName(imp.java:1043)

	at org.python.core.ImportFunction.__call__(__builtin__.java:1280)

	at org.python.core.PyObject.__call__(PyObject.java:450)

	at org.python.core.__builtin__.__import__(__builtin__.java:1232)

	at org.python.core.imp.importFromAs(imp.java:1135)

	at org.python.core.imp.importFrom(imp.java:1110)

	at ucsmsdk.ucscoreutils$py.f$0(__pyclasspath__/ucsmsdk/ucscoreutils.py:638)

	at ucsmsdk.ucscoreutils$py.call_function(__pyclasspath__/ucsmsdk/ucscoreutils.py)

	at org.python.core.PyTableCode.call(PyTableCode.java:167)

	at org.python.core.PyCode.call(PyCode.java:18)

	at org.python.core.imp.createFromCode(imp.java:432)

	at org.python.core.util.importer.importer_load_module(importer.java:116)

	at org.python.core.ClasspathPyImporter.ClasspathPyImporter_load_module(ClasspathPyImporter.java:170)

	at org.python.core.ClasspathPyImporter$ClasspathPyImporter_load_module_exposer.__call__(Unknown Source)

	at org.python.core.PyBuiltinMethodNarrow.__call__(PyBuiltinMethodNarrow.java:46)

	at org.python.core.imp.loadFromLoader(imp.java:591)

	at org.python.core.imp.find_module(imp.java:543)

	at org.python.core.PyModule.impAttr(PyModule.java:111)

	at org.python.core.PyModule.__findattr_ex__(PyModule.java:140)

	at org.python.core.PyObject.__findattr__(PyObject.java:965)

	at org.python.core.PyObject.__findattr__(PyObject.java:950)

	at org.python.core.imp.ensureFromList(imp.java:1004)

	at org.python.core.imp.ensureFromList(imp.java:978)

	at org.python.core.imp.import_module_level(imp.java:972)

	at org.python.core.imp.importName(imp.java:1043)

	at org.python.core.ImportFunction.__call__(__builtin__.java:1280)

	at org.python.core.PyObject.__call__(PyObject.java:450)

	at org.python.core.__builtin__.__import__(__builtin__.java:1232)

	at org.python.core.imp.importFromAs(imp.java:1135)

	at org.python.core.imp.importFrom(imp.java:1110)

	at ucsmsdk.ucshandle$py.f$0(__pyclasspath__/ucsmsdk/ucshandle.py:29)

	at ucsmsdk.ucshandle$py.call_function(__pyclasspath__/ucsmsdk/ucshandle.py)

	at org.python.core.PyTableCode.call(PyTableCode.java:167)

	at org.python.core.PyCode.call(PyCode.java:18)

	at org.python.core.imp.createFromCode(imp.java:432)

	at org.python.core.util.importer.importer_load_module(importer.java:116)

	at org.python.core.ClasspathPyImporter.ClasspathPyImporter_load_module(ClasspathPyImporter.java:170)

	at org.python.core.ClasspathPyImporter$ClasspathPyImporter_load_module_exposer.__call__(Unknown Source)

	at org.python.core.PyBuiltinMethodNarrow.__call__(PyBuiltinMethodNarrow.java:46)

	at org.python.core.imp.loadFromLoader(imp.java:591)

	at org.python.core.imp.find_module(imp.java:543)

	at org.python.core.PyModule.impAttr(PyModule.java:111)

	at org.python.core.imp.import_next(imp.java:837)

	at org.python.core.imp.import_logic(imp.java:897)

	at org.python.core.imp.import_module_level(imp.java:965)

	at org.python.core.imp.importName(imp.java:1043)

	at org.python.core.ImportFunction.__call__(__builtin__.java:1280)

	at org.python.core.PyObject.__call__(PyObject.java:450)

	at org.python.core.__builtin__.__import__(__builtin__.java:1232)

	at org.python.core.imp.importFromAs(imp.java:1135)

	at org.python.core.imp.importFrom(imp.java:1110)

	at org.python.pycode._pyx0.f$0(<string>:870)

	at org.python.pycode._pyx0.call_function(<string>)

	at org.python.core.PyTableCode.call(PyTableCode.java:167)

	at org.python.core.PyCode.call(PyCode.java:18)

	at org.python.core.Py.runCode(Py.java:1401)

	at org.python.core.Py.exec(Py.java:1445)

	at org.python.util.PythonInterpreter.exec(PythonInterpreter.java:267)
History
Date User Action Args
2017-04-25 14:42:25psterdalesetmessageid: <1493131345.77.0.501007948283.issue2579@psf.upfronthosting.co.za>
2017-04-25 14:42:25psterdalesetrecipients: + psterdale, stefan.richthofer
2017-04-25 14:42:25psterdalelinkissue2579 messages
2017-04-25 14:42:25psterdalecreate