Edgewall Software
Modify

Ticket #4458 (closed defect: duplicate)

Opened 5 years ago

Last modified 5 years ago

Failed to initialize environment. 'latin-1' codec can't encode character u'\u201c'

Reported by: TonyH Owned by: cmlenz
Priority: normal Milestone:
Component: admin/console Version: 0.10.2
Severity: blocker Keywords: latin-1 codec encode character u'\u201c'
Cc:
Release Notes:
API Changes:

Description

Unable to install Trac. Any work arounds to getting around this error would be greatly appriciated! We have plans of upgrading MySQL in about 3 weeks to Ver 5.0. Initially we tried using MySQL-python-1.2.1_p2, but had unrelated database issues and using MySQL-python-1.2.2b2 allowed us to resolve those errors.


Machine / Config info:


-mysql Ver 14.7 Distrib 4.1.13, for suse-linux (i686) using readline 5.0
-Python 2.4.1 (# 1, Oct 13 2006, 16:58:04)
[GCC 4.0.2 20050901 (prerelease) (SUSE Linux)] on linux2
-MySQL-python-1.2.2b2
-trac-0.10.2


Error


Creating and Initializing Project
 Installing default wiki pages
 /srv/www/trac/share/trac/wiki-default/TracTimeline => TracTimeline
 /srv/www/trac/share/trac/wiki-default/WikiStart => WikiStart
 /srv/www/trac/share/trac/wiki-default/TracUpgrade => TracUpgrade
Failed to initialize environment. 'latin-1' codec can't encode character u'\u201c' in position 5939: ordinal not in range(256)
Traceback (most recent call last):
  File "/srv/www/trac/lib/python2.4/site-packages/trac/scripts/admin.py", line 623, in do_initenv
    self._do_wiki_load(default_dir('wiki'), cursor)
  File "/srv/www/trac/lib/python2.4/site-packages/trac/scripts/admin.py", line 816, in _do_wiki_load
    self._do_wiki_import(filename, page, cursor, create_only)
  File "/srv/www/trac/lib/python2.4/site-packages/trac/scripts/admin.py", line 786, in _do_wiki_import
    cursor, (title, int(time.time()), data, title))
  File "/srv/www/trac/lib/python2.4/site-packages/trac/scripts/admin.py", line 162, in db_update
    cursor.execute(sql, params)
  File "/srv/www/trac/lib/python2.4/site-packages/trac/db/util.py", line 50, in execute
    return self.cursor.execute(sql_escape_percent(sql), args)
  File "/srv/www/trac/lib/python2.4/site-packages/trac/db/util.py", line 50, in execute
    return self.cursor.execute(sql_escape_percent(sql), args)
  File "/usr/lib/python2.4/site-packages/MySQLdb/cursors.py", line 151, in execute
    query = query % db.literal(args)
  File "/usr/lib/python2.4/site-packages/MySQLdb/connections.py", line 233, in literal
    return self.escape(o, self.encoders)
  File "/usr/lib/python2.4/site-packages/MySQLdb/connections.py", line 179, in unicode_literal
    return db.literal(u.encode(unicode_literal.charset))
UnicodeEncodeError: 'latin-1' codec can't encode character u'\u201c' in position 5939: ordinal not in range(256)

Regards,
Tony

Attachments

Change History

comment:1 Changed 5 years ago by thatch

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

Duplicate of #3857. Thanks for the full traceback.

View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
The resolution will be deleted. Next status will be 'reopened'
to The owner will be changed from cmlenz. Next status will be 'closed'
Author


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

 
Note: See TracTickets for help on using tickets.