First example in the docs errors for me and @serinamarie. The second example doesn't error for Serina when using a fixture, does still for me.
Tested with rc10, too.
Version: 3.0.0rc9
API version: 0.8.4
Python version: 3.11.0
Git commit: b75631a7
Built: Mon, Jun 24, 2024 5:50 PM
OS/Arch: darwin/arm64
Profile: default
Server type: server
Database migrations applied.
Traceback from fixture example.
================== test session starts ===================
platform darwin -- Python 3.11.0, pytest-8.2.2, pluggy-1.5.0
rootdir: /Users/jeffhale/Desktop/prefect/demos
plugins: time-machine-2.14.2, asyncio-0.23.7, anyio-4.4.0
asyncio: mode=Mode.STRICT
collected 1 item
../t2.py . [100%]
==================== warnings summary ====================
t2.py::test_my_favorite_flow
/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/contextlib.py:144: SAWarning: Skipped unsupported reflection of expression-based index ix_flow_run__coalesce_start_time_expected_start_time_desc
next(self.gen)
t2.py::test_my_favorite_flow
/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/contextlib.py:144: SAWarning: Skipped unsupported reflection of expression-based index ix_flow_run__coalesce_start_time_expected_start_time_asc
next(self.gen)
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
============= 1 passed, 2 warnings in 5.87s ==============
--- Logging error ---
Traceback (most recent call last):
File "/Users/jeffhale/Desktop/prefect/prefect-testing/my_env/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 146, in __init__
self._dbapi_connection = engine.raw_connection()
^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/jeffhale/Desktop/prefect/prefect-testing/my_env/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 3300, in raw_connection
return self.pool.connect()
^^^^^^^^^^^^^^^^^^^
File "/Users/jeffhale/Desktop/prefect/prefect-testing/my_env/lib/python3.11/site-packages/sqlalchemy/pool/base.py", line 449, in connect
return _ConnectionFairy._checkout(self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/jeffhale/Desktop/prefect/prefect-testing/my_env/lib/python3.11/site-packages/sqlalchemy/pool/base.py", line 1263, in _checkout
fairy = _ConnectionRecord.checkout(pool)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/jeffhale/Desktop/prefect/prefect-testing/my_env/lib/python3.11/site-packages/sqlalchemy/pool/base.py", line 712, in checkout
rec = pool._do_get()
^^^^^^^^^^^^^^
File "/Users/jeffhale/Desktop/prefect/prefect-testing/my_env/lib/python3.11/site-packages/sqlalchemy/pool/impl.py", line 308, in _do_get
return self._create_connection()
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/jeffhale/Desktop/prefect/prefect-testing/my_env/lib/python3.11/site-packages/sqlalchemy/pool/base.py", line 390, in _create_connection
return _ConnectionRecord(self)
^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/jeffhale/Desktop/prefect/prefect-testing/my_env/lib/python3.11/site-packages/sqlalchemy/pool/base.py", line 674, in __init__
self.__connect()
File "/Users/jeffhale/Desktop/prefect/prefect-testing/my_env/lib/python3.11/site-packages/sqlalchemy/pool/base.py", line 900, in __connect
with util.safe_reraise():
File "/Users/jeffhale/Desktop/prefect/prefect-testing/my_env/lib/python3.11/site-packages/sqlalchemy/util/langhelpers.py", line 146, in __exit__
raise exc_value.with_traceback(exc_tb)
File "/Users/jeffhale/Desktop/prefect/prefect-testing/my_env/lib/python3.11/site-packages/sqlalchemy/pool/base.py", line 896, in __connect
self.dbapi_connection = connection = pool._invoke_creator(self)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/jeffhale/Desktop/prefect/prefect-testing/my_env/lib/python3.11/site-packages/sqlalchemy/engine/create.py", line 643, in connect
return dialect.connect(*cargs, **cparams)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/jeffhale/Desktop/prefect/prefect-testing/my_env/lib/python3.11/site-packages/sqlalchemy/engine/default.py", line 620, in connect
return self.loaded_dbapi.connect(*cargs, **cparams)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/jeffhale/Desktop/prefect/prefect-testing/my_env/lib/python3.11/site-packages/sqlalchemy/dialects/sqlite/aiosqlite.py", line 352, in connect
await_only(connection),
^^^^^^^^^^^^^^^^^^^^^^
File "/Users/jeffhale/Desktop/prefect/prefect-testing/my_env/lib/python3.11/site-packages/sqlalchemy/util/_concurrency_py3k.py", line 132, in await_only
return current.parent.switch(awaitable) # type: ignore[no-any-return,attr-defined] # noqa: E501
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/jeffhale/Desktop/prefect/prefect-testing/my_env/lib/python3.11/site-packages/sqlalchemy/util/_concurrency_py3k.py", line 196, in greenlet_spawn
value = await result
^^^^^^^^^^^^
File "/Users/jeffhale/Desktop/prefect/prefect-testing/my_env/lib/python3.11/site-packages/aiosqlite/core.py", line 140, in _connect
self._connection = await future
^^^^^^^^^^^^
File "/Users/jeffhale/Desktop/prefect/prefect-testing/my_env/lib/python3.11/site-packages/aiosqlite/core.py", line 115, in run
result = function()
^^^^^^^^^^
File "/Users/jeffhale/Desktop/prefect/prefect-testing/my_env/lib/python3.11/site-packages/aiosqlite/core.py", line 392, in connector
return sqlite3.connect(loc, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
sqlite3.OperationalError: unable to open database file
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/Users/jeffhale/Desktop/prefect/prefect-testing/my_env/lib/python3.11/site-packages/starlette/middleware/errors.py", line 164, in __call__
await self.app(scope, receive, _send)
File "/Users/jeffhale/Desktop/prefect/prefect-testing/my_env/lib/python3.11/site-packages/starlette/middleware/gzip.py", line 24, in __call__
await responder(scope, receive, send)
File "/Users/jeffhale/Desktop/prefect/prefect-testing/my_env/lib/python3.11/site-packages/starlette/middleware/gzip.py", line 44, in __call__
await self.app(scope, receive, self.send_with_gzip)
File "/Users/jeffhale/Desktop/prefect/prefect-testing/my_env/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 65, in __call__
await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
File "/Users/jeffhale/Desktop/prefect/prefect-testing/my_env/lib/python3.11/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app
raise exc
File "/Users/jeffhale/Desktop/prefect/prefect-testing/my_env/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
await app(scope, receive, sender)
File "/Users/jeffhale/Desktop/prefect/prefect-testing/my_env/lib/python3.11/site-packages/starlette/routing.py", line 756, in __call__
await self.middleware_stack(scope, receive, send)
File "/Users/jeffhale/Desktop/prefect/prefect-testing/my_env/lib/python3.11/site-packages/starlette/routing.py", line 776, in app
await route.handle(scope, receive, send)
File "/Users/jeffhale/Desktop/prefect/prefect-testing/my_env/lib/python3.11/site-packages/starlette/routing.py", line 297, in handle
await self.app(scope, receive, send)
File "/Users/jeffhale/Desktop/prefect/prefect-testing/my_env/lib/python3.11/site-packages/starlette/routing.py", line 77, in app
await wrap_app_handling_exceptions(app, request)(scope, receive, send)
File "/Users/jeffhale/Desktop/prefect/prefect-testing/my_env/lib/python3.11/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app
raise exc
File "/Users/jeffhale/Desktop/prefect/prefect-testing/my_env/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
await app(scope, receive, sender)
File "/Users/jeffhale/Desktop/prefect/prefect-testing/my_env/lib/python3.11/site-packages/starlette/routing.py", line 72, in app
response = await func(request)
^^^^^^^^^^^^^^^^^^^
File "/Users/jeffhale/Desktop/prefect/prefect-testing/my_env/lib/python3.11/site-packages/prefect/server/utilities/server.py", line 47, in handle_response_scoped_depends
response = await default_handler(request)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/jeffhale/Desktop/prefect/prefect-testing/my_env/lib/python3.11/site-packages/fastapi/routing.py", line 278, in app
raw_response = await run_endpoint_function(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/jeffhale/Desktop/prefect/prefect-testing/my_env/lib/python3.11/site-packages/fastapi/routing.py", line 191, in run_endpoint_function
return await dependant.call(**values)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/contextlib.py", line 222, in __aexit__
await self.gen.athrow(typ, value, traceback)
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/contextlib.py", line 222, in __aexit__
await self.gen.athrow(typ, value, traceback)
File "/Users/jeffhale/Desktop/prefect/prefect-testing/my_env/lib/python3.11/site-packages/prefect/server/database/configurations.py", line 453, in begin_transaction
yield transaction
File "/Users/jeffhale/Desktop/prefect/prefect-testing/my_env/lib/python3.11/site-packages/prefect/server/database/interface.py", line 119, in session_context
yield session
File "/Users/jeffhale/Desktop/prefect/prefect-testing/my_env/lib/python3.11/site-packages/prefect/server/api/logs.py", line 27, in create_logs
await models.logs.create_logs(session=session, logs=batch)
File "/Users/jeffhale/Desktop/prefect/prefect-testing/my_env/lib/python3.11/site-packages/prefect/server/database/dependencies.py", line 125, in async_wrapper
return await fn(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/jeffhale/Desktop/prefect/prefect-testing/my_env/lib/python3.11/site-packages/prefect/server/models/logs.py", line 49, in create_logs
await session.execute(
File "/Users/jeffhale/Desktop/prefect/prefect-testing/my_env/lib/python3.11/site-packages/sqlalchemy/ext/asyncio/session.py", line 461, in execute
result = await greenlet_spawn(
^^^^^^^^^^^^^^^^^^^^^
File "/Users/jeffhale/Desktop/prefect/prefect-testing/my_env/lib/python3.11/site-packages/sqlalchemy/util/_concurrency_py3k.py", line 201, in greenlet_spawn
result = context.throw(*sys.exc_info())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/jeffhale/Desktop/prefect/prefect-testing/my_env/lib/python3.11/site-packages/sqlalchemy/orm/session.py", line 2351, in execute
return self._execute_internal(
^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/jeffhale/Desktop/prefect/prefect-testing/my_env/lib/python3.11/site-packages/sqlalchemy/orm/session.py", line 2226, in _execute_internal
conn = self._connection_for_bind(bind)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/jeffhale/Desktop/prefect/prefect-testing/my_env/lib/python3.11/site-packages/sqlalchemy/orm/session.py", line 2095, in _connection_for_bind
return trans._connection_for_bind(engine, execution_options)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<string>", line 2, in _connection_for_bind
File "/Users/jeffhale/Desktop/prefect/prefect-testing/my_env/lib/python3.11/site-packages/sqlalchemy/orm/state_changes.py", line 139, in _go
ret_value = fn(self, *arg, **kw)
^^^^^^^^^^^^^^^^^^^^
File "/Users/jeffhale/Desktop/prefect/prefect-testing/my_env/lib/python3.11/site-packages/sqlalchemy/orm/session.py", line 1189, in _connection_for_bind
conn = bind.connect()
^^^^^^^^^^^^^^
File "/Users/jeffhale/Desktop/prefect/prefect-testing/my_env/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 3276, in connect
return self._connection_cls(self)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/jeffhale/Desktop/prefect/prefect-testing/my_env/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 148, in __init__
Connection._handle_dbapi_exception_noconnection(
File "/Users/jeffhale/Desktop/prefect/prefect-testing/my_env/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 2440, in _handle_dbapi_exception_noconnection
raise sqlalchemy_exception.with_traceback(exc_info[2]) from e
File "/Users/jeffhale/Desktop/prefect/prefect-testing/my_env/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 146, in __init__
self._dbapi_connection = engine.raw_connection()
^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/jeffhale/Desktop/prefect/prefect-testing/my_env/lib/python3.11/site-packages/sqlalchemy/engine/base.py", line 3300, in raw_connection
return self.pool.connect()
^^^^^^^^^^^^^^^^^^^
File "/Users/jeffhale/Desktop/prefect/prefect-testing/my_env/lib/python3.11/site-packages/sqlalchemy/pool/base.py", line 449, in connect
return _ConnectionFairy._checkout(self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/jeffhale/Desktop/prefect/prefect-testing/my_env/lib/python3.11/site-packages/sqlalchemy/pool/base.py", line 1263, in _checkout
fairy = _ConnectionRecord.checkout(pool)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/jeffhale/Desktop/prefect/prefect-testing/my_env/lib/python3.11/site-packages/sqlalchemy/pool/base.py", line 712, in checkout
rec = pool._do_get()
^^^^^^^^^^^^^^
File "/Users/jeffhale/Desktop/prefect/prefect-testing/my_env/lib/python3.11/site-packages/sqlalchemy/pool/impl.py", line 308, in _do_get
return self._create_connection()
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/jeffhale/Desktop/prefect/prefect-testing/my_env/lib/python3.11/site-packages/sqlalchemy/pool/base.py", line 390, in _create_connection
return _ConnectionRecord(self)
^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/jeffhale/Desktop/prefect/prefect-testing/my_env/lib/python3.11/site-packages/sqlalchemy/pool/base.py", line 674, in __init__
self.__connect()
File "/Users/jeffhale/Desktop/prefect/prefect-testing/my_env/lib/python3.11/site-packages/sqlalchemy/pool/base.py", line 900, in __connect
with util.safe_reraise():
File "/Users/jeffhale/Desktop/prefect/prefect-testing/my_env/lib/python3.11/site-packages/sqlalchemy/util/langhelpers.py", line 146, in __exit__
raise exc_value.with_traceback(exc_tb)
File "/Users/jeffhale/Desktop/prefect/prefect-testing/my_env/lib/python3.11/site-packages/sqlalchemy/pool/base.py", line 896, in __connect
self.dbapi_connection = connection = pool._invoke_creator(self)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/jeffhale/Desktop/prefect/prefect-testing/my_env/lib/python3.11/site-packages/sqlalchemy/engine/create.py", line 643, in connect
return dialect.connect(*cargs, **cparams)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/jeffhale/Desktop/prefect/prefect-testing/my_env/lib/python3.11/site-packages/sqlalchemy/engine/default.py", line 620, in connect
return self.loaded_dbapi.connect(*cargs, **cparams)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/jeffhale/Desktop/prefect/prefect-testing/my_env/lib/python3.11/site-packages/sqlalchemy/dialects/sqlite/aiosqlite.py", line 352, in connect
await_only(connection),
^^^^^^^^^^^^^^^^^^^^^^
File "/Users/jeffhale/Desktop/prefect/prefect-testing/my_env/lib/python3.11/site-packages/sqlalchemy/util/_concurrency_py3k.py", line 132, in await_only
return current.parent.switch(awaitable) # type: ignore[no-any-return,attr-defined] # noqa: E501
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/jeffhale/Desktop/prefect/prefect-testing/my_env/lib/python3.11/site-packages/sqlalchemy/util/_concurrency_py3k.py", line 196, in greenlet_spawn
value = await result
^^^^^^^^^^^^
File "/Users/jeffhale/Desktop/prefect/prefect-testing/my_env/lib/python3.11/site-packages/aiosqlite/core.py", line 140, in _connect
self._connection = await future
^^^^^^^^^^^^
File "/Users/jeffhale/Desktop/prefect/prefect-testing/my_env/lib/python3.11/site-packages/aiosqlite/core.py", line 115, in run
result = function()
^^^^^^^^^^
File "/Users/jeffhale/Desktop/prefect/prefect-testing/my_env/lib/python3.11/site-packages/aiosqlite/core.py", line 392, in connector
return sqlite3.connect(loc, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) unable to open database file
(Background on this error at: https://sqlalche.me/e/20/e3q8)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/jeffhale/Desktop/prefect/prefect-testing/my_env/lib/python3.11/site-packages/prefect/logging/handlers.py", line 278, in emit
self.console.print(message, soft_wrap=True)
File "/Users/jeffhale/Desktop/prefect/prefect-testing/my_env/lib/python3.11/site-packages/rich/console.py", line 1673, in print
with self:
File "/Users/jeffhale/Desktop/prefect/prefect-testing/my_env/lib/python3.11/site-packages/rich/console.py", line 865, in __exit__
self._exit_buffer()
File "/Users/jeffhale/Desktop/prefect/prefect-testing/my_env/lib/python3.11/site-packages/rich/console.py", line 823, in _exit_buffer
self._check_buffer()
File "/Users/jeffhale/Desktop/prefect/prefect-testing/my_env/lib/python3.11/site-packages/rich/console.py", line 2060, in _check_buffer
self.file.write(text)
ValueError: I/O operation on closed file.
Call stack:
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/threading.py", line 995, in _bootstrap
self._bootstrap_inner()
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/threading.py", line 1038, in _bootstrap_inner
self.run()
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/threading.py", line 975, in run
self._target(*self._args, **self._kwargs)
File "/Users/jeffhale/Desktop/prefect/prefect-testing/my_env/lib/python3.11/site-packages/prefect/_internal/concurrency/threads.py", line 199, in _entrypoint
asyncio.run(self._run_until_shutdown())
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/asyncio/runners.py", line 190, in run
return runner.run(main)
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/asyncio/runners.py", line 118, in run
return self._loop.run_until_complete(task)
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/asyncio/base_events.py", line 637, in run_until_complete
self.run_forever()
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/asyncio/base_events.py", line 604, in run_forever
self._run_once()
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/asyncio/base_events.py", line 1909, in _run_once
handle._run()
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/asyncio/events.py", line 80, in _run
self._context.run(self._callback, *self._args)
File "/Users/jeffhale/Desktop/prefect/prefect-testing/my_env/lib/python3.11/site-packages/prefect/_internal/concurrency/services.py", line 125, in _run
await self._main_loop()
File "/Users/jeffhale/Desktop/prefect/prefect-testing/my_env/lib/python3.11/site-packages/prefect/_internal/concurrency/services.py", line 326, in _main_loop
await self._handle_batch(batch)
File "/Users/jeffhale/Desktop/prefect/prefect-testing/my_env/lib/python3.11/site-packages/prefect/logging/handlers.py", line 54, in _handle_batch
await self._client.create_logs(items)
File "/Users/jeffhale/Desktop/prefect/prefect-testing/my_env/lib/python3.11/site-packages/prefect/client/orchestration.py", line 2381, in create_logs
await self._client.post("/logs/", json=serialized_logs)
File "/Users/jeffhale/Desktop/prefect/prefect-testing/my_env/lib/python3.11/site-packages/httpx/_client.py", line 1892, in post
return await self.request(
File "/Users/jeffhale/Desktop/prefect/prefect-testing/my_env/lib/python3.11/site-packages/httpx/_client.py", line 1574, in request
return await self.send(request, auth=auth, follow_redirects=follow_redirects)
File "/Users/jeffhale/Desktop/prefect/prefect-testing/my_env/lib/python3.11/site-packages/prefect/client/base.py", line 327, in send
response = await self._send_with_retry(
File "/Users/jeffhale/Desktop/prefect/prefect-testing/my_env/lib/python3.11/site-packages/prefect/client/base.py", line 251, in _send_with_retry
response = await send(request, *send_args, **send_kwargs)
File "/Users/jeffhale/Desktop/prefect/prefect-testing/my_env/lib/python3.11/site-packages/httpx/_client.py", line 1661, in send
response = await self._send_handling_auth(
File "/Users/jeffhale/Desktop/prefect/prefect-testing/my_env/lib/python3.11/site-packages/httpx/_client.py", line 1689, in _send_handling_auth
response = await self._send_handling_redirects(
File "/Users/jeffhale/Desktop/prefect/prefect-testing/my_env/lib/python3.11/site-packages/httpx/_client.py", line 1726, in _send_handling_redirects
response = await self._send_single_request(request)
File "/Users/jeffhale/Desktop/prefect/prefect-testing/my_env/lib/python3.11/site-packages/httpx/_client.py", line 1763, in _send_single_request
response = await transport.handle_async_request(request)
File "/Users/jeffhale/Desktop/prefect/prefect-testing/my_env/lib/python3.11/site-packages/httpx/_transports/asgi.py", line 164, in handle_async_request
await self.app(scope, receive, send)
File "/Users/jeffhale/Desktop/prefect/prefect-testing/my_env/lib/python3.11/site-packages/fastapi/applications.py", line 1054, in __call__
await super().__call__(scope, receive, send)
File "/Users/jeffhale/Desktop/prefect/prefect-testing/my_env/lib/python3.11/site-packages/starlette/applications.py", line 123, in __call__
await self.middleware_stack(scope, receive, send)
File "/Users/jeffhale/Desktop/prefect/prefect-testing/my_env/lib/python3.11/site-packages/starlette/middleware/errors.py", line 164, in __call__
await self.app(scope, receive, _send)
File "/Users/jeffhale/Desktop/prefect/prefect-testing/my_env/lib/python3.11/site-packages/prefect/server/api/server.py", line 139, in __call__
await self.app(scope, receive, send)
File "/Users/jeffhale/Desktop/prefect/prefect-testing/my_env/lib/python3.11/site-packages/starlette/middleware/cors.py", line 85, in __call__
await self.app(scope, receive, send)
File "/Users/jeffhale/Desktop/prefect/prefect-testing/my_env/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 65, in __call__
await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
File "/Users/jeffhale/Desktop/prefect/prefect-testing/my_env/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
await app(scope, receive, sender)
File "/Users/jeffhale/Desktop/prefect/prefect-testing/my_env/lib/python3.11/site-packages/starlette/routing.py", line 756, in __call__
await self.middleware_stack(scope, receive, send)
File "/Users/jeffhale/Desktop/prefect/prefect-testing/my_env/lib/python3.11/site-packages/starlette/routing.py", line 776, in app
await route.handle(scope, receive, send)
File "/Users/jeffhale/Desktop/prefect/prefect-testing/my_env/lib/python3.11/site-packages/starlette/routing.py", line 485, in handle
await self.app(scope, receive, send)
File "/Users/jeffhale/Desktop/prefect/prefect-testing/my_env/lib/python3.11/site-packages/fastapi/applications.py", line 1054, in __call__
await super().__call__(scope, receive, send)
File "/Users/jeffhale/Desktop/prefect/prefect-testing/my_env/lib/python3.11/site-packages/starlette/applications.py", line 123, in __call__
await self.middleware_stack(scope, receive, send)
File "/Users/jeffhale/Desktop/prefect/prefect-testing/my_env/lib/python3.11/site-packages/starlette/middleware/errors.py", line 176, in __call__
response = await self.handler(request, exc)
File "/Users/jeffhale/Desktop/prefect/prefect-testing/my_env/lib/python3.11/site-packages/prefect/server/api/server.py", line 253, in custom_internal_exception_handler
logger.error("Encountered exception in request:", exc_info=True)
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/logging/__init__.py", line 1518, in error
self._log(ERROR, msg, args, **kwargs)
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/logging/__init__.py", line 1634, in _log
self.handle(record)
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/logging/__init__.py", line 1644, in handle
self.callHandlers(record)
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/logging/__init__.py", line 1706, in callHandlers
hdlr.handle(record)
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/logging/__init__.py", line 978, in handle
self.emit(record)
File "/Users/jeffhale/Desktop/prefect/prefect-testing/my_env/lib/python3.11/site-packages/prefect/logging/handlers.py", line 284, in emit
self.handleError(record)
Message: 'Encountered exception in request:'
Arguments: ()
--- Error logging to API ---
Server error '500 Internal Server Error' for url 'http://ephemeral-prefect/api/logs/'
Response: {'exception_message': 'Internal Server Error'}
For more information check: https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/500%
First example in the docs errors for me and @serinamarie. The second example doesn't error for Serina when using a fixture, does still for me.
Tested with rc10, too.
Version: 3.0.0rc9 API version: 0.8.4 Python version: 3.11.0 Git commit: b75631a7 Built: Mon, Jun 24, 2024 5:50 PM OS/Arch: darwin/arm64 Profile: default Server type: server
Database migrations applied.
Traceback from fixture example.