Kobus Smit
asked on
Python Call SAP RFC
Hi.
I am want to code a python program to connect to SAP. I use the PyRFC library.
With the following code:
I am getting the error:
ImportError Traceback (most recent call last)
<ipython-input-14-c21fcdc2 6a13> in <module>()
----> 1 from pyrfc import Connection
ImportError: cannot import name 'Connection'
I am want to code a python program to connect to SAP. I use the PyRFC library.
With the following code:
from pyrfc import Connection
I am getting the error:
ImportError Traceback (most recent call last)
<ipython-input-14-c21fcdc2
----> 1 from pyrfc import Connection
ImportError: cannot import name 'Connection'
This question needs an answer!
Become an EE member today
7 DAY FREE TRIALMembers can start a 7-Day Free trial then enjoy unlimited access to the platform.
View membership options
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
First make sure that your variable indeed is 'Connection'. If so then maybe it loops because of a dead reference and you need to re-position your 'from pyrfc import Connection' to the end.
For instance:
x.py:
Open in new window
y.py:
Open in new window
The result will then be: ImportError: cannot import name 'x1'
But if re positioned in X like below:
Open in new window
The output will be:
Open in new window
Cheers