Good morning Efthymios Ladoukakis

Yes I had this error and after repeated attempts if found out

sh  upgrade  because your version is older than the current releaase expects 

You get  a  python  vitural env error but

is fixed by running under sudo

sudo sh

Try that



On January 17, 2017 at 7:33 AM Makis Ladoukakis <> wrote:

Hello everyone,

I tried to download a newer version of Galaxy (I had 15.10 and pulled 16.01 in a different directory) and now for some reason in my old working directory I get the error:

Your database has version '133' but this code expects version '129'.

Please backup your database and then migrate the schema by running 'sh upgrade'.


when I tried:


sh downgrade --version=129


I got the error:


Traceback (most recent call last):
  File "./scripts/", line 33, in <module>
  File "./scripts/", line 30, in invoke_migrate_main
    main( repository=repo, url=db_url )
  File "/home/anastasia_dev/galaxy/eggs/sqlalchemy_migrate-0.9.6-py2.7.egg/migrate/versioning/", line 209, in main
    ret = command_func(**kwargs)
  File "/home/anastasia_dev/galaxy/eggs/sqlalchemy_migrate-0.9.6-py2.7.egg/migrate/versioning/", line 202, in downgrade
    return _migrate(url, repository, version, upgrade=False, err=err, **opts)
  File "<string>", line 2, in _migrate
  File "/home/anastasia_dev/galaxy/eggs/sqlalchemy_migrate-0.9.6-py2.7.egg/migrate/versioning/util/", line 160, in with_engine
    return f(*a, **kw)
  File "/home/anastasia_dev/galaxy/eggs/sqlalchemy_migrate-0.9.6-py2.7.egg/migrate/versioning/", line 345, in _migrate
    changeset = schema.changeset(version)
  File "/home/anastasia_dev/galaxy/eggs/sqlalchemy_migrate-0.9.6-py2.7.egg/migrate/versioning/", line 82, in changeset
    changeset = self.repository.changeset(database, start_ver, version)
  File "/home/anastasia_dev/galaxy/eggs/sqlalchemy_migrate-0.9.6-py2.7.egg/migrate/versioning/", line 225, in changeset
    changes = [self.version(v).script(database, op) for v in versions]
  File "/home/anastasia_dev/galaxy/eggs/sqlalchemy_migrate-0.9.6-py2.7.egg/migrate/versioning/", line 189, in version
    return self.versions.version(*p, **k)
  File "/home/anastasia_dev/galaxy/eggs/sqlalchemy_migrate-0.9.6-py2.7.egg/migrate/versioning/", line 160, in version
    return self.versions[VerNum(vernum)]
KeyError: <VerNum(133)>


I checked earlier posts stating  that i need to remove all .pyc files before downgrading. I did just that but nothing worked.

Any ideas?

Thank you in advance,

Efthymios Ladoukakis


Please keep all replies on the list by using "reply all"
in your mail client. To manage your subscriptions to this
and other Galaxy lists, please use the interface at:

To search Galaxy mailing lists use the unified search at: