Modify

Opened 7 years ago

Closed 3 years ago

Last modified 3 years ago

#6379 closed defect (fixed)

ValueError: Can't send unicode content

Reported by: anonymous Owned by: Erich Seifert
Priority: normal Component: RobotsTxtPlugin
Severity: blocker Keywords: unicode
Cc: Trac Release: 0.12

Description

Running trac HEAD and attempting to use RobotsTxt plugin.

The wiki page contains three open-brace characters, followed by the sample robots.txt content and then three close-brace characters. When navigating to /robots.txt, I get the error:

ValueError: Can't send unicode content

Attachments (1)

robotstxt-trac-0.12.patch (476 bytes) - added by Erich Seifert 5 years ago.
Patch for Trac 0.12 compatibility

Download all attachments as: .zip

Change History (4)

Changed 5 years ago by Erich Seifert

Attachment: robotstxt-trac-0.12.patch added

Patch for Trac 0.12 compatibility

comment:1 Changed 5 years ago by Erich Seifert

Keywords: unicode added

Added a patch that resolved the issue for me. It checks for unicode content and encodes it to a normal string. Additionally the patch removes leading and trailing new lines and spaces from the page content.

comment:2 Changed 3 years ago by Ryan J Ollos

Resolution: fixed
Status: newclosed

In 14006:

Encode content as utf-8. Patch by eseifert. Fixes #6379.

comment:3 Changed 3 years ago by Ryan J Ollos

Owner: changed from Noah Kantrowitz to Erich Seifert

Modify Ticket

Action
as closed The owner will remain Erich Seifert.
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.