Modify

Opened 5 years ago

Closed 2 months ago

Last modified 2 months ago

#6379 closed defect (fixed)

ValueError: Can't send unicode content

Reported by: anonymous Owned by: eseifert
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 eseifert 3 years ago.
Patch for Trac 0.12 compatibility

Download all attachments as: .zip

Change History (4)

Changed 3 years ago by eseifert

Patch for Trac 0.12 compatibility

comment:1 Changed 3 years ago by eseifert

  • 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 2 months ago by rjollos

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

In 14006:

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

comment:3 Changed 2 months ago by rjollos

  • Owner changed from coderanger to eseifert

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


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

 
Note: See TracTickets for help on using tickets.