Re: FAILED: No 'script_location' key found in configuration

2,970 views
Skip to first unread message

Mike Bayer

unread,
May 22, 2016, 11:42:51 PM5/22/16
to sqlalchem...@googlegroups.com
This depends on how you are sending Alembic its configuration. If you
are running with a plain alembic.ini file, "script_location" should be
present in the file itself, see the example in
http://alembic.readthedocs.io/en/latest/tutorial.html#editing-the-ini-file

Otherwise if your setup is not using a simple .ini file and is instead
providing configuration to Alembic in some other way, this key must be
present in the config object. If you were using the Config object
directly, details on how that looks is here:
http://alembic.readthedocs.io/en/latest/api/config.html . There's a
simple programmatic example a few paragraphs down which illustrates
script_location being applied.



On 05/21/2016 01:59 PM, Drake wrote:
> I've had alembic running, but now when I try and add some updates to my
> database I run
>
> alembic revision -m "Add permissions table"
>
> I'm getting the following error
>
> FAILED: No 'script_location' key found in configuration
>
> Do you know how I can fix this?
>
> Thanks.
>
> --
> You received this message because you are subscribed to the Google
> Groups "sqlalchemy-alembic" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to sqlalchemy-alem...@googlegroups.com
> <mailto:sqlalchemy-alem...@googlegroups.com>.
> For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages