curzona / opennlp-python

Python wrapper for Apache OpenNLP tools
34 stars 7 forks source link

ImportError: No module named 'xmlrpclib' #2

Open pramod2157 opened 6 years ago

pramod2157 commented 6 years ago

python2 opennlp/opennlp.py --path apache-opennlp-1.8.4

I am running open-nlp with python3. getting below error: from xmlrpclib import Transport as XMLTransport ImportError: No module named 'xmlrpclib'

tried running it with python2, getting below error: pexpect.exceptions.EOF: End Of File (EOF). Exception style platform.

can you please help me in resolving this problem?

sreenivasaupadhyaya commented 6 years ago

@pramod2157 Even I experience the same issue. Is there a solution for this?

luvwinnie commented 5 years ago

I think is could fix with pip install jsonrpclib-pelix

ruoyu-qian commented 5 years ago

@luvwinnie Thank you! That solves the problem with 'xmlrpclib'. However, I ran into a new error:

Traceback (most recent call last): File "my path to\opennlp/opennlp.py", line 8, in if os.environ.has_key('OPENNLP'): AttributeError: '_Environ' object has no attribute 'has_key'

Does anyone know how to fix this?

itsmemala commented 4 years ago

You need to replace the "os.eniron.has_key('OPENNLP')" with " 'OPENNLP' in os.environ". has_key is no longer available in python 3. Doing this resolved the error for me.

itsmemala commented 4 years ago

However when I tun the opennlp.py file form command line, I get the "Starting OpenNLP" message and it just hangs there. Any issues ?