Changes between Initial Version and Version 3 of Ticket #9098


Ignore:
Timestamp:
Sep 15, 2012, 10:49:10 PM (12 years ago)
Author:
Ryan J Ollos
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #9098 – Description

    initial v3  
    22
    33The command I'm using is:
     4{{{
     5#!sh
    46./sqlite2pg.py -e /path/to/trac -p 'postgres://user:pass@localhost:5432/trac'
    5 
     7}}}
    68
    79The stack trace I'm getting is:
     10{{{
     11#!sh
    812Traceback (most recent call last):
    913  File "./sqlite2pg.py", line 335, in <module>
     
    2529    raise TracError('Unsupported database type "%s"' % scheme)
    2630trac.core.TracError: Unsupported database type "postgres"
    27 
     31}}}
    2832
    2933The sys.path is:
     34{{{
    3035['/root', '/usr/lib/python2.6', '/usr/lib/python2.6/plat-linux2',
    3136'/usr/lib/python2.6/lib-tk', '/usr/lib/python2.6/lib-old',
     
    3338'/usr/lib/python2.6/dist-packages/PIL', '/usr/lib/pymodules/python2.6',
    3439'/usr/lib/pymodules/python2.6/gtk-2.0', '/usr/local/lib/python2.6/dist-packages']
    35 
     40}}}
    3641
    3742The relevant modules are located in the sys.path path:
     43{{{
    3844/usr/lib/python2.6/dist-packages/psycopg2
    3945/usr/lib/python2.6/dist-packages/trac
    4046/usr/lib/python2.6/dist-packages/trac/db/postgres_backend.py
    4147/usr/lib/python2.6/dist-packages/trac/db/sqlite_backend.py
    42 
     48}}}
    4349
    4450Debugging output shows that the script finds psycopg2, but doesn't load the PG connector:
     51{{{
    4552has_psycopg: True
    4653scheme: postgres
    4754connectors: [<trac.db.sqlite_backend.SQLiteConnector object at 0x1c12b10>]
    4855candidates: []
    49 
     56}}}
    5057
    5158And, that's the reason the script fails, and the reason I've filed this ticket. The 'postgres' schema doesn't match any in the candidates list.  I truly don't believe this is a path issue, given the information above.  A thread I started on the trac-users mailing list can be found archived here, in case it helps to fill in any gaps: http://www.gossamer-threads.com/lists/trac/users/48799
    5259
    53 
    5460Cheers,
    5561Ryan