Error: Need to downgrade database_version.

75 views
Skip to first unread message

Will P

unread,
Feb 14, 2021, 1:46:30 PM2/14/21
to Trac Users
Hello,

I am getting a "Error: Need to downgrade database_version." when the post-commit hook is ran. The hook is simple and just calls a change set.

I got the error originally in Trac 1.2, then upgraded to 1.4.3 and now 1.5.2. everything works well except the post-commit stuff.

The database_version is 45, I have no idea how it changed (probably some plugins) and the "initial_database_version" is 41.

Package    Version
Trac     1.4.3.dev0 (though 1.5.2 is shown in trac-admin, this a bug maybe?)
Babel     2.6.0
Docutils     0.14
Genshi     0.7.1 (with speedups)
Jinja2     2.11.3
mod_python     3.3.1
Pygments     2.3.1
pysqlite     2.6.0
Python     2.7.16 (default, Oct 10 2019, 22:02:15) [GCC 8.3.0]
pytz     2019.1
setuptools     41.6.0
SQLite     3.27.2
Subversion     1.10.4 (r1850624)

Plugins
milncheckbox 
TracStats 0.6.1

RjOllos

unread,
Feb 14, 2021, 2:30:47 PM2/14/21
to Trac Users
Trac 1.5.2 required Python 3.5 or later. Trac 1.4.3dev works with Python 2.7.

Your post-commit hook and Trac appear to be running in a Python2 installation. When you call trac-admin you are running in Python3.

Ryan 

Will P

unread,
Feb 14, 2021, 5:41:10 PM2/14/21
to Trac Users


Ryan,

Thanks for the information. I really only upgraded to 1.5.x to see I could get rid of the database error. Any input on that part?

RjOllos

unread,
Feb 14, 2021, 5:57:45 PM2/14/21
to Trac Users
On Sunday, February 14, 2021 at 2:41:10 PM UTC-8 will.pe...@gmail.com wrote:


Ryan,

Thanks for the information. I really only upgraded to 1.5.x to see I could get rid of the database error. Any input on that part?
On Sunday, February 14, 2021 at 2:30:47 PM UTC-5 RjOllos wrote:

There have been no database upgrades on 1.5.x. Both 1.4.x and 1.5.x are at DB version 45. I'm not sure why you are getting that error, but I assume you have an installation problem and your post-commit hook is executing a version of the Trac code that is older than 1.4.x (e.g. 1.2.x).

I'd locate the version of trac-admin that was installed in Python 2.7.16, and check to confirm that it echoes 1.4.3dev. Then, use the full path to the trac-admin executable in your post-commit hook.

Ryan 
Reply all
Reply to author
Forward
0 new messages