1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
> alembic -c development.ini revision --autogenerate -m "autogenerated indicies."

Traceback (most recent call last):
  File "/home/fox/env/bin/alembic", line 10, in <module>
    sys.exit(main())
  File "/home/fox/env/lib/python2.7/site-packages/alembic/config.py", line 540, in main
    CommandLine(prog=prog).main(argv=argv)
  File "/home/fox/env/lib/python2.7/site-packages/alembic/config.py", line 534, in main
    self.run_cmd(cfg, options)
  File "/home/fox/env/lib/python2.7/site-packages/alembic/config.py", line 514, in run_cmd
    **dict((k, getattr(options, k, None)) for k in kwarg)
  File "/home/fox/env/lib/python2.7/site-packages/alembic/command.py", line 197, in revision
    script_directory.run_env()
  File "/home/fox/env/lib/python2.7/site-packages/alembic/script/base.py", line 475, in run_env
    util.load_python_file(self.dir, "env.py")
  File "/home/fox/env/lib/python2.7/site-packages/alembic/util/pyfiles.py", line 90, in load_python_file
    module = load_module_py(module_id, path)
  File "/home/fox/env/lib/python2.7/site-packages/alembic/util/compat.py", line 237, in load_module_py
    mod = imp.load_source(module_id, path, fp)
  File "make_post_sell/alembic/env.py", line 3, in <module>
    from pyramid.paster import get_appsettings, setup_logging
  File "/home/fox/env/lib/python2.7/site-packages/pyramid/paster.py", line 1, in <module>
    from pyramid.scripting import prepare
  File "/home/fox/env/lib/python2.7/site-packages/pyramid/scripting.py", line 1, in <module>
    from pyramid.config import global_registries
  File "/home/fox/env/lib/python2.7/site-packages/pyramid/config/__init__.py", line 9, in <module>
    from pyramid.interfaces import (
  File "/home/fox/env/lib/python2.7/site-packages/pyramid/interfaces.py", line 1, in <module>
    from zope.deprecation import deprecated
ImportError: No module named deprecation

# if you get this error, you likely forgot to init alembic, for example:

I initialized alembic like this:

.. code-block:: bash

  alembic -c development.ini init make_post_sell/scripts/alembic