Во-первых, спасибо за ваше время!
Я пытаюсь использовать psycopg для запуска sql на pgadmin, но получаю следующую ошибку:
Error while connecting to PostgreSQL tuple index out of range
Код:
two_list = []
for x in range(1,10000):
single_two = (sheet.cell(row=x, column=1).value)
if single_two == None:
break
else:
two_list.append(single_two[4:])
two_list = [int(i) for i in two_list]
finalsql.execute("""SELECT
CONCAT('CWO-',i.issuenum) as "TWO ID", i.summary, c.stringvalue as "Title ID", SUBSTRING(a.actionbody,22,11) as "MWO ID", a.created as "TWO created date"
FROM
jiraissue i,
customfieldvalue c,
jiraaction a
WHERE
i.issuenum = ANY(%s)
AND
i.id = c.issue
AND
c.customfield = '10280'
AND
i.id = a.issueid
AND
a.actionbody like '%Content From: Video:%';""", (two_list,))
Тот же код работает с менее сложным sql:
finalsql.execute("""SELECT creator FROM jiraissue WHERE issuenum = ANY(%s);""", (two_list,))
Есть идеи, как решить эту проблему?