Created
June 30, 2022 16:16
-
-
Save khuyentran1401/19e20a89e4c6673800ac24d52d5cb42b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Traceback (most recent call last): | |
File "/Users/khuyen/prefect2-mlops-demo/venv/lib/python3.9/site-packages/alembic/script/base.py", line 233, in _catch_revision_errors | |
yield | |
File "/Users/khuyen/prefect2-mlops-demo/venv/lib/python3.9/site-packages/alembic/script/base.py", line 443, in _upgrade_revs | |
for script in reversed(list(revs)) | |
File "/Users/khuyen/prefect2-mlops-demo/venv/lib/python3.9/site-packages/alembic/script/revision.py", line 799, in iterate_revisions | |
revisions, heads = fn( | |
File "/Users/khuyen/prefect2-mlops-demo/venv/lib/python3.9/site-packages/alembic/script/revision.py", line 1454, in _collect_upgrade_revisions | |
current_revisions = self.get_revisions(lower) | |
File "/Users/khuyen/prefect2-mlops-demo/venv/lib/python3.9/site-packages/alembic/script/revision.py", line 527, in get_revisions | |
return sum([self.get_revisions(id_elem) for id_elem in id_], ()) | |
File "/Users/khuyen/prefect2-mlops-demo/venv/lib/python3.9/site-packages/alembic/script/revision.py", line 527, in <listcomp> | |
return sum([self.get_revisions(id_elem) for id_elem in id_], ()) | |
File "/Users/khuyen/prefect2-mlops-demo/venv/lib/python3.9/site-packages/alembic/script/revision.py", line 552, in get_revisions | |
return tuple( | |
File "/Users/khuyen/prefect2-mlops-demo/venv/lib/python3.9/site-packages/alembic/script/revision.py", line 553, in <genexpr> | |
self._revision_for_ident(rev_id, branch_label) | |
File "/Users/khuyen/prefect2-mlops-demo/venv/lib/python3.9/site-packages/alembic/script/revision.py", line 624, in _revision_for_ident | |
raise ResolutionError( | |
alembic.script.revision.ResolutionError: No such revision or branch '9e2a1c08c6f1' | |
The above exception was the direct cause of the following exception: | |
Traceback (most recent call last): | |
File "/Users/khuyen/prefect2-mlops-demo/src/process_data.py", line 43, in <module> | |
process_data() | |
File "/Users/khuyen/prefect2-mlops-demo/venv/lib/python3.9/site-packages/prefect/flows.py", line 324, in __call__ | |
return enter_flow_run_engine_from_flow_call(self, parameters) | |
File "/Users/khuyen/prefect2-mlops-demo/venv/lib/python3.9/site-packages/prefect/engine.py", line 111, in enter_flow_run_engine_from_flow_call | |
return anyio.run(begin_run) | |
File "/Users/khuyen/prefect2-mlops-demo/venv/lib/python3.9/site-packages/anyio/_core/_eventloop.py", line 70, in run | |
return asynclib.run(func, *args, **backend_options) | |
File "/Users/khuyen/prefect2-mlops-demo/venv/lib/python3.9/site-packages/anyio/_backends/_asyncio.py", line 292, in run | |
return native_run(wrapper(), debug=debug) | |
File "/opt/homebrew/Cellar/python@3.9/3.9.13/Frameworks/Python.framework/Versions/3.9/lib/python3.9/asyncio/runners.py", line 44, in run | |
return loop.run_until_complete(main) | |
File "/opt/homebrew/Cellar/python@3.9/3.9.13/Frameworks/Python.framework/Versions/3.9/lib/python3.9/asyncio/base_events.py", line 647, in run_until_complete | |
return future.result() | |
File "/Users/khuyen/prefect2-mlops-demo/venv/lib/python3.9/site-packages/anyio/_backends/_asyncio.py", line 287, in wrapper | |
return await func(*args) | |
File "/Users/khuyen/prefect2-mlops-demo/venv/lib/python3.9/site-packages/prefect/client.py", line 108, in with_injected_client | |
async with client_context as client: | |
File "/Users/khuyen/prefect2-mlops-demo/venv/lib/python3.9/site-packages/prefect/client.py", line 1931, in __aenter__ | |
self._ephemeral_lifespan = await self._exit_stack.enter_async_context( | |
File "/opt/homebrew/Cellar/python@3.9/3.9.13/Frameworks/Python.framework/Versions/3.9/lib/python3.9/contextlib.py", line 575, in enter_async_context | |
result = await _cm_type.__aenter__(cm) | |
File "/opt/homebrew/Cellar/python@3.9/3.9.13/Frameworks/Python.framework/Versions/3.9/lib/python3.9/contextlib.py", line 181, in __aenter__ | |
return await self.gen.__anext__() | |
File "/Users/khuyen/prefect2-mlops-demo/venv/lib/python3.9/site-packages/prefect/client.py", line 189, in app_lifespan_context | |
await context.__aenter__() | |
File "/Users/khuyen/prefect2-mlops-demo/venv/lib/python3.9/site-packages/asgi_lifespan/_manager.py", line 92, in __aenter__ | |
await self._exit_stack.aclose() | |
File "/opt/homebrew/Cellar/python@3.9/3.9.13/Frameworks/Python.framework/Versions/3.9/lib/python3.9/contextlib.py", line 612, in aclose | |
await self.__aexit__(None, None, None) | |
File "/opt/homebrew/Cellar/python@3.9/3.9.13/Frameworks/Python.framework/Versions/3.9/lib/python3.9/contextlib.py", line 670, in __aexit__ | |
raise exc_details[1] | |
File "/opt/homebrew/Cellar/python@3.9/3.9.13/Frameworks/Python.framework/Versions/3.9/lib/python3.9/contextlib.py", line 653, in __aexit__ | |
cb_suppress = await cb(*exc_details) | |
File "/Users/khuyen/prefect2-mlops-demo/venv/lib/python3.9/site-packages/asgi_lifespan/_concurrency/asyncio.py", line 80, in __aexit__ | |
await self.task | |
File "/Users/khuyen/prefect2-mlops-demo/venv/lib/python3.9/site-packages/asgi_lifespan/_manager.py", line 90, in __aenter__ | |
await self.startup() | |
File "/Users/khuyen/prefect2-mlops-demo/venv/lib/python3.9/site-packages/asgi_lifespan/_manager.py", line 36, in startup | |
raise self._app_exception | |
File "/Users/khuyen/prefect2-mlops-demo/venv/lib/python3.9/site-packages/asgi_lifespan/_concurrency/asyncio.py", line 63, in run_and_silence_cancelled | |
await self.coroutine() | |
File "/Users/khuyen/prefect2-mlops-demo/venv/lib/python3.9/site-packages/asgi_lifespan/_manager.py", line 64, in run_app | |
await self.app(scope, self.receive, self.send) | |
File "/Users/khuyen/prefect2-mlops-demo/venv/lib/python3.9/site-packages/fastapi/applications.py", line 269, in __call__ | |
await super().__call__(scope, receive, send) | |
File "/Users/khuyen/prefect2-mlops-demo/venv/lib/python3.9/site-packages/starlette/applications.py", line 124, in __call__ | |
await self.middleware_stack(scope, receive, send) | |
File "/Users/khuyen/prefect2-mlops-demo/venv/lib/python3.9/site-packages/starlette/middleware/errors.py", line 149, in __call__ | |
await self.app(scope, receive, send) | |
File "/Users/khuyen/prefect2-mlops-demo/venv/lib/python3.9/site-packages/starlette/middleware/cors.py", line 76, in __call__ | |
await self.app(scope, receive, send) | |
File "/Users/khuyen/prefect2-mlops-demo/venv/lib/python3.9/site-packages/starlette/exceptions.py", line 69, in __call__ | |
await self.app(scope, receive, send) | |
File "/Users/khuyen/prefect2-mlops-demo/venv/lib/python3.9/site-packages/fastapi/middleware/asyncexitstack.py", line 21, in __call__ | |
raise e | |
File "/Users/khuyen/prefect2-mlops-demo/venv/lib/python3.9/site-packages/fastapi/middleware/asyncexitstack.py", line 18, in __call__ | |
await self.app(scope, receive, send) | |
File "/Users/khuyen/prefect2-mlops-demo/venv/lib/python3.9/site-packages/starlette/routing.py", line 659, in __call__ | |
await self.lifespan(scope, receive, send) | |
File "/Users/khuyen/prefect2-mlops-demo/venv/lib/python3.9/site-packages/starlette/routing.py", line 635, in lifespan | |
async with self.lifespan_context(app): | |
File "/Users/khuyen/prefect2-mlops-demo/venv/lib/python3.9/site-packages/starlette/routing.py", line 530, in __aenter__ | |
await self._router.startup() | |
File "/Users/khuyen/prefect2-mlops-demo/venv/lib/python3.9/site-packages/starlette/routing.py", line 612, in startup | |
await handler() | |
File "/Users/khuyen/prefect2-mlops-demo/venv/lib/python3.9/site-packages/prefect/orion/api/server.py", line 259, in run_migrations | |
await db.create_db() | |
File "/Users/khuyen/prefect2-mlops-demo/venv/lib/python3.9/site-packages/prefect/orion/database/interface.py", line 53, in create_db | |
await self.run_migrations_upgrade() | |
File "/Users/khuyen/prefect2-mlops-demo/venv/lib/python3.9/site-packages/prefect/orion/database/interface.py", line 61, in run_migrations_upgrade | |
await run_sync_in_worker_thread(alembic_upgrade) | |
File "/Users/khuyen/prefect2-mlops-demo/venv/lib/python3.9/site-packages/prefect/utilities/asyncio.py", line 54, in run_sync_in_worker_thread | |
return await anyio.to_thread.run_sync(call, cancellable=True) | |
File "/Users/khuyen/prefect2-mlops-demo/venv/lib/python3.9/site-packages/anyio/to_thread.py", line 31, in run_sync | |
return await get_asynclib().run_sync_in_worker_thread( | |
File "/Users/khuyen/prefect2-mlops-demo/venv/lib/python3.9/site-packages/anyio/_backends/_asyncio.py", line 937, in run_sync_in_worker_thread | |
return await future | |
File "/Users/khuyen/prefect2-mlops-demo/venv/lib/python3.9/site-packages/anyio/_backends/_asyncio.py", line 867, in run | |
result = context.run(func, *args) | |
File "/Users/khuyen/prefect2-mlops-demo/venv/lib/python3.9/site-packages/prefect/orion/database/alembic_commands.py", line 29, in alembic_upgrade | |
alembic.command.upgrade(alembic_config(), revision, sql=dry_run) | |
File "/Users/khuyen/prefect2-mlops-demo/venv/lib/python3.9/site-packages/alembic/command.py", line 322, in upgrade | |
script.run_env() | |
File "/Users/khuyen/prefect2-mlops-demo/venv/lib/python3.9/site-packages/alembic/script/base.py", line 569, in run_env | |
util.load_python_file(self.dir, "env.py") | |
File "/Users/khuyen/prefect2-mlops-demo/venv/lib/python3.9/site-packages/alembic/util/pyfiles.py", line 94, in load_python_file | |
module = load_module_py(module_id, path) | |
File "/Users/khuyen/prefect2-mlops-demo/venv/lib/python3.9/site-packages/alembic/util/pyfiles.py", line 110, in load_module_py | |
spec.loader.exec_module(module) # type: ignore | |
File "<frozen importlib._bootstrap_external>", line 850, in exec_module | |
File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed | |
File "/Users/khuyen/prefect2-mlops-demo/venv/lib/python3.9/site-packages/prefect/orion/database/migrations/env.py", line 98, in <module> | |
apply_migrations() | |
File "/Users/khuyen/prefect2-mlops-demo/venv/lib/python3.9/site-packages/prefect/utilities/asyncio.py", line 118, in wrapper | |
return run_async_from_worker_thread(async_fn, *args, **kwargs) | |
File "/Users/khuyen/prefect2-mlops-demo/venv/lib/python3.9/site-packages/prefect/utilities/asyncio.py", line 65, in run_async_from_worker_thread | |
return anyio.from_thread.run(call) | |
File "/Users/khuyen/prefect2-mlops-demo/venv/lib/python3.9/site-packages/anyio/from_thread.py", line 49, in run | |
return asynclib.run_async_from_thread(func, *args) | |
File "/Users/khuyen/prefect2-mlops-demo/venv/lib/python3.9/site-packages/anyio/_backends/_asyncio.py", line 970, in run_async_from_thread | |
return f.result() | |
File "/opt/homebrew/Cellar/python@3.9/3.9.13/Frameworks/Python.framework/Versions/3.9/lib/python3.9/concurrent/futures/_base.py", line 446, in result | |
return self.__get_result() | |
File "/opt/homebrew/Cellar/python@3.9/3.9.13/Frameworks/Python.framework/Versions/3.9/lib/python3.9/concurrent/futures/_base.py", line 391, in __get_result | |
raise self._exception | |
File "/Users/khuyen/prefect2-mlops-demo/venv/lib/python3.9/site-packages/prefect/orion/database/migrations/env.py", line 92, in apply_migrations | |
await connection.run_sync(do_run_migrations) | |
File "/Users/khuyen/prefect2-mlops-demo/venv/lib/python3.9/site-packages/sqlalchemy/ext/asyncio/engine.py", line 546, in run_sync | |
return await greenlet_spawn(fn, conn, *arg, **kw) | |
File "/Users/khuyen/prefect2-mlops-demo/venv/lib/python3.9/site-packages/sqlalchemy/util/_concurrency_py3k.py", line 128, in greenlet_spawn | |
result = context.switch(value) | |
File "/Users/khuyen/prefect2-mlops-demo/venv/lib/python3.9/site-packages/prefect/orion/database/migrations/env.py", line 80, in do_run_migrations | |
context.run_migrations() | |
File "<string>", line 8, in run_migrations | |
File "/Users/khuyen/prefect2-mlops-demo/venv/lib/python3.9/site-packages/alembic/runtime/environment.py", line 853, in run_migrations | |
self.get_context().run_migrations(**kw) | |
File "/Users/khuyen/prefect2-mlops-demo/venv/lib/python3.9/site-packages/alembic/runtime/migration.py", line 611, in run_migrations | |
for step in self._migrations_fn(heads, self): | |
File "/Users/khuyen/prefect2-mlops-demo/venv/lib/python3.9/site-packages/alembic/command.py", line 311, in upgrade | |
return script._upgrade_revs(revision, rev) | |
File "/Users/khuyen/prefect2-mlops-demo/venv/lib/python3.9/site-packages/alembic/script/base.py", line 439, in _upgrade_revs | |
return [ | |
File "/opt/homebrew/Cellar/python@3.9/3.9.13/Frameworks/Python.framework/Versions/3.9/lib/python3.9/contextlib.py", line 137, in __exit__ | |
self.gen.throw(typ, value, traceback) | |
File "/Users/khuyen/prefect2-mlops-demo/venv/lib/python3.9/site-packages/alembic/script/base.py", line 265, in _catch_revision_errors | |
raise util.CommandError(resolution) from re | |
alembic.util.exc.CommandError: Can't locate revision identified by '9e2a1c08c6f1' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment