Python script id error


Badge +1

Initially my script runs successfully but now it showing error.  I have attached the screenshot of my error.
Below is my script.

import csv
import os

def create_modified_csv():
    columns = ["Name”, “ID”]
    if os.path.exists("C:/SAP_to_ZOHO_Data/Modified_template.csv"):
        os.remove("C:/SAP_to_ZOHO_Data/Modified_template.csv")

    with open("C:/SAP_to_ZOHO_Data/Modified_template.csv", "w", newline="") as csvfile:
        writer = csv.writer(csvfile)
        writer.writerow(columns)
 

 

 


2 replies

Userlevel 5
Badge +9

@jeganmurali 

It is mandatory to close the session after the script is executed. Check if you are missing add the Python Script Close Session action. The session name must be the same as Python Open Script.

https://docs.automationanywhere.com/bundle/enterprise-v2019/page/enterprise-cloud/topics/aae-client/bot-creator/commands/cloud-python-command.html

HTH

Regards

 

Badge

I have the same problem right now.
Did you manage to fix it?
If so, could you please share the solution?
Thanks.

Reply