Opened 6 years ago

Closed 6 years ago

#3709 closed defect (fixed)

Unicode error when performing a select on trac tables

Reported by: anonymous Owned by: JamesMills
Priority: normal Component: SqlQueryMacro
Severity: normal Keywords: UnicodeEncodeError
Cc: Trac Release: 0.11


Hi James,

I've got the error below when I my select returns a column with latin characteres (in this case a "ç" and "ã"). Do you have any ideas on how can I hanlde that?

Thanks in advance.

UnicodeEncodeError: 'ascii' codec can't encode characters in position 7-8: ordinal not in range(128)

Attachments (1) (9.7 KB) - added by eric.chaves 6 years ago. with proper unicode value handling

Download all attachments as: .zip

Change History (2)

comment:1 Changed 6 years ago by eric.chaves

  • Resolution set to fixed
  • Status changed from new to closed

I've got the problem. The library pymill dows not handle cells with unicode values properly.
in order to fix it I've added a check on the initializion of the Cell class. If the value is an unicode string, a safe conversion is performed.

See the line 192 of the attached file.

Changed 6 years ago by eric.chaves with proper unicode value handling

Add Comment

Modify Ticket

as closed .
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from JamesMills. Next status will be 'closed'.
The resolution will be deleted. Next status will be 'reopened'.

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.