Edgewall Software
Modify

Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#10424 closed defect (worksforme)

trac-admin: Failed to create environment (invalid literal for int() )

Reported by: stani.gaj@… Owned by:
Priority: normal Milestone:
Component: admin/console Version: 0.12.2
Severity: normal Keywords: trac-admin python
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

Due to a crashed hard drive I had to reinstall Trac 0.12.2 (stable) on a new system (Ubuntu 10.10) However, it does not allow me to set up the initial environments of new projects.

What I do is

trac-admin /var/tracprojects/project initenv

After supplying information about the PROJECT NAME and MYSQL database the following error pops up:

  Creating and Initializing Project
  Initenv for '/var/tracprojects/project' failed. 
  Failed to create environment.
  invalid literal for int() with base 10: ''
  Traceback (most recent call last):
    File "build/bdist.linux-x86_64/egg/trac/admin/console.py", line 422, in do_initenv
      options=options)
    File "build/bdist.linux-x86_64/egg/trac/env.py", line 213, in __init__
      self.create(options)
    File "build/bdist.linux-x86_64/egg/trac/env.py", line 401, in create
      DatabaseManager(self).init_db()
    File "build/bdist.linux-x86_64/egg/trac/db/api.py", line 145, in init_db
      connector, args = self.get_connector()
    File "build/bdist.linux-x86_64/egg/trac/db/api.py", line 183, in get_connector
      scheme, args = _parse_db_str(self.connection_uri)
    File "build/bdist.linux-x86_64/egg/trac/db/api.py", line 260, in _parse_db_str
      port = int(port)
  ValueError: invalid literal for int() with base 10: ''

Updating trac to the latest 0.13-dev does not solve the issue.

Attachments (0)

Change History (3)

comment:1 by Remy Blank, 13 years ago

It looks like you have an invalid database connection string. Can you please post the value of the [trac] database option in trac.ini?

comment:2 by stani.gaj@…, 13 years ago

Resolution: fixed
Status: newclosed

[trac] database = mysql://login:ntrac123@localhost:/ntc_trac

Hm, you're right. I removed the : and it works now!

comment:3 by Remy Blank, 13 years ago

Resolution: fixedworksforme

That's what I suspected, yes.

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.