Opened 6 years ago

Closed 5 years ago

Last modified 5 years ago

#12529 closed Bug Report - General (fixed) can't delete orphaned recording entries with non-ascii charcters in any attribute

Reported by: Karl Egly Owned by: Raymond Wagner
Priority: minor Milestone: 0.28
Component: Bindings - Python Version: Master Head
Severity: medium Keywords:
Cc: Ticket locked: no


It appears as if deleteRecording (and related methods) wants to serialize the whole recording object instead of only channel id and start time. 0xDC being upper case U-Umlaut.

Traceback (most recent call last):
  File "/var/lib/mythtv2/", line 230, in <module>
  File "/var/lib/mythtv2/", line 214, in main
  File "/var/lib/mythtv2/", line 129, in delete_recs
    rec.delete(True, True)
  File "/usr/lib/python2.7/dist-packages/MythTV/", line 363, in delete
    return self.getProgram().delete(force, rerecord)
  File "/usr/lib/python2.7/dist-packages/MythTV/", line 960, in delete
    res = int(be.deleteRecording(self, force=force))
  File "/usr/lib/python2.7/dist-packages/MythTV/", line 656, in deleteRecording
  File "/usr/lib/python2.7/dist-packages/MythTV/", line 155, in backendCommand
    return self._conn.command.backendCommand(data)
  File "/usr/lib/python2.7/dist-packages/MythTV/", line 295, in backendCommand
  File "/usr/lib/python2.7/dist-packages/MythTV/utility/", line 392, in sendheader
    self.send(data, flags)
UnicodeEncodeError: 'ascii' codec can't encode character u'\xdc' in position 531: ordinal not in range(128)


return self.backendCommand(BACKEND_SEP.join([command,program.toString()]))

Change History (2)

comment:1 Changed 5 years ago by angelaschmid <angela.schmid@…>

Resolution: fixed
Status: newclosed

In e20bd8bf8e274274f4fb89420905015f57233e0c/mythtv:

Python binding - call Socket.send with non-unicode string

Socket.send takes a string (not unicode).
When Socket.send is called with an unicode string it tries to convert it with the ascii codec converter, resulting in an UnicodeEncodeError?.

Before calling Socket.send the data has to be converted to a non-unicode string (UTF-8 encoded).

Fixes #12529
Fixes #12642

comment:2 Changed 5 years ago by Karl Egly

Milestone: unknown0.28
Note: See TracTickets for help on using tickets.