Modify ↓
Opened 18 years ago
Closed 18 years ago
#5067 closed defect (fixed)
Failed to create environment. 'unicode' object has no attribute 'decode'
Reported by: | Owned by: | Christian Boos | |
---|---|---|---|
Priority: | highest | Milestone: | 0.10.4 |
Component: | admin/console | Version: | devel |
Severity: | blocker | Keywords: | |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
I attempted to upgrade from 0.10.3 stable to the latest 0.10.4dev branch. Running:
trac-admin [projenv_path] upgrade
However, that failed. So I attempted to initialize a new environment:
trac-admin [projenv_path] initenv
which also failed. I then attempted to do a clean install of 0.10.4dev. No dice. Then, converted the MySQL database:
mysql> ALTER DATABASE trac DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
Confirmed it with:
mysql> use trac mysql> SHOW VARIABLES LIKE '%character%';
Each time the error message was the same. The output is:
Creating and Initializing Project Failed to create environment. 'unicode' object has no attribute 'decode' Traceback (most recent call last): File "/home/inalias/packages/lib/python2.3/site-packages/trac/scripts/admin.py", line 613, in do_initenv options=options) File "/home/inalias/packages/lib/python2.3/site-packages/trac/env.py", line 145, in __init__ self.create(options) File "/home/inalias/packages/lib/python2.3/site-packages/trac/env.py", line 250, in create DatabaseManager(self).init_db() File "/home/inalias/packages/lib/python2.3/site-packages/trac/db/api.py", line 69, in init_db connector, args = self._get_connector() File "/home/inalias/packages/lib/python2.3/site-packages/trac/db/api.py", line 85, in _get_connector scheme, args = _parse_db_str(self.connection_uri) File "/home/inalias/packages/lib/python2.3/site-packages/trac/db/api.py", line 144, in _parse_db_str user = unicode_unquote(user) File "/home/inalias/packages/lib/python2.3/site-packages/trac/util/text.py", line 75, in unicode_unquote return unquote(value).decode('utf-8') AttributeError: 'unicode' object has no attribute 'decode' Failed to initialize environment. 1 Traceback (most recent call last): File "/home/inalias/packages/lib/python2.3/site-packages/trac/scripts/admin.py", line 617, in do_initenv sys.exit(1) SystemExit: 1
Thank you very much for your time.
Attachments (0)
Change History (5)
comment:1 by , 18 years ago
Priority: | normal → highest |
---|
comment:2 by , 18 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:3 by , 18 years ago
Woops, the problem was rather me not reading the API doc for the unicode_unquote
method ;-)
comment:5 by , 18 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Note:
See TracTickets
for help on using tickets.
Reinstalled everything from scratch (trac, clearsilver, subversion, mysql-python, etc) and the error output is the same. For now I've disabled the trac server as when loading the page 'cgitb' prints out the database username and password.