I have a Trac instance that I've had running happily on postgresql for a week or so now.
I have installed the
PdfPreviewPlugin but couldn't get it to work. I went hunting through the plugin's bug list and found
this one which indicated that I needed to run
trac-admin deploy after installing (no mention of this in the installation instructions!)
After running trac-admin /path/to/my/trac/instance deploy /path/to/web/root and then restarting apache, my site is now completely broken, simply displaying:
Trac Error
TracError: Unable to check for upgrade of trac.db.api.DatabaseManager: TracError: Unsupported database type "postgres"
on the home page or any other URL within my site.
I'm mystified as to why doing a trac-admin deploy would even cause the db-connection to break, let alone how. Google hasn't provided any enlightenment so far.
In the log, in addition to the above messages I see:
2021-01-02 16:51:05,224 Trac[loader] DEBUG: Loading plugin "trac.db.postgres" from "/<some folders>/.local/lib/python2.7/site-packages"
2021-01-02 16:51:05,224 Trac[loader] DEBUG: Skipping "trac.db.postgres = trac.db.postgres_backend": DistributionNotFound: ('psycopg2>=2.0 or psycopg2-binary', [
'Trac'])
If I check my ~/.local/lib/python2.7/site-packages folders I don't see any evidence of psycopg2, but if I enter the virtuanenv my server is running in and try and install psycopg2 it says it's already installed. Similarly if I run python and run "import psycopg2" that executes without any error.
Any suggestions will be most welcome!
Cheers,
Rob Hills
Waikiki, Western Australia