New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Autogenerate do no fail nicely in some case #63

sqlalchemy-bot opened this Issue Jul 28, 2012 · 2 comments


None yet
1 participant

sqlalchemy-bot commented Jul 28, 2012

Migrated issue, originally created by miniwark NA (@miniwark)

Autogenerate fail if there not already migration scripts with this traceback :

(pyramid) > alembic revision --autogenerate
Traceback (most recent call last):
  File "/home/toto/Developpement/virtualenvs/pyramid/bin/alembic", line 8, in <module>
    load_entry_point('alembic==0.3.5', 'console_scripts', 'alembic')()
  File "/home/toto/Developpement/virtualenvs/pyramid/lib/python2.7/site-packages/alembic/", line 229, in main
    **dict((k, getattr(options, k)) for k in kwarg)
  File "/home/toto/Developpement/virtualenvs/pyramid/lib/python2.7/site-packages/alembic/", line 66, in revision
    script = ScriptDirectory.from_config(config)
  File "/home/toto/Developpement/virtualenvs/pyramid/lib/python2.7/site-packages/alembic/", line 57, in from_config
  File "/home/toto/Developpement/virtualenvs/pyramid/lib/python2.7/site-packages/alembic/", line 141, in coerce_resource_to_filename
    if not os.path.isabs(fname) and ":" in fname:
  File "/home/toto/Developpement/virtualenvs/pyramid/lib64/python2.7/", line 53, in isabs
    return s.startswith('/')
AttributeError: 'NoneType' object has no attribute 'startswith'

I am not sure of why it fail like this :

  • maybe it is because there is nothing yet in my /version directory
  • or because i use an unsupported script location :

alembic.script_location = pyramidproject:scripts/alembic


This comment has been minimized.

sqlalchemy-bot commented Jul 28, 2012

Changes by Michael Bayer (@zzzeek):

  • changed status to closed

This comment has been minimized.

sqlalchemy-bot commented Jul 28, 2012

Michael Bayer (@zzzeek) wrote:

The issue is that the name of the key in alembic.ini is "script_location", not "alembic.script_location". An informative error message is added in [[ |56bdf6c98fb3a5a4a6bb481bf108b08a6cd83616 ]].

@sqlalchemy-bot sqlalchemy-bot added the bug label Nov 27, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment