#2719 Python errors after running docker-compose
Closed: Fixed Opened by dvn.

I'm trying to get pagure running using the provided development docker-compose.yml and dockerfiles, however I'm getting lots of errors.

I am running from git checkout 3.9.

These are the main errors right now:

web_1         | Traceback (most recent call last):
web_1         |   File "/usr/bin/alembic", line 9, in <module>
web_1         |     load_entry_point('alembic==0.8.6', 'console_scripts', 'alembic')()
web_1         |   File "/usr/lib/python2.7/site-packages/alembic/config.py", line 479, in main
web_1         |     CommandLine(prog=prog).main(argv=argv)
web_1         |   File "/usr/lib/python2.7/site-packages/alembic/config.py", line 473, in main
web_1         |     self.run_cmd(cfg, options)
web_1         |   File "/usr/lib/python2.7/site-packages/alembic/config.py", line 456, in run_cmd
web_1         |     **dict((k, getattr(options, k)) for k in kwarg)
web_1         |   File "/usr/lib/python2.7/site-packages/alembic/command.py", line 174, in upgrade
web_1         |     script.run_env()
web_1         |   File "/usr/lib/python2.7/site-packages/alembic/script/base.py", line 397, in run_env
web_1         |     util.load_python_file(self.dir, 'env.py')
web_1         |   File "/usr/lib/python2.7/site-packages/alembic/util/pyfiles.py", line 93, in load_python_file
web_1         |     module = load_module_py(module_id, path)
web_1         |   File "/usr/lib/python2.7/site-packages/alembic/util/compat.py", line 79, in load_module_py
web_1         |     mod = imp.load_source(module_id, path, fp)
web_1         |   File "/code/alembic/env.py", line 90, in <module>
web_1         |     run_migrations_online()
web_1         |   File "/code/alembic/env.py", line 84, in run_migrations_online
web_1         |     context.run_migrations()
web_1         |   File "<string>", line 8, in run_migrations
web_1         |   File "/usr/lib/python2.7/site-packages/alembic/runtime/environment.py", line 797, in run_migrations
web_1         |     self.get_context().run_migrations(**kw)
web_1         |   File "/usr/lib/python2.7/site-packages/alembic/runtime/migration.py", line 312, in run_migrations
web_1         |     step.migration_fn(**kw)
web_1         |   File "/code/alembic/versions/b5efae6bb23_add_merge_status_to_the_pull_requests_.py", line 28, in upgrade
web_1         |     sa.Column('merge_status', enum, nullable=True)
web_1         |   File "<string>", line 8, in add_column
web_1         |   File "<string>", line 3, in add_column
web_1         |   File "/usr/lib/python2.7/site-packages/alembic/operations/ops.py", line 1535, in add_column
web_1         |     return operations.invoke(op)
web_1         |   File "/usr/lib/python2.7/site-packages/alembic/operations/base.py", line 318, in invoke
web_1         |     return fn(self, operation)
web_1         |   File "/usr/lib/python2.7/site-packages/alembic/operations/toimpl.py", line 123, in add_column
web_1         |     schema=schema
web_1         |   File "/usr/lib/python2.7/site-packages/alembic/ddl/impl.py", line 172, in add_column
web_1         |     self._exec(base.AddColumn(table_name, column, schema=schema))
web_1         |   File "/usr/lib/python2.7/site-packages/alembic/ddl/impl.py", line 118, in _exec
web_1         |     return conn.execute(construct, *multiparams, **params)
web_1         |   File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/base.py", line 914, in execute
web_1         |     return meth(self, multiparams, params)
web_1         |   File "/usr/lib64/python2.7/site-packages/sqlalchemy/sql/ddl.py", line 68, in _execute_on_connection
web_1         |     return connection._execute_ddl(self, multiparams, params)
web_1         |   File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/base.py", line 968, in _execute_ddl
web_1         |     compiled
web_1         |   File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/base.py", line 1146, in _execute_context
web_1         |     context)
web_1         |   File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/base.py", line 1341, in _handle_dbapi_exception
web_1         |     exc_info
web_1         |   File "/usr/lib64/python2.7/site-packages/sqlalchemy/util/compat.py", line 203, in raise_from_cause
web_1         |     reraise(type(exception), exception, tb=exc_tb, cause=cause)
web_1         |   File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/base.py", line 1139, in _execute_context
web_1         |     context)
web_1         |   File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/default.py", line 450, in do_execute
web_1         |     cursor.execute(statement, parameters)
web_1         | sqlalchemy.exc.ProgrammingError: (psycopg2.ProgrammingError) relation "pull_requests" does not exist

There has been some changes since this ticket, could you try again?

(I'm not a docker user myself, sorry)

Commit d2149c52 fixes this issue

Metadata