Modify

Opened 2 years ago

Closed 2 years ago

#13740 closed defect (fixed)

Python3: TypeError: cannot use a string pattern on a bytes-like object

Reported by: Peter Suter Owned by: Peter Suter
Priority: normal Component: BasicOfficePreviewPlugin
Severity: normal Keywords: python3
Cc: Trac Release:

Description

RTF viewing does not work in Python 3:

Traceback (most recent call last):
  File "trac\mimeview\api.py", line 810, in render
    result = renderer.render(context, full_mimetype,
  File "BasicOfficePreview.py", line 45, in render
    return self._render_rtf(content)
  File "BasicOfficePreview.py", line 169, in _render_rtf
    for paragraph in parse_rtf(content.read())])
  File "BasicOfficePreview.py", line 125, in parse_rtf
    m = rtf_token_re.match(source, pos)
TypeError: cannot use a string pattern on a bytes-like object

Attachments (0)

Change History (1)

comment:1 Changed 2 years ago by Peter Suter

Resolution: fixed
Status: newclosed

In 17661:

BasicOfficePreviewPlugin: Python 3 support.
(fix #13740)

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Peter Suter.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


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

 
Note: See TracTickets for help on using tickets.