SAP / PyRFC

Asynchronous, non-blocking SAP NW RFC SDK bindings for Python
http://sap.github.io/PyRFC
Apache License 2.0
515 stars 141 forks source link

ImportError: cannot import name 'set_ini_file_directory' from 'pyrfc' #211

Closed leandrogmuller closed 3 years ago

leandrogmuller commented 4 years ago

Hello.

I'm trying to run server test, but return the error below on windows 10.

python.exe C:/MyProjects/RFCSERVER/rfcserver/tests/test_server.py

Traceback (most recent call last):
  File "C:/MyProjects/RFCSERVER/rfcserver/tests/test_server.py", line 12, in <module>
    from pyrfc import Server, set_ini_file_directory, ABAPApplicationError
ImportError: cannot import name 'set_ini_file_directory' from 'pyrfc' (C:\MyProjects\RFCSERVER\venv\lib\site-packages\pyrfc\__init__.py)

**pip freeze**
numpy==1.19.4
pandas==1.1.4
pynwrfc==2.1.0
python-dateutil==2.8.1
pytz==2020.4
six==1.15.0

**python version**
Python 3.8.1

On pycharm didn't find the lib Server and set_ini_file_directory at the pyrfc module.

I did download the nwrfcsdk 7.50 lib and setting variable SAPNWRFC_HOME to nwrfcsdk directory.

Could you help me to find soluction? Is there more any configuration to do?

bsrdjan commented 4 years ago

The server is for now supported only via main branch build from source.

It is not available in 2.1.0, here some more info: https://github.com/SAP/PyRFC/issues/210#issuecomment-732185071

bsrdjan commented 4 years ago

Also included in these preliminary build: #213

bsrdjan commented 3 years ago

The Server is now available in 2.3.0 release, please feel free to test.

bsrdjan commented 3 years ago

Looks like solved and please reopen if support still needed.