Edgewall Software

Changes between Version 18 and Version 19 of PySqlite


Ignore:
Timestamp:
Aug 1, 2006, 11:09:35 AM (18 years ago)
Author:
Emmanuel Blot
Comment:

Add a note about sqlite module issues

Legend:

Unmodified
Added
Removed
Modified
  • PySqlite

    v18 v19  
    177177See #2356, #ps20.
    178178
     179==== `NameError: global name 'sqlite' is not defined` ====
     180
     181This error usually comes from an invalid PySqlite installation:[[BR]]
     182The Python interpreter is not able to import the sqlite module.
     183{{{
     184...
     185File ".../python2.3/site-packages/trac/db.py", line 321, in init_db
     186    cnx = sqlite.connect(path, timeout=int(params.get('timeout', 10000)))
     187NameError: global name 'sqlite' is not defined
     188...
     189}}}
     190
     191 * Check that the sqlite Python module can be load from a Python interpreter
     192{{{
     193python
     194>>> import sqlite
     195}}}
     196 * Check that the Python intepreter that is run from the web server can find this module.[[BR]]
     197  The default path for this module is `<python_lib_dir>/site-packages`. If you've installed the module in another directory, make sure the `sys.path` variable is set up with this directory (more on this in TracCgi, TracModPython, TracFastCgi).
     198
     199A common mistake is to install PySqlite for one Python interpreter, and run the server with another Python interpreter: both interpreters do not use the same paths to search for modules.
     200
    179201=== Other issues ===
    180202