Edgewall Software
Modify

Opened 18 years ago

Closed 18 years ago

Last modified 9 years ago

#3013 closed defect (fixed)

unicode (again): initenv fails under postgres

Reported by: Alec Thomas Owned by: Jonas Borgström
Priority: high Milestone: 0.10
Component: general Version: devel
Severity: major Keywords: unicode, postgresql
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

I think I recalled seeing some post to the ML about this, but couldn't find it when I did a search.

Creating and Initializing Project
 Installing default wiki pages
 /home/athomas/projects/trac/devel/wiki-default/CamelCase => CamelCase
Failed to initialize environment. 'ascii' codec can't encode character u'\u201c' in position 237: ordinal not in range(128)
Traceback (most recent call last):
  File "/home/athomas/projects/trac/devel/trac/scripts/admin.py", line 606, in do_initenv
    self._do_wiki_load(default_dir('wiki'), cursor)
  File "/home/athomas/projects/trac/devel/trac/scripts/admin.py", line 793, in _do_wiki_load
    self._do_wiki_import(filename, page, cursor)
  File "/home/athomas/projects/trac/devel/trac/scripts/admin.py", line 763, in _do_wiki_import
    cursor, (title, int(time.time()), data, title))
  File "/home/athomas/projects/trac/devel/trac/scripts/admin.py", line 160, in db_update
    cursor.execute(sql, params)
  File "/home/athomas/projects/trac/devel/trac/db/util.py", line 47, in execute
    return self.cursor.execute(sql_escape_percent(sql), args)
  File "/home/athomas/projects/trac/devel/trac/db/util.py", line 47, in execute
    return self.cursor.execute(sql_escape_percent(sql), args)
  File "/usr/lib/python2.4/site-packages/pyPgSQL/PgSQL.py", line 3043, in execute
    parms = (self.__unicodeConvert(parms[0]),)
  File "/usr/lib/python2.4/site-packages/pyPgSQL/PgSQL.py", line 2745, in __unicodeConvert
    converted_obj.append(item.encode(*self.conn.client_encoding))
UnicodeEncodeError: 'ascii' codec can't encode character u'\u201c' in position 237: ordinal not in range(128)

This was during my attempt to install Postgres for testing the tags plugin.

Attachments (0)

Change History (4)

comment:1 by Christian Boos, 18 years ago

Owner: Christian Boos removed

Well, I don't use postgres for now, so I guess someone else has to address this one.

comment:2 by Jonas Borgström, 18 years ago

Owner: set to Jonas Borgström
Status: newassigned

Okay, I'll try to reproduct this

comment:3 by Jonas Borgström, 18 years ago

Resolution: fixed
Status: assignedclosed

Fixed in r3159.

comment:4 by Ryan J Ollos, 9 years ago

Keywords: postgresql added; postgres removed

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Jonas Borgström.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Jonas Borgström 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.