-
Notifications
You must be signed in to change notification settings - Fork 141
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Module 'pyrfc' has no attribute Connection #365
Comments
Do you have a file called Is SAPNWRFC_HOME set correctly? What does the following print? import pyrfc
import sys
import os
print(1, os.environ.get('SAPNWRFC_HOME'))
print(2, sys.modules['pyrfc'].__file__)
print(3, pyrfc.__version__) |
I have a simmilar problem. I reproduced the error with the Dockerfile: redhat.ubi8.Dockerfile FROM redhat/ubi8:8.9-1160
RUN yum update -y && yum upgrade -y && \
yum install -y gcc gcc-c++ python3 python3-devel python3-pip unzip git
# INSTALL sap nwrfc sdk: https://sap.github.io/PyRFC/install.html#sap-nwrfc-sdk-installation
COPY ./nwrfc750P_13-70002752.zip /usr/local/sap/nwrfc750P_13-70002752.zip
RUN unzip /usr/local/sap/nwrfc750P_13-70002752.zip -d /usr/local/sap/
ENV SAPNWRFC_HOME=/usr/local/sap/nwrfcsdk
RUN echo "/usr/local/sap/nwrfcsdk/lib" > /etc/ld.so.conf.d/nwrfcsdk.conf && \
ldconfig
# INSTALL pyrfc build tools: https://sap.github.io/PyRFC/build.html#toolchain-preparation
RUN python3 -m pip --trusted-host pypi.org --trusted-host pypi.python.org --trusted-host files.pythonhosted.org install build cython wheel pytest sphinx
# BUILD pyrfc from source: https://sap.github.io/PyRFC/build.html#build-from-source
RUN git clone -b v3.3.1 https://github.com/SAP/PyRFC.git /pyrfc && cd /pyrfc && python3 -m pip --trusted-host pypi.org --trusted-host pypi.python.org --trusted-host files.pythonhosted.org install .
# Example usage: https://sap.github.io/PyRFC/intro.html#example-usage
Output:
|
@sebastiantaurer seems you are running Python 3.6.8 pyrfc 3.3.1 requires Python >=3.8 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
I'm trying to implement pyrfc in my python project, but after the installations of the library, I can't call the connection through import.
To Reproduce
python -m venv venv
.\venv\Scripts\activate
pip install pyrfc
Create a file call main.py
import pyrfc
conn = Connection(ashost='10.0.0.1', sysnr='00', client='100', user='me', passwd='secret')
Screenshots
Environment
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: