Skip to content
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

Error with alembic and initializedb to check #1

Closed
miniwark opened this issue Nov 12, 2012 · 1 comment
Closed

Error with alembic and initializedb to check #1

miniwark opened this issue Nov 12, 2012 · 1 comment
Labels

Comments

@miniwark
Copy link
Member

(env)root@lazaret:/home/miniwark/anuket/begotemp# initialize_anuket_db development.ini
2012-11-12 17:29:14,199 INFO [sqlalchemy.engine.base.Engine][MainThread] select version()
2012-11-12 17:29:14,199 INFO [sqlalchemy.engine.base.Engine][MainThread] {}
2012-11-12 17:29:14,201 INFO [sqlalchemy.engine.base.Engine][MainThread] select current_schema()
2012-11-12 17:29:14,201 INFO [sqlalchemy.engine.base.Engine][MainThread] {}
2012-11-12 17:29:14,205 INFO [sqlalchemy.engine.base.Engine][MainThread] BEGIN (implicit)
2012-11-12 17:29:14,206 INFO [sqlalchemy.engine.base.Engine][MainThread] select relname from pg_class c join pg_namespace n on n.oid=c.relnamespace where n.nspname=current_schema() and relname=%(name)s
2012-11-12 17:29:14,206 INFO [sqlalchemy.engine.base.Engine][MainThread] {'name': u'alembic_version'}
2012-11-12 17:29:14,209 INFO [sqlalchemy.engine.base.Engine][MainThread]
CREATE TABLE alembic_version (
version_num VARCHAR(32) NOT NULL
)

2012-11-12 17:29:14,209 INFO [sqlalchemy.engine.base.Engine][MainThread] {}
2012-11-12 17:29:14,211 INFO [sqlalchemy.engine.base.Engine][MainThread] SELECT alembic_version.version_num
FROM alembic_version
2012-11-12 17:29:14,212 INFO [sqlalchemy.engine.base.Engine][MainThread] {}
2012-11-12 17:29:14,213 INFO [sqlalchemy.engine.base.Engine][MainThread] select relname from pg_class c join pg_namespace n on n.oid=c.relnamespace where n.nspname=current_schema() and relname=%(name)s
2012-11-12 17:29:14,213 INFO [sqlalchemy.engine.base.Engine][MainThread] {'name': u'alembic_version'}
2012-11-12 17:29:14,215 INFO [sqlalchemy.engine.base.Engine][MainThread] SELECT alembic_version.version_num
FROM alembic_version
2012-11-12 17:29:14,215 INFO [sqlalchemy.engine.base.Engine][MainThread] {}
2012-11-12 17:29:14,216 INFO [sqlalchemy.engine.base.Engine][MainThread] ROLLBACK
Traceback (most recent call last):
File "/home/miniwark/anuket/env/bin/initialize_anuket_db", line 9, in
load_entry_point('anuket==0.6a', 'console_scripts', 'initialize_anuket_db')()
File "/home/miniwark/anuket/anuket/anuket/scripts/initializedb.py", line 23, in main
return command.run()
File "/home/miniwark/anuket/anuket/anuket/scripts/initializedb.py", line 56, in run
return self.initialize_db()
File "/home/miniwark/anuket/anuket/anuket/scripts/initializedb.py", line 100, in initialize_db
stamp(alembic_cfg, 'head')
File "/home/miniwark/anuket/env/local/lib/python2.7/site-packages/alembic/command.py", line 212, in stamp
script.run_env()
File "/home/miniwark/anuket/env/local/lib/python2.7/site-packages/alembic/script.py", line 191, in run_env
util.load_python_file(self.dir, 'env.py')
File "/home/miniwark/anuket/env/local/lib/python2.7/site-packages/alembic/util.py", line 185, in load_python_file
module = imp.load_source(module_id, path, open(path, 'rb'))
File "/home/miniwark/anuket/begotemp/begotemp/scripts/alembic/env.py", line 70, in
run_migrations_online()
File "/home/miniwark/anuket/begotemp/begotemp/scripts/alembic/env.py", line 63, in run_migrations_online
context.run_migrations()
File "", line 7, in run_migrations
File "/home/miniwark/anuket/env/local/lib/python2.7/site-packages/alembic/environment.py", line 494, in run_migrations
self.get_context().run_migrations(**kw)
File "/home/miniwark/anuket/env/local/lib/python2.7/site-packages/alembic/migration.py", line 200, in run_migrations
self):
File "/home/miniwark/anuket/env/local/lib/python2.7/site-packages/alembic/command.py", line 199, in do_stamp
dest = script.get_revision(revision)
File "/home/miniwark/anuket/env/local/lib/python2.7/site-packages/alembic/script.py", line 90, in get_revision
id_ = self.as_revision_number(id_)
File "/home/miniwark/anuket/env/local/lib/python2.7/site-packages/alembic/script.py", line 116, in as_revision_number
id_ = self.get_current_head()
File "/home/miniwark/anuket/env/local/lib/python2.7/site-packages/alembic/script.py", line 245, in get_current_head
current_heads = self.get_heads()
File "/home/miniwark/anuket/env/local/lib/python2.7/site-packages/alembic/script.py", line 269, in get_heads
for script in self._revision_map.values():
File "/home/miniwark/anuket/env/local/lib/python2.7/site-packages/alembic/util.py", line 219, in get
obj.dict[self.name] = result = self.fget(obj)
File "/home/miniwark/anuket/env/local/lib/python2.7/site-packages/alembic/script.py", line 200, in revision_map
for file
in os.listdir(self.versions):
OSError: [Errno 2] No such file or directory: '/home/miniwark/anuket/begotemp/begotemp/scripts/alembic/versions'

@ghost ghost assigned miniwark Nov 20, 2012
@miniwark
Copy link
Member Author

This is an Anuket bug. See lazaret/anuket#67

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant