Anna,
creating new virtual env also ran into different errors while starting Orion
----------- Error --------------------
(prefect) C:\Users\Shail>prefect --version
2.6.4
(prefect) C:\Users\Shail>prefect orion start
| _ \ _ \ | | / | | / _ | _ _ / _ | | |
| / / || || | ( | | | () | /| | () | .` |
|| ||__|| |_| |_| _/||___/|_|_|
Configure Prefect to communicate with the server with:
prefect config set PREFECT_API_URL=http://127.0.0.1:4200/api
View the API reference documentation at http://127.0.0.1:4200/docs
Check out the dashboard at http://127.0.0.1:4200
INFO: Started server process [14228]
INFO: Waiting for application startup.
ERROR: Traceback (most recent call last):
File “C:\Anaconda3\envs\prefect\lib\site-packages\alembic\script\base.py”, line 233, in _catch_revision_errors
yield
File “C:\Anaconda3\envs\prefect\lib\site-packages\alembic\script\base.py”, line 443, in upgrade_revs
for script in reversed(list(revs))
File “C:\Anaconda3\envs\prefect\lib\site-packages\alembic\script\revision.py”, line 799, in iterate_revisions
revisions, heads = fn(
File “C:\Anaconda3\envs\prefect\lib\site-packages\alembic\script\revision.py”, line 1454, in collect_upgrade_revisions
current_revisions = self.get_revisions(lower)
File “C:\Anaconda3\envs\prefect\lib\site-packages\alembic\script\revision.py”, line 527, in get_revisions
return sum([self.get_revisions(id_elem) for id_elem in id], ())
File “C:\Anaconda3\envs\prefect\lib\site-packages\alembic\script\revision.py”, line 527, in
return sum([self.get_revisions(id_elem) for id_elem in id], ())
File “C:\Anaconda3\envs\prefect\lib\site-packages\alembic\script\revision.py”, line 552, in get_revisions
return tuple(
File “C:\Anaconda3\envs\prefect\lib\site-packages\alembic\script\revision.py”, line 553, in
self._revision_for_ident(rev_id, branch_label)
File “C:\Anaconda3\envs\prefect\lib\site-packages\alembic\script\revision.py”, line 624, in _revision_for_ident
raise ResolutionError(
alembic.script.revision.ResolutionError: No such revision or branch ‘3ced59d8806b’
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File “C:\Anaconda3\envs\prefect\lib\site-packages\starlette\routing.py”, line 645, in lifespan
async with self.lifespan_context(app):
File “C:\Anaconda3\envs\prefect\lib\site-packages\starlette\routing.py”, line 540, in aenter
await self._router.startup()
File “C:\Anaconda3\envs\prefect\lib\site-packages\starlette\routing.py”, line 622, in startup
await handler()
File “C:\Anaconda3\envs\prefect\lib\site-packages\prefect\orion\api\server.py”, line 341, in run_migrations
await db.create_db()
File “C:\Anaconda3\envs\prefect\lib\site-packages\prefect\orion\database\interface.py”, line 55, in create_db
await self.run_migrations_upgrade()
File “C:\Anaconda3\envs\prefect\lib\site-packages\prefect\orion\database\interface.py”, line 63, in run_migrations_upgrade
await run_sync_in_worker_thread(alembic_upgrade)
File “C:\Anaconda3\envs\prefect\lib\site-packages\prefect\utilities\asyncutils.py”, line 68, in run_sync_in_worker_thread
return await anyio.to_thread.run_sync(call, cancellable=True)
File “C:\Anaconda3\envs\prefect\lib\site-packages\anyio\to_thread.py”, line 31, in run_sync
return await get_asynclib().run_sync_in_worker_thread(
File “C:\Anaconda3\envs\prefect\lib\site-packages\anyio_backends_asyncio.py”, line 937, in run_sync_in_worker_thread
return await future
File “C:\Anaconda3\envs\prefect\lib\site-packages\anyio_backends_asyncio.py”, line 867, in run
result = context.run(func, *args)
File “C:\Anaconda3\envs\prefect\lib\site-packages\prefect\orion\database\alembic_commands.py”, line 29, in alembic_upgrade
alembic.command.upgrade(alembic_config(), revision, sql=dry_run)
File “C:\Anaconda3\envs\prefect\lib\site-packages\alembic\command.py”, line 322, in upgrade
script.run_env()
File “C:\Anaconda3\envs\prefect\lib\site-packages\alembic\script\base.py”, line 569, in run_env
util.load_python_file(self.dir, “env.py”)
File “C:\Anaconda3\envs\prefect\lib\site-packages\alembic\util\pyfiles.py”, line 94, in load_python_file
module = load_module_py(module_id, path)
File “C:\Anaconda3\envs\prefect\lib\site-packages\alembic\util\pyfiles.py”, line 110, in load_module_py
spec.loader.exec_module(module) # type: ignore
File “”, line 850, in exec_module
File “”, line 228, in _call_with_frames_removed
File “C:\Anaconda3\envs\prefect\lib\site-packages\prefect\orion\database\migrations\env.py”, line 147, in
apply_migrations()
File “C:\Anaconda3\envs\prefect\lib\site-packages\prefect\utilities\asyncutils.py”, line 197, in coroutine_wrapper
return run_async_from_worker_thread(async_fn, *args, **kwargs)
File “C:\Anaconda3\envs\prefect\lib\site-packages\prefect\utilities\asyncutils.py”, line 148, in run_async_from_worker_thread
return anyio.from_thread.run(call)
File “C:\Anaconda3\envs\prefect\lib\site-packages\anyio\from_thread.py”, line 49, in run
return asynclib.run_async_from_thread(func, *args)
File “C:\Anaconda3\envs\prefect\lib\site-packages\anyio_backends_asyncio.py”, line 970, in run_async_from_thread
return f.result()
File “C:\Anaconda3\envs\prefect\lib\concurrent\futures_base.py”, line 446, in result
return self.__get_result()
File “C:\Anaconda3\envs\prefect\lib\concurrent\futures_base.py”, line 391, in __get_result
raise self._exception
File “C:\Anaconda3\envs\prefect\lib\site-packages\prefect\orion\database\migrations\env.py”, line 141, in apply_migrations
await connection.run_sync(do_run_migrations)
File “C:\Anaconda3\envs\prefect\lib\site-packages\sqlalchemy\ext\asyncio\engine.py”, line 548, in run_sync
return await greenlet_spawn(fn, conn, *arg, **kw)
File “C:\Anaconda3\envs\prefect\lib\site-packages\sqlalchemy\util_concurrency_py3k.py”, line 128, in greenlet_spawn
result = context.switch(value)
File “C:\Anaconda3\envs\prefect\lib\site-packages\prefect\orion\database\migrations\env.py”, line 129, in do_run_migrations
context.run_migrations()
File “”, line 8, in run_migrations
File “C:\Anaconda3\envs\prefect\lib\site-packages\alembic\runtime\environment.py”, line 853, in run_migrations
self.get_context().run_migrations(**kw)
File “C:\Anaconda3\envs\prefect\lib\site-packages\alembic\runtime\migration.py”, line 611, in run_migrations
for step in self._migrations_fn(heads, self):
File “C:\Anaconda3\envs\prefect\lib\site-packages\alembic\command.py”, line 311, in upgrade
return script._upgrade_revs(revision, rev)
File “C:\Anaconda3\envs\prefect\lib\site-packages\alembic\script\base.py”, line 439, in _upgrade_revs
return [
File “C:\Anaconda3\envs\prefect\lib\contextlib.py”, line 137, in exit
self.gen.throw(typ, value, traceback)
File “C:\Anaconda3\envs\prefect\lib\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 ‘3ced59d8806b’
ERROR: Application startup failed. Exiting.
Orion stopped!
(prefect) C:\Users\Shail>