Changes between Initial Version and Version 3 of Ticket #9098
- Timestamp:
- Sep 15, 2012, 10:49:10 PM (12 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #9098 – Description
initial v3 2 2 3 3 The command I'm using is: 4 {{{ 5 #!sh 4 6 ./sqlite2pg.py -e /path/to/trac -p 'postgres://user:pass@localhost:5432/trac' 5 7 }}} 6 8 7 9 The stack trace I'm getting is: 10 {{{ 11 #!sh 8 12 Traceback (most recent call last): 9 13 File "./sqlite2pg.py", line 335, in <module> … … 25 29 raise TracError('Unsupported database type "%s"' % scheme) 26 30 trac.core.TracError: Unsupported database type "postgres" 27 31 }}} 28 32 29 33 The sys.path is: 34 {{{ 30 35 ['/root', '/usr/lib/python2.6', '/usr/lib/python2.6/plat-linux2', 31 36 '/usr/lib/python2.6/lib-tk', '/usr/lib/python2.6/lib-old', … … 33 38 '/usr/lib/python2.6/dist-packages/PIL', '/usr/lib/pymodules/python2.6', 34 39 '/usr/lib/pymodules/python2.6/gtk-2.0', '/usr/local/lib/python2.6/dist-packages'] 35 40 }}} 36 41 37 42 The relevant modules are located in the sys.path path: 43 {{{ 38 44 /usr/lib/python2.6/dist-packages/psycopg2 39 45 /usr/lib/python2.6/dist-packages/trac 40 46 /usr/lib/python2.6/dist-packages/trac/db/postgres_backend.py 41 47 /usr/lib/python2.6/dist-packages/trac/db/sqlite_backend.py 42 48 }}} 43 49 44 50 Debugging output shows that the script finds psycopg2, but doesn't load the PG connector: 51 {{{ 45 52 has_psycopg: True 46 53 scheme: postgres 47 54 connectors: [<trac.db.sqlite_backend.SQLiteConnector object at 0x1c12b10>] 48 55 candidates: [] 49 56 }}} 50 57 51 58 And, 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 52 59 53 54 60 Cheers, 55 61 Ryan