Edgewall Software
Modify

Opened 16 years ago

Closed 13 years ago

Last modified 9 years ago

#2892 closed defect (worksforme)

Error while initialize Trac environment

Reported by: sdecleire@… Owned by: daniel
Priority: high Milestone:
Component: admin/console Version: 0.9.3
Severity: blocker Keywords: needinfo
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

I get the error below when I init a new trac environment with the trac-admin initenv command :

Creating and Initializing Project
Failed to create environment. need more than 1 value to unpack
Traceback (most recent call last):
  File "/usr/local/lib/python2.4/site-packages/trac/scripts/admin.py", line 139, in env_create
    self.__env = Environment(self.envname, create=True, db_str=db_str)
  File "/usr/local/lib/python2.4/site-packages/trac/env.py", line 79, in __init__
    self.create(db_str)
  File "/usr/local/lib/python2.4/site-packages/trac/env.py", line 197, in create
    db.init_db(self.path, db_str)
  File "/usr/local/lib/python2.4/site-packages/trac/db.py", line 441, in init_db
    cls, args = _get_cnx_class(env_path, db_str)
  File "/usr/local/lib/python2.4/site-packages/trac/db.py", line 449, in _get_cnx_class
    scheme, args = _parse_db_str(db_str)
  File "/usr/local/lib/python2.4/site-packages/trac/db.py", line 462, in _parse_db_str
    scheme, rest = db_str.split(':', 1)
ValueError: need more than 1 value to unpack
Failed to initialize environment. 1
Traceback (most recent call last):
  File "/usr/local/lib/python2.4/site-packages/trac/scripts/admin.py", line 594, in do_initenv
    self.env_create(db_str)
  File "/usr/local/lib/python2.4/site-packages/trac/scripts/admin.py", line 144, in env_create
    sys.exit(1)
SystemExit: 1

Attachments (0)

Change History (9)

comment:1 by sdecleire@…, 16 years ago

Resolution: invalid
Status: newclosed

Oups … I just forgotten the database type in the connexion string …

comment:2 by anonymous, 15 years ago

have you got it work!!! could anyone provide solution for this

comment:3 by anonymous, 15 years ago

Resolution: invalid
Status: closedreopened

same error here: Creating and Initializing Project Failed to create environment. need more than 1 value to unpack Traceback (most recent call last):

File "c:\xampp\python24\lib\site-packages\trac-0.10.3-py2.4.egg\trac\scripts\a

dmin.py", line 613, in do_initenv

options=options)

File "c:\xampp\python24\lib\site-packages\trac-0.10.3-py2.4.egg\trac\env.py",

line 124, in init

self.create(options)

File "c:\xampp\python24\lib\site-packages\trac-0.10.3-py2.4.egg\trac\env.py",

line 229, in create

DatabaseManager(self).init_db()

File "c:\xampp\python24\lib\site-packages\trac-0.10.3-py2.4.egg\trac\db\api.py

", line 68, in init_db

connector, args = self._get_connector()

File "c:\xampp\python24\lib\site-packages\trac-0.10.3-py2.4.egg\trac\db\api.py

", line 84, in _get_connector

scheme, args = _parse_db_str(self.connection_uri)

File "c:\xampp\python24\lib\site-packages\trac-0.10.3-py2.4.egg\trac\db\api.py

", line 110, in _parse_db_str

scheme, rest = db_str.split(':', 1)

ValueError: need more than 1 value to unpack Failed to initialize environment. 1 Traceback (most recent call last):

File "c:\xampp\python24\lib\site-packages\trac-0.10.3-py2.4.egg\trac\scripts\a

dmin.py", line 617, in do_initenv

sys.exit(1)

SystemExit: 1

trying now for 3h - i'll give up :(

Version 0, edited 15 years ago by anonymous (next)

in reply to:  3 comment:4 by osimons, 15 years ago

Replying to anonymous:

> same error here:
>     scheme, args = _parse_db_str(self.connection_uri)
>   File "c:\xampp\python24\lib\site-packages\trac-0.10.3-py2.4.egg\trac\db\api.py
> ", line 110, in _parse_db_str
>     scheme, rest = db_str.split(':', 1)
> ValueError: need more than 1 value to unpack

Like the previous solution, it does look like the database string you enter during initenv is incorrect - it should be two parts, one indicating backend type, the other connection data. If you use sqlite (default) you just hit 'return' and accept default string (sqlite:db/trac.db) - if you use other backend look to DatabaseBackend to find examples of connection strings.

comment:5 by sid, 15 years ago

Keywords: needinfo added

Can you provide the database string you were using? Please let us know if this fixes your problem.

comment:6 by Christian Boos, 14 years ago

Resolution: worksforme
Status: reopenedclosed

No feedback given, closing.

comment:7 by anonymous, 14 years ago

I had the same problem. As explained in a comment before it was for a incorrect db string.

I was using : db/trac.db and get the error.

Used this solved the problem: sqlite:db/mtbsnp.db

comment:8 by anonymous, 13 years ago

Resolution: worksforme
Status: closedreopened

getting this error:-

Creating and Initializing Project
Failed to create environment. need more than 1 value to unpack
Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/Trac-0.11-py2.5.egg/trac/admin/console.py", line 543, in do_initenv
    options=options)
  File "/usr/lib/python2.5/site-packages/Trac-0.11-py2.5.egg/trac/env.py", line 188, in __init__
    self.create(options)
  File "/usr/lib/python2.5/site-packages/Trac-0.11-py2.5.egg/trac/env.py", line 311, in create
    DatabaseManager(self).init_db()
  File "/usr/lib/python2.5/site-packages/Trac-0.11-py2.5.egg/trac/db/api.py", line 69, in init_db
    connector, args = self._get_connector()
  File "/usr/lib/python2.5/site-packages/Trac-0.11-py2.5.egg/trac/db/api.py", line 85, in _get_connector
    scheme, args = _parse_db_str(self.connection_uri)
  File "/usr/lib/python2.5/site-packages/Trac-0.11-py2.5.egg/trac/db/api.py", line 111, in _parse_db_str
    scheme, rest = db_str.split(':', 1)
ValueError: need more than 1 value to unpack

Using trac.db so pls help me……

Last edited 9 years ago by Ryan J Ollos (previous) (diff)

in reply to:  8 comment:9 by osimons, 13 years ago

Resolution: worksforme
Status: reopenedclosed

Replying to anonymous:

Using trac.db so pls help me……

You should be using sqlite:db/trac.db (or just 'Return' to accept the identical default value). Read comments above.

Modify Ticket

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