#8562 closed defect (worksforme)
trac-admin ... initenv: Skips a question. Why?
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | admin/console | Version: | 0.11.5 |
Severity: | minor | Keywords: | install console |
Cc: | Thijs Triemstra | Branch: | |
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
Hi,
i am new to trac and i can not get a solution by the documentation and the IRC channel. So from my point of view it is a bug:
When i run: trac-admin /usr/local/apache/htdocs/tractest initenv I get some questions that i am required to answer. I notices that one question is displayed but without the possibility to answer it.
Question is about databas connection string. Trac-admin jumps directly to the SVN question (where i hit ENTER, because i do not want to use a svn repo).
This leads in the following error message:
Creating and Initializing Project Initenv for '/usr/local/apache/htdocs/tractest2' failed. 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.5-py2.5.egg/trac/admin/console.py", line 578, in do_initenv options=options) File "/usr/lib/python2.5/site-packages/Trac-0.11.5-py2.5.egg/trac/env.py", line 204, in __init__ self.create(options) File "/usr/lib/python2.5/site-packages/Trac-0.11.5-py2.5.egg/trac/env.py", line 334, in create DatabaseManager(self).init_db() File "/usr/lib/python2.5/site-packages/Trac-0.11.5-py2.5.egg/trac/db/api.py", line 80, in init_db connector, args = self._get_connector() File "/usr/lib/python2.5/site-packages/Trac-0.11.5-py2.5.egg/trac/db/api.py", line 118, in _get_connector scheme, args = _parse_db_str(self.connection_uri) File "/usr/lib/python2.5/site-packages/Trac-0.11.5-py2.5.egg/trac/db/api.py", line 146, in _parse_db_str scheme, rest = db_str.split(':', 1) ValueError: need more than 1 value to unpack
As far as i understand the connection string is wrong. But for me there is no way to change it (question was skipped before by trac-admin).
Is there a global setting that forces trac-admin to skip this question?
How can i solve my problem?
Best regards Daniela Waranie
PS: my version of trac: 0.11.5; sqlite 2.8.17-4 AND 3.5.9.6 are installed Pysqlite2 2.4.1-1
Attachments (0)
Change History (13)
comment:1 by , 15 years ago
comment:2 by , 15 years ago
My problem is still unsolved, even with the above fix.
Python is now setup very well and pass the test as defined here: 'Determine actual SQLite and PySqlite version' (http://trac.edgewall.org/wiki/PySqlite#DetermineactualSQLiteandPySqliteversion)
The error message is the same and the question about the connection string is still skipped by trac-admin.
What is the problem?
comment:3 by , 15 years ago
By the way: This is only a problem when using the interactive mode of trac-admin.
This call works for non-interactive mode: trac-admin /usr/local/apache/htdocs/tractest initenv tractest sqlite:db/trac.db svn http://dev.testdomain.net:8080/repos/company_project1/trunk/
follow-up: 5 comment:4 by , 15 years ago
Keywords: | sqlite install added |
---|---|
Milestone: | → 0.12 |
See also #8428.
We should try to make the install more robust and properly report what's missing.
comment:5 by , 15 years ago
Keywords: | console added; sqlite removed |
---|---|
Milestone: | 0.12 → 0.12.1 |
Severity: | normal → minor |
comment:6 by , 15 years ago
Why not make the trac egg declare sqlite as a mandatory dependency. most users use trac with the sqlite backend so that it would actually make sense?
I think that under ubuntu, when installing trac, sqlite is already defined as a mandatory dependency.
comment:7 by , 15 years ago
I had the same effect (skipping questions) when using the Shell of Remote System Explorer in Eclipse. If seems that the Remote System Explorer Shell do not support the "interactive mode"… May be there is an option to enable the "interactive mode" support, but i can not find a checkbox for that. Please correct me if i am wrong.
comment:9 by , 14 years ago
Cc: | added |
---|
follow-up: 11 comment:10 by , 14 years ago
Cc: | added; removed |
---|
I'm not able to reproduce this:
thijs@ubuntu:/tmp$ trac-admin test initenv Creating a new Trac environment at /tmp/test Trac will first ask a few questions about your environment in order to initialize 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]> 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]> sqlit:dv/trac.db Creating and Initializing Project Initenv for '/tmp/test' failed. Failed to create environment. Unknown scheme "sqlit"; database connection string must start with {scheme}:/ Traceback (most recent call last): File "/home/thijs/workspaces/opensource/trac-trunk/trac/admin/console.py", line 421, in do_initenv options=options) File "/home/thijs/workspaces/opensource/trac-trunk/trac/core.py", line 124, in __call__ self.__init__(*args, **kwargs) File "/home/thijs/workspaces/opensource/trac-trunk/trac/env.py", line 250, in __init__ self.create(options) File "/home/thijs/workspaces/opensource/trac-trunk/trac/env.py", line 514, in create DatabaseManager(self).init_db() File "/home/thijs/workspaces/opensource/trac-trunk/trac/db/api.py", line 227, in init_db connector, args = self.get_connector() File "/home/thijs/workspaces/opensource/trac-trunk/trac/db/api.py", line 275, in get_connector scheme, args = _parse_db_str(self.connection_uri) File "/home/thijs/workspaces/opensource/trac-trunk/trac/db/api.py", line 323, in _parse_db_str scheme=scheme)) TracError: Unknown scheme "sqlit"; database connection string must start with {scheme}:/
comment:11 by , 14 years ago
Milestone: | next-minor-0.12.x |
---|---|
Resolution: | → worksforme |
Status: | new → closed |
Replying to thijstriemstra:
I'm not able to reproduce this: […]
Assuming this has been fixed at some point.
If someone sees again the problem and can give steps to reproduce it, then please reopen.
comment:12 by , 14 years ago
Hi all,
i am no longer using trac but maybe i can give you a meaningful hint. Try to reproducte the error using a ssh/scp client that is not able to show programm output / input in a interactive-mode. WinSCP is such a client. Or RSE in Eclipse.
comment:13 by , 14 years ago
Hi there! can anyone tell me what is going on in this kind of error?I am trying to configure trac and create an environment but it displays these kind of error. I wasn't able to create an environment..What should i do?
C:\Python26\Scripts>trac-admin trac initenv Traceback (most recent call last): File "C:\Python26\Scripts\trac-admin-script.py", line 5, in <module> from pkg_resources import load_entry_point File "C:\Python26\lib\site-packages\pkg_resources.py", line 2607, in <module> parse_requirements(__requires__), Environment() File "C:\Python26\lib\site-packages\pkg_resources.py", line 565, in resolve raise DistributionNotFound(req) # XXX put more info here pkg_resources.DistributionNotFound: Genshi>=0.6
I found out that the python module 'sqlite' was not installed.
trac-admin should check it (e.g. with 'import sqlite' and catch the exception). I am not a python developer, so please add this if you are a python developer.
A version check for this module should be added to.