0

I've tried the code below to connect to the sap system. But it was throwing an error complaining that nonetype cannot be used to call.

def main():

    config = ConfigParser()
    config.read('sapnwrfc.cfg')
    params_connection = config._sections['connection']
    conn = Connection(**params_connection)
    print(conn)
    result = conn.call('STFC_STRUCTURE', IMPORTSTRUCT=imp)
    print(result)

After debugging I was able to find that the conn value is None. Do you know how to solve this issue?

P.S: same connection worked Some days ago. Not sure why this is not working now.

Sandra Rossi
  • 11,934
  • 5
  • 22
  • 48
Dinesh
  • 1
  • 1
  • the rfc library normally creates a log file. There is normally some useful info inside. If it used to work.... What has changed ? The cfg file or is the sap system reachable, etc... – phil soady Jul 27 '20 at 23:21
  • your `sapnwrfc.cfg` file is incorrect, try to specify connection parameters manually – Suncatcher Jul 28 '20 at 04:35

0 Answers0