salesforce-python-client / pyforce

A fork of the salesforce beatbox client.
GNU General Public License v2.0
26 stars 24 forks source link

ModuleNotFoundError: No module named 'xmlclient' #36

Closed MappingSuite closed 4 years ago

MappingSuite commented 5 years ago

Environment: Windows 10 64 bits.

Python 3.6.5 :: Anaconda, Inc. (the one installed with Spyder)

A simple test file test.py: import pyforce

Launching: > python test.py

An error:

Traceback (most recent call last): File "test.py", line 1, in import pyforce File "C:\ProgramData\Anaconda3\lib\site-packages\pyforce__init__.py", line 3, in from xmlclient import _tPartnerNS, _tSObjectNS, _tSoapNS, SoapFaultError,\ ModuleNotFoundError: No module named 'xmlclient'

MappingSuite commented 5 years ago

Same issue, same error on Linux Ubuntu 16.04LTS 64 bits

Python 3.5.2

import pyforce

File "/home/xxxx/.local/lib/python3.5/site-packages/pyforce/init.py", line 3, in from xmlclient import _tPartnerNS, _tSObjectNS, _tSoapNS, SoapFaultError,\ ImportError: No module named 'xmlclient'

idbentley commented 5 years ago

Not sure if it's a pathing issue. xmlclient is an internally provided module. See: https://github.com/alanjcastonguay/pyforce/blob/master/src/pyforce/xmlclient.py

bharaniabhishek123 commented 5 years ago

got the same issue while using version 1.8.0 for python=3.6(Conda). Created venv (with virtualenv) with python=2.7 and it worked

benbariteau commented 5 years ago

This is happening because from xmlclient import ... is a relative import. This style of import is not supported in python 3. If you change it to from .xmlclient import ... it should work. However, this points to the broader concern of the lack of python 3 support.

smelapalayam commented 4 years ago

support for 2.7 officially ended. do we have a solution for this issue yet?

ViViDboarder commented 4 years ago

Latest version 1.9.0 supports Python 3 and should resolve this issue. Let me know if it does not.