3

I am using flask. I installed Flask-migrate and have been using it to migrate my postgresql db. It works fine on my local box. However, when I run it on openshift I get an error

"File "/opt/rh/python27/root/usr/lib64/python2.7/ConfigParser.py", line 396, in set
    raise NoSectionError(section)
ConfigParser.NoSectionError: No section: 'alembic'
" 

Anyone know what this is or how to fix it?

user3330833
  • 2,179
  • 2
  • 12
  • 9
  • have you installed alembic? pip install alembic – Trent Feb 20 '14 at 04:34
  • Yes! I think it has to do with openshift and my vague understanding of how to interact with their interface. I have been messing with it and now I am getting: ImportError: libpq.so.postgresql92-5: cannot open shared object file: No such file or directory. When I search that I find: https://bugzilla.redhat.com/show_bug.cgi?id=986219...but again I don't know if it is openshift or me with the problem. – user3330833 Feb 20 '14 at 04:59

2 Answers2

4

It probably means that Flask Migrate is unable to find alembic configuration. Flask Migrate depends on Alembic to generate db revisions.

By default, Flask Migrate searches for configuration(and db version scripts) in migrations directory. If your configuration is present in different folder, you can specify it using -d <dir>

Ace
  • 41
  • 1
  • 3
  • Yeah, I ran into this exact issue with a Fabric deployment to a VPS. Turned out to just be a working directory issue, specifying the absolute path for the `migrations` directory did the trick. – Cole Kettler May 14 '15 at 05:14
0

I think this is a bug with LD_Library_path that should be fixed in this sprint. Should be rolling out to production in a week or two

TheSteve0
  • 3,530
  • 1
  • 19
  • 25