Pyrfc connection return none

246 Views Asked by At

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.

0

There are 0 best solutions below