Skip to main content

I'm trying to run a python script on a360, it has few import statements for api requests and csv import and that's causing an error while executing.

what should I do?

have you manually installed the imported libraries ?

 

if not please try to install them using pip install REQUIREDLIB

 

It should work after that.

 

for reference if you want execute below script

 

import datetime

 

def test(arg):

  f = open("C:\\Users\\someUser\\Desktop\\test.txt", "w")

  f.write(str(datetime.datetime.now()))

  f.close()

  return arg

 

you can use Execute function, pass a variable and get it back ( very stupid of me 🙂 )

 

Some error scenario,

  1. if you don't install datatime lib manually using cmd, you may get Bot Error.(though it work in some IDE like Pycharm without any issue)
  2. if you install datetime lib but do no include import statement in python code, you may get Bot Error.

 

Hope this would help, if not please let me know, i can try to help.


Hi spandana 4141,

 

are you still facing an issue with python?

 

 


Some error scenario,

  1. if you don't install datatime lib manually using cmd, you may get Bot Error.(though it work in some IDE like Pycharm without any issue)
  2. if you install datetime lib but do no include import statement in python code, you may get Bot Error.

 

Hope this would help, if not please let me know, i can try to help.

Where do you need to install the datetime lib? I attempted a pip install and it shows installed. It works in my IDE (like you mentioned might happen), but not I’m not sure where else to install it.


Reply