Edgewall Software
Modify

Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#10290 closed defect (worksforme)

Trac detected an internal error: UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 27: ordinal not in range(128)

Reported by: anonymous Owned by:
Priority: normal Milestone:
Component: general Version:
Severity: normal Keywords: UnicodeDecodeError
Cc: xancorreu@…
Release Notes:
API Changes:

Description (last modified by cboos)

I have trac 0.11.4 installed (apt-get trac) with sqlite in ubuntu (maverick) and hg plugin (apt-get trac-mercurial).

Recently I commit a change in hg and when I want to see in trac, I received the following error:

in trac web:

Oops…
Trac detected an internal error:

UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 27: ordinal not in range(128)

There was an internal error in Trac. It is recommended that you inform your local Trac administrator and give him all the information he needs to reproduce the issue.

To that end, you could a ticket.

The action that triggered the error was:

GET: /changeset/10:9458588decba8062026650f0ed251de9c20453a2

TracGuide — The Trac User and Administration Guide

in console:

[...]
172.26.0.7 - - [29/Jul/2011 09:29:01] "GET /espai/changeset/11%3Ae9b4280584ba2bff63c1ae34edbd73afa5b80ecf HTTP/1.1" 200 -

about trac

System Information

Trac: 	0.11.7
Python: 	2.6.6 (r266:84292, Sep 15 2010, 15:52:39) [GCC 4.4.5]
setuptools: 	0.6
SQLite: 	3.7.2
pysqlite: 	2.4.1
Genshi: 	0.6
Pygments: 	1.3.1
Mercurial: 	1.6.3
jQuery:	1.4.2

Configuration

Section 	Name 	Value
account-manager 	force_passwd_change 	false
password_store 	
persistent_sessions 	false
addheaders 	add_links 	
add_scripts 	sorttable
add_styles 	taules-ordenables
default_base 	site/
default_script_base 	site/js/
default_style_base 	site/css/
attachment 	max_size 	262144
render_unsafe_content 	false
browser 	color_scale 	True
downloadable_paths 	/trunk, /branches/*, /tags/*
hide_properties 	svk:merge
intermediate_color 	
intermediate_point 	
newest_color 	(255, 136, 136)
oldest_color 	(136, 136, 255)
oneliner_properties 	trac:summary
render_unsafe_content 	false
wiki_properties 	trac:description
changeset 	max_diff_bytes 	10000000
max_diff_files 	0
wiki_format_messages 	true
components 	backlinks.* 	enabled
textile.* 	enabled
textile.macro.* 	enabled
tracaddheaders.* 	enabled
tracaddheaders.plugin.* 	enabled
tracbib.tracbib.* 	enabled
tracext.hg.* 	enabled
tracmathjax.* 	disabled
tracwysiwyg.* 	enabled
tracwysiwyg.templateprovider 	enabled
tracwysiwyg.wysiwygwikifilter 	enabled
wikiprint.* 	enabled
wikirename.* 	enabled
header_logo 	alt 	(please configure the [header_logo] section in trac.ini)
height 	-1
link 	
src 	site/your_project_logo.png
width 	-1
hg 	node_format 	hex
show_rev 	yes
inherit 	plugins_dir 	
templates_dir 	
logging 	log_file 	trac.log
log_format 	
log_level 	DEBUG
log_type 	none
milestone 	stats_provider 	DefaultTicketGroupStatsProvider
mimeviewer 	enscript_modes 	text/x-dylan:dylan:4
enscript_path 	enscript
max_preview_size 	262144
mime_map 	text/x-dylan:dylan,text/x-idl:ice,text/x-ada:ads:adb
php_path 	php
pygments_default_style 	trac
pygments_modes 	
tab_width 	8
treat_as_binary 	application/octet-stream,application/pdf,application/postscript,application/rtf
notification 	admit_domains 	
always_notify_owner 	false
always_notify_reporter 	false
always_notify_updater 	true
ignore_domains 	
mime_encoding 	none
smtp_always_bcc 	
smtp_always_cc 	
smtp_default_domain 	
smtp_enabled 	false
smtp_from 	trac@localhost
smtp_from_name 	
smtp_password 	
smtp_port 	25
smtp_replyto 	trac@localhost
smtp_server 	localhost
smtp_subject_prefix 	__default__
smtp_user 	
ticket_subject_template 	$prefix #$ticket.id: $summary
use_public_cc 	false
use_short_addr 	false
use_tls 	false
project 	admin 	
admin_trac_url 	.
descr 	Projecte @espai. Hipsokarpoumai Estelino, globino, aerino, sondino, matt, etc.
footer 	Visit the Trac open source project at<br /><a href="http://trac.edgewall.org/">http://trac.edgewall.org/</a>
icon 	common/trac.ico
name 	Espai
url 	
query 	default_anonymous_query 	status!=closed&cc~=$USER
default_query 	status!=closed&owner=$USER
items_per_page 	100
report 	items_per_page 	100
items_per_page_rss 	0
revisionlog 	default_log_limit 	100
roadmap 	stats_provider 	DefaultTicketGroupStatsProvider
search 	min_query_length 	3
svn 	branches 	trunk,branches/*
tags 	tags/*
ticket 	default_cc 	
default_component 	informació
default_description 	
default_keywords 	
default_milestone 	estelino (estel)
default_owner 	
default_priority 	menor
default_resolution 	arreglat
default_severity 	
default_summary 	
default_type 	tasca
default_version 	Immediat
max_comment_size 	262144
max_description_size 	262144
preserve_newlines 	default
restrict_owner 	false
workflow 	ConfigurableTicketWorkflow
ticket-workflow 	accept 	new,assigned,accepted,reopened -> accepted
accept.operations 	set_owner_to_self
accept.permissions 	TICKET_MODIFY
leave 	* -> *
leave.default 	1
leave.operations 	leave_status
reassign 	new,assigned,accepted,reopened -> assigned
reassign.operations 	set_owner
reassign.permissions 	TICKET_MODIFY
reopen 	closed -> reopened
reopen.operations 	del_resolution
reopen.permissions 	TICKET_CREATE
resolve 	new,assigned,accepted,reopened -> closed
resolve.operations 	set_resolution
resolve.permissions 	TICKET_MODIFY
timeline 	abbreviated_messages 	True
changeset_collapse_events 	false
changeset_long_messages 	false
changeset_show_files 	0
default_daysback 	30
max_daysback 	90
newticket_formatter 	oneliner
ticket_show_details 	false
trac 	authz_file 	
authz_module_name 	
auto_reload 	False
backup_dir 	db
base_url 	
check_auth_ip 	false
database 	sqlite:db/trac.db
debug_sql 	False
default_charset 	utf-8
default_handler 	WikiModule
default_timezone 	
htdocs_location 	
ignore_auth_case 	false
mainnav 	wiki,timeline,roadmap,browser,tickets,newticket,search
metanav 	login,logout,prefs,help,about
mysqldump_path 	mysqldump
never_obfuscate_mailto 	false
permission_policies 	DefaultPermissionPolicy, LegacyAttachmentPolicy
permission_store 	DefaultPermissionStore
pg_dump_path 	pg_dump
repository_dir 	/var/comu/carpeta-comuna/@espai/propi
repository_type 	hg
request_filters 	
secure_cookies 	False
show_email_addresses 	false
show_ip_addresses 	false
timeout 	20
use_base_url_for_redirect 	False
tracmathjax 	mathjax_path 	/var/comu/carpeta-comuna/trac/espai/assets/mathjax-1.1a
wiki 	ignore_missing_pages 	false
max_size 	262144
render_unsafe_content 	false
split_page_names 	false
wikiprint 	article_css_url 	
book_css_url 	
css_url 	
extracontent_url 	
frontpage_url 	
toc_title 	Table of Contents

Problem

I can't see the specific commit http://172.26.0.3:8000/espai/changeset/10%3A9458588decba8062026650f0ed251de9c20453a2

Send me feedback if you want more information. I'm a newbee. So please specify what files or output do you want and how to get it.

Thanks in advance, Xan.

PS: xancorreu@…

Attachments (0)

Change History (2)

comment:1 Changed 3 years ago by cboos

  • Description modified (diff)
  • Resolution set to worksforme
  • Status changed from new to closed

I don't know which version you got from apt-get trac-mercurial, but please rather use the latest from the repository (source:plugins/0.12/mercurial-plugin). Quite a number of unicode related issues have been fixed lately. Oh, and I see you're still running Trac 0.11 - you may want to upgrade this to 0.12, as the unicode fixes have not been backported to the 0.11 branch of the plugin (which like Trac 0.11 itself is no longer maintained).

See also:

#7160
Problems with character encoding
#7217
Non-ASCII characters get replaced with '?' in changeset metadata
#7694
[hg] Unicode characters fail to print in commit messages
#7799
listing files with utf8 filenames raises UnicodeDecodeError with certain characters
#8180
Bad encoding in mercurial plugin
#8538
support non-ascii filenames in mercurial vcs backend
#9631
UnicodeDecodeError when file names in Mercurial repo use multi encoding
#9724
TracMercurial passes unicode key to the mercurial package
#9970
mercurial-plugin filecontent unicode problem?
#10131
Unreadable commit messages in russian (hg repo)

comment:2 Changed 3 years ago by cboos

  • Milestone not applicable deleted

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The ticket will remain with no owner.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from (none) to the specified user.

Add Comment


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

 
Note: See TracTickets for help on using tickets.