带x的UnicodeDecodeError

2024-10-01 11:30:54 发布

您现在位置:Python中文网/ 问答频道 /正文

我在使用python和xlwt,但有一个问题

我的代码:

tickets = cursor.fetchall ()
largo = len(tickets)
cursor.close ()
conn.close ()

row = 4
for t in tickets:

  hoja.write(row, 1, t[0])
  hoja.write(row, 2, epoch2fecha(t[1]))
  hoja.write(row, 3, epoch2fecha(t[12]))
  hoja.write(row, 6, t[10])
  hoja.write(row, 7, t[9])
  hoja.write(row, 8, t[6])
  hoja.write(row, 9, t[3])
  row += 1
  if(row == largo+1):
     break
libro.save('Informe.xls')

错误:

^{pr2}$

Tags: 代码inforcloselenconncursortickets