Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 232162 - python-sqlite2 breaks trac
Summary: python-sqlite2 breaks trac
Keywords:
Status: CLOSED DUPLICATE of bug 231836
Alias: None
Product: Fedora
Classification: Fedora
Component: trac
Version: 6
Hardware: i386
OS: Linux
medium
high
Target Milestone: ---
Assignee: Jeffrey C. Ollie
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-03-14 01:31 UTC by Tim Niemueller
Modified: 2007-11-30 22:11 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2007-03-14 02:34:55 UTC


Attachments (Terms of Use)

Description Tim Niemueller 2007-03-14 01:31:23 UTC
Description of problem:
After upgrading trac from Extras and installing the now-required dependency
python-sqlite2 trac no longer works in a mod_python environment (500 Internal
Server Error).

Version-Release number of selected component (if applicable):
trac-0.10.3.1-1.fc6
python-sqlite2-2.3.2-2.fc6


How reproducible:
Always

Steps to Reproduce:
1. Have working installation before upgrade
2. Upgrade packages
  
Actual results:
500 Internal Server Error

Expected results:
Working trac.

Additional info:
The log entries in the error log (prefixes removed):
PythonHandler trac.web.modpython_frontend: Traceback (most recent call last):
PythonHandler trac.web.modpython_frontend:   File
"/usr/lib/python2.4/site-packages/mod_python/apache.py", line 299, in
HandlerDispatch\n    result = object(req)
PythonHandler trac.web.modpython_frontend:   File
"/usr/lib/python2.4/site-packages/trac/web/modpython_frontend.py", line 87, in
handler\n    gateway.run(dispatch_request)
PythonHandler trac.web.modpython_frontend:   File
"/usr/lib/python2.4/site-packages/trac/web/wsgi.py", line 87, in run\n   
response = application(self.environ, self._start_response)
PythonHandler trac.web.modpython_frontend:   File
"/usr/lib/python2.4/site-packages/trac/web/main.py", line 377, in
dispatch_request\n    env = _open_environment(env_path, run_once=run_once)
PythonHandler trac.web.modpython_frontend:   File
"/usr/lib/python2.4/site-packages/trac/web/main.py", line 58, in
_open_environment\n    env_cache[env_path] = open_environment(env_path)
PythonHandler trac.web.modpython_frontend:   File
"/usr/lib/python2.4/site-packages/trac/env.py", line 435, in open_environment\n
   if env.needs_upgrade():
PythonHandler trac.web.modpython_frontend:   File
"/usr/lib/python2.4/site-packages/trac/env.py", line 313, in needs_upgrade\n   
db = self.get_db_cnx()
PythonHandler trac.web.modpython_frontend:   File
"/usr/lib/python2.4/site-packages/trac/env.py", line 182, in get_db_cnx\n   
return DatabaseManager(self).get_connection()
PythonHandler trac.web.modpython_frontend:   File
"/usr/lib/python2.4/site-packages/trac/db/api.py", line 75, in get_connection\n
   return self._cnx_pool.get_cnx(self.timeout or None)
PythonHandler trac.web.modpython_frontend:   File
"/usr/lib/python2.4/site-packages/trac/db/pool.py", line 101, in get_cnx\n   
cnx = self._connector.get_connection(**self._kwargs)
PythonHandler trac.web.modpython_frontend:   File
"/usr/lib/python2.4/site-packages/trac/db/sqlite_backend.py", line 113, in
get_connection\n    return SQLiteConnection(path, params)
PythonHandler trac.web.modpython_frontend:   File
"/usr/lib/python2.4/site-packages/trac/db/sqlite_backend.py", line 160, in
__init__\n    timeout=timeout)
PythonHandler trac.web.modpython_frontend: SystemError: NULL result without
error in PyObject_Call

The last file mentioned makes clear that the problem is with the new
python-sqlite2 dependency. The problem can be temporarily fixed with
mv /usr/lib/python2.4/site-packages/pysqlite2/ .
and restarting httpd.

The mentioned code fragment distinguishes between python-sqlite 1 and 2 and
obviously it can work with both. Why has the version 2 dependency been added if
it obviously works without this?

Comment 1 Jeffrey C. Ollie 2007-03-14 02:34:55 UTC
Upgrade to the -2 version of the trac package - it should be available in the
repos now.  You can then remove the python-sqlite2 package.

*** This bug has been marked as a duplicate of 231836 ***


Note You need to log in before you can comment on or make changes to this bug.