After system updates: TracError: Unsupported database type "postgres"

426 views
Skip to first unread message

Mo

unread,
Aug 5, 2020, 7:08:52 AM8/5/20
to Trac Users
We are using Trac-1.4, installed via pip2 in user $HOME.
Server is nginx with uwsgi.

The distribution uwsgi has dropped python2.7 support. So I restored
/usr/lib64/uwsgi/python27_plugin.so
from the backups and seems to be starting now.

But the next issue is missing postgres support:
Trac[env] ERROR: Exception caught while checking for upgrade: TracError: Unable to check for upgrade of trac.db.api.DatabaseManager: TracError: Unsupported database type "postgres"

Our database is postgres-11, the system packages have dropped python2.7 support as well. What can I do?

Best regards.

Mo

unread,
Aug 5, 2020, 7:21:40 AM8/5/20
to Trac Users

Am Mittwoch, 5. August 2020 13:08:52 UTC+2 schrieb Mo:
But the next issue is missing postgres support:
Trac[env] ERROR: Exception caught while checking for upgrade: TracError: Unable to check for upgrade of trac.db.api.DatabaseManager: TracError: Unsupported database type "postgres"

The postgres issue I got solved by
pip2 install --user psycopg2

Next issue was, Genshi is missing. This I got solved by
pip2 install --user Genshi

Now Trac is up again.
But just for understanding, why did I need to install those 2 packages, which have not been required before?

RjOllos

unread,
Aug 5, 2020, 11:26:05 AM8/5/20
to Trac Users
The packages have always been required. I guess they were installed by your package manager in the past.

- Ryan 

BRAIEK Aymen

unread,
Sep 30, 2020, 12:30:52 PM9/30/20
to Trac Users
when i try your cmd   pip2 install --user psycopg2   i have this error  
 Could not fetch URL https://pypi.python.org/simple/pymysql/: There was a problem confirming the ssl certificate: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:727) - skipping

Ryan Ollos

unread,
Sep 30, 2020, 12:31:40 PM9/30/20
to Trac Users
On Wed, Sep 30, 2020 at 9:30 AM 'BRAIEK Aymen' via Trac Users <trac-...@googlegroups.com> wrote:
when i try your cmd   pip2 install --user psycopg2   i have this error  
 Could not fetch URL https://pypi.python.org/simple/pymysql/: There was a problem confirming the ssl certificate: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:727) - skipping

Could you try this?:


 

Markus Rosjat

unread,
Oct 1, 2020, 1:10:44 PM10/1/20
to trac-...@googlegroups.com
Hey guys,

Just a Site node here , are you wanna install a mysql or a postgres package? Because this url Doesn't look like a postgres package

Cheers 

Markus

--
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trac-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trac-users/CA%2BBGpn-w46phD7w3ftPPM6wOeAjOa6h%3DNqo%3DRWuETJ7n5N7Dsg%40mail.gmail.com.

BRAIEK Aymen

unread,
Oct 1, 2020, 1:46:22 PM10/1/20
to trac-...@googlegroups.com
i am new on trac 
i need really doc describe all setup to install PyMysql and create new project instance with mysql 
plz 

--

Mo

unread,
Oct 15, 2020, 3:35:32 AM10/15/20
to Trac Users
Mo schrieb am Mittwoch, 5. August 2020 um 13:08:52 UTC+2:
But the next issue is missing postgres support:
Trac[env] ERROR: Exception caught while checking for upgrade: TracError: Unable to check for upgrade of trac.db.api.DatabaseManager: TracError: Unsupported database type "postgres"

As the linux distribution is dropping python2.7, I have installed python 2.7 locally at $HOME/bin

pip2 was installed by
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py

As the PYTHONDIR has changed to ~/lib/python2.7/site-packages/ I re-installed all packages by
pip2 install -Ur requirements_file

What I have installed now:
$ pip2 list 2>/dev/null
Package                     Version
--------------------------- ----------
arabic-reshaper             2.1.0
configparser                4.0.2
future                      0.18.2
Genshi                      0.7.3
html5lib                    1.1
ImportExportXLS             0.3
Jinja2                      2.11.2
KeepInterfaceSimple2Plugin  2.6
MarkupSafe                  1.1.1
Pillow                      6.2.2
pip                         20.2.3
psycopg2                    2.8.6
pymills                     3.4.2
PyPDF2                      1.26.0
python-bidi                 0.4.2
reportlab                   3.5.53
setuptools                  44.1.1
six                         1.15.0
ticketsboardplugin          1.2.3.dev0
Trac                        1.4.2
trac-IncludeSource          0.5.1
TracAccountManager          0.5.0
TracAutocompleteUsersPlugin 0.4.6
TracCodeReviewer            1.0.0.dev0
TracComponentDependency     0.3
TracDiscussion              1.2.1
TracEstimationTools         0.5.0
TracFieldTooltip            0.8.5
TracFullBlog                0.2.dev0
TracHTTPAuth                1.2
TracIncludeMacro            3.1.0
TracLoomingClouds           1.0.dev0
TracMenus                   0.3.0
TracPdfPreview              0.1.2
TracQuiet                   1.2.1
TracSimpleMultiProject      0.7.2.dev0
TracTags                    0.11
TracWikiAutoComplete        1.4
TracWikiExtras              1.3.1
TracWikiPrint               3.0.dev0
TracXMLRPC                  1.1.9.dev0
webencodings                0.5.1
wheel                       0.35.1
xhtml2pdf                   0.2.5
xlrd                        1.2.0
xlwt                        1.3.0

But Trac is not starting:

Trac[loader] DEBUG: Loading plugin "tractags.xmlrpc" from "/mnt/data/trac/lib/python2.7/site-packages"
Trac[loader] DEBUG: Loading plugin "tracwikiextras" from "/mnt/data/trac/lib/python2.7/site-packages"
Trac[loader] DEBUG: Loading plugin "tracworkflowadmin.web_ui" from "/mnt/data/trac/projects/trac-pp/plugins/TracWorkflowAdmin-0.12.0.6-py2.7.egg"
Trac[loader] DEBUG: Loading plugin "wikiautocomplete.web_ui" from "/mnt/data/trac/lib/python2.7/site-packages"
Trac[loader] DEBUG: Loading plugin "wikiprint.formats" from "/mnt/data/trac/lib/python2.7/site-packages"
Trac[loader] DEBUG: Loading plugin "wikiprint.web_ui" from "/mnt/data/trac/lib/python2.7/site-packages"
Trac[loader] DEBUG: Loading plugin "wikiprint.wikiprint" from "/mnt/data/trac/lib/python2.7/site-packages"
Trac[loader] DEBUG: Loading plugin "wikitable.scalar" from "/mnt/data/trac/projects/trac-pp/plugins/WikiTableMacro-0.3.dev0-py2.7.egg"
Trac[loader] DEBUG: Loading plugin "wikitable.table" from "/mnt/data/trac/projects/trac-pp/plugins/WikiTableMacro-0.3.dev0-py2.7.egg"
Trac[loader] DEBUG: Loading file plugin AZ_NotificationSubscriber from /mnt/data/trac/projects/trac-pp/plugins/AZ_NotificationSubscriber.py
Trac[default_workflow] DEBUG: Workflow actions at initialization: defaultdict(<type 'dict'>, {u'resolve': {u'operations': [u'set_resolution'], 'name': '', u'default': 998, 'newstate': u'closed', 'label': u'resolve', 'oldstates': [u'new', u'assigned', u'accepted', u'reopened'], u'permissions': [u'TICKET_MODIFY']}, u'create': {'operations': [], 'name': '', u'default': 1000, 'newstate': u'new', 'label': u'create', 'oldstates': [None], 'permissions': []}, u'accept': {u'operations': [u'set_owner_to_self'], 'name': '', u'default': 997, 'newstate': u'accepted', 'label': u'accept', 'oldstates': [u'new', u'assigned', u'accepted', u'reopened'], u'permissions': [u'TICKET_MODIFY']}, u'leave': {u'operations': [u'leave_status'], 'name': '', u'default': 999, 'newstate': u'*', 'label': u'leave', 'oldstates': [None, u'new', u'assigned', u'accepted', u'closed', u'reopened'], 'permissions': []}, u'reopen': {u'operations': [u'del_resolution'], 'name': '', u'default': 996, 'newstate': u'reopened', 'label': u'reopen', 'oldstates': [u'closed'], u'permissions': [u'TICKET_MODIFY']}, u'create_and_assign': {u'operations': [u'may_set_owner'], 'name': '', u'default': 995, 'newstate': u'assigned', 'label': u'create and assign', 'oldstates': [None], u'permissions': [u'TICKET_MODIFY']}, u'reassign': {u'operations': [u'set_owner'], 'name': '', u'default': 994, 'newstate': u'assigned', 'label': u'reassign', 'oldstates': [u'new', u'assigned', u'accepted', u'reopened'], u'permissions': [u'TICKET_MODIFY']}, '_reset': {'operations': ['reset_workflow'], 'default': 0, 'newstate': 'new', 'label': 'Reset', 'oldstates': [], 'permissions': ['TICKET_ADMIN']}})
Trac[web_ui] DEBUG: Ticketsboard: assignReviewer plugin part is present
Trac[env] WARNING: Component <Component trac.db.api.DatabaseManager> failed with TracError: Unsupported database type "postgres"

Trac[env] ERROR: Exception caught while checking for upgrade: TracError: Unable to check for upgrade of trac.db.api.DatabaseManager: TracError: Unsupported database type "postgres"

psycopg2 is installed, but the versions may have changed.
How can I get that running again?

~Mo

Mo

unread,
Oct 15, 2020, 4:11:37 AM10/15/20
to Trac Users
Mo schrieb am Donnerstag, 15. Oktober 2020 um 09:35:32 UTC+2:

Trac[env] ERROR: Exception caught while checking for upgrade: TracError: Unable to check for upgrade of trac.db.api.DatabaseManager: TracError: Unsupported database type "postgres"

psycopg2 is installed, but the versions may have changed.
How can I get that running again?


I also tried setting
trac.db.postgres_backend.postgresqlconnector = enabled
but does not solve it.

~Mo

Mo

unread,
Oct 15, 2020, 8:01:23 AM10/15/20
to Trac Users
I got that fixed by installing everying like pip, setuptools, Trac and plugins and uWSGI inside a virtualenv. After that I made a copy of my system uwsgi-init-script and changed UWSGI_EXEC to use the virtualenv uwsgi executable.
Reply all
Reply to author
Forward
0 new messages