Anthony Hsu created PIG-4163:
--------------------------------

             Summary: Jython/Python: Import module from jar fails
                 Key: PIG-4163
                 URL: https://issues.apache.org/jira/browse/PIG-4163
             Project: Pig
          Issue Type: Bug
            Reporter: Anthony Hsu


Example:
* test.pig
{code}
register 'my.jar';
register 'test.py' using jython as myfuncs;
{code}
* test.py
{code}
import sys
sys.path.append('/path/to/my.jar')
print sys.path
from foo.package import mymodule
{code}

Running
{code}
pig test.pig
{code}
leads to an error
{code}
org.apache.pig.tools.grunt.Grunt - ERROR 1121: Python Error. Traceback (most 
recent call last):
  File "test.py", line 4, in <module>
    from foo.package import mymodule
ImportError: No module named foo
{code}
I see my jar on the sys.path I print out, yet I still get an ImportError.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to