Dear Community,
When PAD runs my BAT, I am receiving the following error.
Somehow it detects that the PAD is running the BAT file and therefore error occurs.
When I run the file it works perfectly - In the same windows user session.
Error: https://i.imgur.com/jJuNTOP.png
Pad: https://i.imgur.com/7acW2Iu.png
This is my script:
import MySQLdb as dbapi
import json
import datetime
QUERY1="SET SESSION MAX_EXECUTION_TIME = 0;"
QUERY="SELECT date_format(created_at, '%d %m %Y') as created, user_id, parent_id, status, metadata FROM x.accommodation_bookings WHERE parent_id is not null AND status in ('3', '4', '5')"
db=dbapi.connect(x",user="x",passwd="x")
cur=db.cursor()
cur.execute(QUERY1)
cur.execute(QUERY)
result=cur.fetchall()
with open("revenue.json","w") as f:
for e in result:
f.write(json.dumps(e) + "\n")

Report
All responses (
Answers (