1. Michael Bayer
  2. alembic
  3. Issues


Issue #63 resolved

Autogenerate do no fail nicely in some case

miniwark NA
created an issue

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/config.py", 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/command.py", line 66, in revision script = ScriptDirectory.from_config(config) File "/home/toto/Developpement/virtualenvs/pyramid/lib/python2.7/site-packages/alembic/script.py", line 57, in from_config config.get_main_option('script_location') File "/home/toto/Developpement/virtualenvs/pyramid/lib/python2.7/site-packages/alembic/util.py", 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/posixpath.py", 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

Comments (2)

  1. Log in to comment