#5161 closed defect (wontfix)
AttributeError with trac-admin
Reported by: | Owned by: | Christopher Lenz | |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | admin/console | Version: | devel |
Severity: | normal | Keywords: | python25 verify |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
First: Sorry for the bad english!
I use trac from svn and have version 5198
As root i drop of a commandline:
# trac-admin ./sv-studio initenv
This results in:
Creating and Initializing Project Failed to create environment. 'NoneType' object has no attribute 'split' Traceback (most recent call last): File "/usr/lib/python2.5/site-packages/trac/admin/console.py", line 533, in do_initenv options=options) File "/usr/lib/python2.5/site-packages/trac/env.py", line 172, in __init__ self.create(options) File "/usr/lib/python2.5/site-packages/trac/env.py", line 283, in create DatabaseManager(self).init_db() File "/usr/lib/python2.5/site-packages/trac/db/api.py", line 69, in init_db connector, args = self._get_connector() File "/usr/lib/python2.5/site-packages/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/db/api.py", line 111, in _parse_db_str scheme, rest = db_str.split(':', 1) AttributeError: 'NoneType' object has no attribute 'split'
Attachments (0)
Change History (10)
follow-up: 2 comment:1 by , 18 years ago
Keywords: | needinfo added |
---|
comment:2 by , 18 years ago
Which string did you specify for the DB string?
Database connection string [sqlite:db/trac.db]>
I have specified 2 DB-strings:
- 1st: only press <RETURN>
- 2nd: because the error I have typed "sqlite:db/trac.db"
Have you updated from a previous release, is there any other Trac environment installed on your machine?
No updated or previous installation of trac.
comment:3 by , 18 years ago
I have still the same error.
(git-changeset: genshi: 562, trac:5292)
Now I have included a trac-strace.
comment:5 by , 17 years ago
No!
I get the same error.
consoleoutput (and input) trac from svn (rev:6038):
silvio@zwielicht ~/TRAC % /usr/bin/trac-admin /home/silvio/TRAC/testrepo-trac initenv Creating a new Trac environment at /home/silvio/TRAC/testrepo-trac Trac will first ask a few questions about your environment in order to initalize and prepare the project database. Please enter the name of your project. This name will be used in page titles and descriptions. Project Name [My Project]> testrepo Please specify the connection string for the database to use. By default, a local SQLite database is created in the environment directory. It is also possible to use an already existing PostgreSQL database (check the Trac documentation for the exact connection string syntax). Database connection string [sqlite:db/trac.db]> Please specify the type of version control system, By default, it will be svn. If you don't want to use Trac with version control integration, choose the default here and don't specify a repository directory. in the next question. Repository type [svn]> Please specify the absolute path to the version control repository, or leave it blank to use Trac without a repository. You can also set the repository location later. Path to repository [/path/to/repos]> /home/silvio/TRAC/testrepo-svn Creating and Initializing Project Failed to create environment. 'NoneType' object has no attribute 'split' Traceback (most recent call last): File "/usr/lib/python2.5/site-packages/trac/admin/console.py", line 533, in do_initenv options=options) File "/usr/lib/python2.5/site-packages/trac/env.py", line 175, in __init__ self.create(options) File "/usr/lib/python2.5/site-packages/trac/env.py", line 286, in create DatabaseManager(self).init_db() File "/usr/lib/python2.5/site-packages/trac/db/api.py", line 69, in init_db connector, args = self._get_connector() File "/usr/lib/python2.5/site-packages/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/db/api.py", line 111, in _parse_db_str scheme, rest = db_str.split(':', 1) AttributeError: 'NoneType' object has no attribute 'split'
follow-up: 7 comment:6 by , 17 years ago
Keywords: | python25 verify added; needinfo removed |
---|---|
Milestone: | → 0.11.1 |
Quite strange. Which platform are you using?
comment:7 by , 17 years ago
Replying to cboos:
Quite strange. Which platform are you using?
I'm using archlinux.
silvio@zwielicht ~/TRAC % uname -a Linux zwielicht 2.6.22-ARCH #1 SMP PREEMPT Wed Sep 26 20:57:40 CEST 2007 i686 AMD Athlon(tm) 64 X2 Dual Core Pro cessor 4200+ AuthenticAMD GNU/Linux silvio@zwielicht ~ % python -V Python 2.5.1 silvio@zwielicht ~ % pacman -Qi glibc Name : glibc Version : 2.6.1-2 [...] silvio@zwielicht ~ % pacman -Qi python-genshi Name : python-genshi Version : 0.4.3-1 [...]
Which another information can u need? I will provide!
follow-up: 9 comment:8 by , 17 years ago
i'm getting same thing…
-bash-3.2$ trac-admin trac initenv Creating a new Trac environment at /usr/home/alexus/alexus/XXXXX.com/trac Trac will first ask a few questions about your environment in order to initalize and prepare the project database. Please enter the name of your project. This name will be used in page titles and descriptions. Project Name [My Project]> XXXXX Please specify the connection string for the database to use. By default, a local SQLite database is created in the environment directory. It is also possible to use an already existing PostgreSQL database (check the Trac documentation for the exact connection string syntax). Database connection string [sqlite:db/trac.db]> Please specify the type of version control system, By default, it will be svn. If you don't want to use Trac with version control integration, choose the default here and don't specify a repository directory. in the next question. Repository type [svn]> Please specify the absolute path to the version control repository, or leave it blank to use Trac without a repository. You can also set the repository location later. Path to repository [/path/to/repos]> /home/alexus/alexus/XXXXX.com/svn Please enter location of Trac page templates. Default is the location of the site-wide templates installed with Trac. Templates directory [/usr/local/share/trac/templates]> Creating and Initializing Project Failed to create environment. database parameter must be string or APSW Connection object Traceback (most recent call last): File "/usr/local/lib/python2.5/site-packages/trac/scripts/admin.py", line 613, in do_initenv options=options) File "/usr/local/lib/python2.5/site-packages/trac/env.py", line 145, in __init__ self.create(options) File "/usr/local/lib/python2.5/site-packages/trac/env.py", line 250, in create DatabaseManager(self).init_db() File "/usr/local/lib/python2.5/site-packages/trac/db/api.py", line 70, in init_db connector.init_db(**args) File "/usr/local/lib/python2.5/site-packages/trac/db/sqlite_backend.py", line 121, in init_db cnx = sqlite.connect(path, timeout=int(params.get('timeout', 10000))) ValueError: database parameter must be string or APSW Connection object -bash-3.2$
comment:9 by , 17 years ago
Replying to alexus:
i'm getting same thing…
No, it's not: search:"database parameter must be string or APSW Connection object"
i.e. for your problem, see #6585.
comment:10 by , 16 years ago
Milestone: | 0.11-retriage |
---|---|
Resolution: | → wontfix |
Status: | new → closed |
Not reproducible, closing.
Which string did you specify for the DB string?
Have you updated from a previous release, is there any other Trac environment installed on your machine?