-
Notifications
You must be signed in to change notification settings - Fork 167
Description
Describe the bug
I have deployed the latest py_rfc library (2.8.1) under amazon hosted redhat linux 8 with Python 3.8.13. When I am using pyrfc library I can work, but if any exception is raised I am receiving the following error (the one on bold is important for me):
Traceback (most recent call last):
File "rfc_test.py", line 248, in
conn = pyrfc.Connection(**conn_params)
File "src/pyrfc/client.pyx", line 144, in pyrfc._cyrfc.Connection.init
File "src/pyrfc/client.pyx", line 211, in pyrfc._cyrfc.Connection._open
File "src/pyrfc/client.pyx", line 237, in pyrfc._cyrfc.Connection._error
pyrfc._exception.CommunicationError: <exception str() failed>
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "rfc_test.py", line 335, in
print(e)
File "/home/py_elt/.local/lib/python3.8/site-packages/pyrfc/_exception.py", line 51, in str
rc_text = RFC_RC(code) if code in [item.value for item in RFC_RC] else "???"
NameError: name 'RFC_RC' is not defined
It looks like RFC_RC is not defined in that file and I do not know why.
To Reproduce
I followed the instruction for building the pyrfc wheel from the source:
https://sap.github.io/PyRFC/build.html#build
exact command I had to run:
python3 -m pip install --upgrade pip --user
pip install cython wheel pytest sphinx
cd $HOME/repositories
git clone https://github.com/SAP/PyRFC
cd PyRFC
sudo yum install gcc-c++
sudo yum install python38-devel
python3 setup.py clean --all
python3 setup.py bdist_wheel
During installation I did not face any issue. No errors.
Also I was trying to reinstall but the error is still there.
Also I do not understand this part of installation for Linux so I did not do it.
Edit setup.py and set the CYTHON_VERSION
Screenshots
n/A/
Environment
- OS: Linux RedHat 8
- No
- 2.8,1 for Python 3.8
Additional context
N/A