Edgewall Software
Modify

Opened 14 years ago

Closed 13 years ago

#8428 closed defect (duplicate)

NameError: global name 'sqlite' is not defined

Reported by: Édson Kuzniewski Owned by: Christian Boos
Priority: normal Milestone:
Component: database backend Version: 0.11.4
Severity: trivial Keywords:
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

I made an update of trac 0.10.4 for 0.11.4, but when to execute the command of the “improvement trac-admin /home/ekenix/rvsubversion/trac” is me that it appears this error! , that I must make? forgives my English!
SQLite v3.5.7
Python v2.4

[root@pegasus /]# trac-admin /home/ekenix/rvsubversion/trac upgrade
18:43:33 Trac[loader] DEBUG: Loading trac.ticket.web_ui from /usr/local/lib/python2.4/site-packages/Trac-0.11.4-py2.4.egg
18:43:33 Trac[loader] DEBUG: Loading trac.mimeview.php from /usr/local/lib/python2.4/site-packages/Trac-0.11.4-py2.4.egg
18:43:33 Trac[loader] DEBUG: Loading trac.ticket.query from /usr/local/lib/python2.4/site-packages/Trac-0.11.4-py2.4.egg
18:43:33 Trac[loader] DEBUG: Loading trac.attachment from /usr/local/lib/python2.4/site-packages/Trac-0.11.4-py2.4.egg
18:43:33 Trac[loader] DEBUG: Loading trac.versioncontrol.svn_fs from /usr/local/lib/python2.4/site-packages/Trac-0.11.4-py2.4.egg
18:43:33 Trac[loader] DEBUG: Loading trac.mimeview.patch from /usr/local/lib/python2.4/site-packages/Trac-0.11.4-py2.4.egg
18:43:33 Trac[loader] DEBUG: Loading trac.mimeview.txtl from /usr/local/lib/python2.4/site-packages/Trac-0.11.4-py2.4.egg
18:43:33 Trac[loader] DEBUG: Skipping "trac.mimeview.txtl = trac.mimeview.txtl [textile]": ("DistributionNotFound: textile>=2.0" not found)
18:43:33 Trac[loader] DEBUG: Loading trac.admin.web_ui from /usr/local/lib/python2.4/site-packages/Trac-0.11.4-py2.4.egg
18:43:33 Trac[loader] DEBUG: Loading trac.ticket.admin from /usr/local/lib/python2.4/site-packages/Trac-0.11.4-py2.4.egg
18:43:33 Trac[loader] DEBUG: Loading trac.mimeview.rst from /usr/local/lib/python2.4/site-packages/Trac-0.11.4-py2.4.egg
18:43:33 Trac[loader] DEBUG: Skipping "trac.mimeview.rst = trac.mimeview.rst [rest]": ("DistributionNotFound: docutils>=0.3" not found)
18:43:33 Trac[loader] DEBUG: Loading trac.db.postgres from /usr/local/lib/python2.4/site-packages/Trac-0.11.4-py2.4.egg
18:43:33 Trac[loader] DEBUG: Loading trac.versioncontrol.web_ui from /usr/local/lib/python2.4/site-packages/Trac-0.11.4-py2.4.egg
18:43:33 Trac[loader] DEBUG: Loading trac.timeline from /usr/local/lib/python2.4/site-packages/Trac-0.11.4-py2.4.egg
18:43:33 Trac[loader] DEBUG: Loading trac.mimeview.pygments from /usr/local/lib/python2.4/site-packages/Trac-0.11.4-py2.4.egg
18:43:33 Trac[loader] DEBUG: Skipping "trac.mimeview.pygments = trac.mimeview.pygments [pygments]": ("DistributionNotFound: Pygments>=0.6" not found)
18:43:33 Trac[loader] DEBUG: Loading trac.about from /usr/local/lib/python2.4/site-packages/Trac-0.11.4-py2.4.egg
18:43:33 Trac[loader] DEBUG: Loading trac.ticket.roadmap from /usr/local/lib/python2.4/site-packages/Trac-0.11.4-py2.4.egg
18:43:33 Trac[loader] DEBUG: Loading trac.mimeview.silvercity from /usr/local/lib/python2.4/site-packages/Trac-0.11.4-py2.4.egg
18:43:33 Trac[loader] DEBUG: Skipping "trac.mimeview.silvercity = trac.mimeview.silvercity [silvercity]": ("DistributionNotFound: SilverCity>=0.9.4" not found)
18:43:33 Trac[loader] DEBUG: Loading trac.wiki.macros from /usr/local/lib/python2.4/site-packages/Trac-0.11.4-py2.4.egg
18:43:33 Trac[loader] DEBUG: Loading trac.db.sqlite from /usr/local/lib/python2.4/site-packages/Trac-0.11.4-py2.4.egg
18:43:33 Trac[loader] DEBUG: Loading trac.wiki.web_ui from /usr/local/lib/python2.4/site-packages/Trac-0.11.4-py2.4.egg
18:43:33 Trac[loader] DEBUG: Loading trac.mimeview.enscript from /usr/local/lib/python2.4/site-packages/Trac-0.11.4-py2.4.egg
18:43:33 Trac[loader] DEBUG: Loading trac.web.auth from /usr/local/lib/python2.4/site-packages/Trac-0.11.4-py2.4.egg
18:43:33 Trac[loader] DEBUG: Loading trac.admin.console from /usr/local/lib/python2.4/site-packages/Trac-0.11.4-py2.4.egg
18:43:33 Trac[loader] DEBUG: Loading trac.db.mysql from /usr/local/lib/python2.4/site-packages/Trac-0.11.4-py2.4.egg
18:43:33 Trac[loader] DEBUG: Loading trac.search from /usr/local/lib/python2.4/site-packages/Trac-0.11.4-py2.4.egg
18:43:33 Trac[loader] DEBUG: Loading trac.prefs from /usr/local/lib/python2.4/site-packages/Trac-0.11.4-py2.4.egg
18:43:33 Trac[loader] DEBUG: Loading trac.ticket.report from /usr/local/lib/python2.4/site-packages/Trac-0.11.4-py2.4.egg
Traceback (most recent call last):
  File "/usr/local/bin/trac-admin", line 7, in ?
    sys.exit(
  File "/usr/local/lib/python2.4/site-packages/Trac-0.11.4-py2.4.egg/trac/admin/console.py", line 1317, in run
    return admin.onecmd(command)
  File "/usr/local/lib/python2.4/site-packages/Trac-0.11.4-py2.4.egg/trac/admin/console.py", line 133, in onecmd
    rv = cmd.Cmd.onecmd(self, line) or 0
  File "/usr/local/lib/python2.4/cmd.py", line 219, in onecmd
    return func(arg)
  File "/usr/local/lib/python2.4/site-packages/Trac-0.11.4-py2.4.egg/trac/admin/console.py", line 1147, in do_upgrade
    self.db_open()
  File "/usr/local/lib/python2.4/site-packages/Trac-0.11.4-py2.4.egg/trac/admin/console.py", line 180, in db_open
    return self.env_open().get_db_cnx()
  File "/usr/local/lib/python2.4/site-packages/Trac-0.11.4-py2.4.egg/trac/env.py", line 273, in get_db_cnx
    return DatabaseManager(self).get_connection()
  File "/usr/local/lib/python2.4/site-packages/Trac-0.11.4-py2.4.egg/trac/db/api.py", line 76, in get_connection
    return self._cnx_pool.get_cnx(self.timeout or None)
  File "/usr/local/lib/python2.4/site-packages/Trac-0.11.4-py2.4.egg/trac/db/pool.py", line 174, in get_cnx
    return _backend.get_cnx(self._connector, self._kwargs, timeout)
  File "/usr/local/lib/python2.4/site-packages/Trac-0.11.4-py2.4.egg/trac/db/pool.py", line 107, in get_cnx
    cnx = connector.get_connection(**kwargs)
  File "/usr/local/lib/python2.4/site-packages/Trac-0.11.4-py2.4.egg/trac/db/sqlite_backend.py", line 122, in get_connection
    self._version = get_pkginfo(sqlite).get(
NameError: global name 'sqlite' is not defined

Attachments (0)

Change History (7)

comment:1 by Emmanuel Blot, 14 years ago

Component: generaldatabase backend
Summary: hi, i need help for this problem.NameError: global name 'sqlite' is not defined
Type: enhancementdefect
Version: none0.11.4

hi, i need help for this problem.

Did you really think this summary described the error you got? You probably missed this part: NewTicketGuidelines#HowtoProceed

Check out #3488.

comment:2 by Édson Kuzniewski, 14 years ago

  • humm sorry''
  • System Information
    • Operating System: CENTOS 4.7 i686 standard
    • Python: 2.3 and 2.4
    • SQLite: 3.5.7
    • Subversion: 1.4.5
    • Trac 0.10.4
    • Cpanel+RVSkin+Subversion and Trac
  • when executing the command “trac-admin” it is pointing me with respect to Python 2.4! being that he is installed in 2.3.

comment:3 by Christian Boos, 14 years ago

Milestone: 0.11.6
Severity: normaltrivial

Make sure PySqlite is installed for Python 2.4. It seems you have it installed for Python 2.3 only (which doesn't matter here as you've installed Trac for Python 2.4 - and let's hope the Python bindings for svn as well).

Check PySqlite#Troubleshooting (and if needed later TracSubversion#Troubleshooting).

Though this is an InstallationIssue, maybe we could provide a better error message here rather than just a backtrace.

comment:4 by Édson Kuzniewski, 14 years ago

approval, I am entering in the maillist to take very to remain of my doubts, thanks a lot.

therefore my problem is here in this! in Python 2,3 the command “import sqlite” functions but in version 2.4… I do not believe that it is lacking some thing, but in both the PySqlite is installed.

[root@pegasus /]# python2.3 
Python 2.3.4 (#1, Jul 25 2008, 14:24:21) 
[GCC 3.4.6 20060404 (Red Hat 3.4.6-10)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import sqlite
>>> sqlite.version
'1.1.7'
>>> sqlite._sqlite.sqlite_version()
'3.3.6'
>>> 
[root@pegasus /]# python2.4
Python 2.4.3 (#1, Apr 15 2008, 19:00:12) 
[GCC 3.4.6 20060404 (Red Hat 3.4.6-9)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import sqlite 
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
ImportError: No module named sqlite
>>> 

comment:5 by Christian Boos, 14 years ago

Hm … (#3232 at work here)

comment:6 by Christian Boos, 14 years ago

Milestone: 0.11.60.12.1
Owner: set to Christian Boos

comment:7 by Christian Boos, 13 years ago

Milestone: 0.12.1
Resolution: duplicate
Status: newclosed

Closing in favor of #8562.

Modify Ticket

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