FastStream is a powerful and easy-to-use Python framework for building asynchronous services interacting with event streams such as Apache Kafka, RabbitMQ, NATS and Redis.
I am not sure what really causes this error. My wild guess is that it is somehow related to the fact that I'm using structlog that was configured per official instructions described here: https://faststream.airt.ai/latest/getting-started/logging/?h=structlog#structlog-example. Error does not happen all the time but quite frequently during development.
Run the app with --reload option faststream run serve:app --reload
Expected behavior
No TypeError on reload.
Observed behavior
2024-04-11T16:55:56.073888Z [info ] FastStream app started successfully! To exit, press CTRL+C extra={}
Traceback (most recent call last):
File "/Users/Silver/.pyenv/versions/3.12.1/envs/jetstream/bin/faststream", line 8, in <module>
sys.exit(cli())
^^^^^
File "/Users/Silver/.pyenv/versions/3.12.1/envs/jetstream/lib/python3.12/site-packages/faststream/cli/main.py", line 137, in run
).run()
^^^^^
File "/Users/Silver/.pyenv/versions/3.12.1/envs/jetstream/lib/python3.12/site-packages/faststream/cli/supervisors/basereload.py", line 88, in run
if self.should_restart(): # pragma: no branch
^^^^^^^^^^^^^^^^^^^^^
File "/Users/Silver/.pyenv/versions/3.12.1/envs/jetstream/lib/python3.12/site-packages/faststream/cli/supervisors/watchfiles.py", line 89, in should_restart
logger.info(message % tuple(unique_paths))
~~~~~~~~^~~~~~~~~~~~~~~~~~~~~
TypeError: not all arguments converted during string formatting
Environment
Running FastStream 0.4.6 with CPython 3.12.1 on Darwin
Seems like Path() object can't be casted to str in your case. I'll try to fix it by manual casting, but not sure. I am just can't reproduce your case, sorry
Describe the bug
I am not sure what really causes this error. My wild guess is that it is somehow related to the fact that I'm using structlog that was configured per official instructions described here: https://faststream.airt.ai/latest/getting-started/logging/?h=structlog#structlog-example. Error does not happen all the time but quite frequently during development.
How to reproduce
integration with an app:
And/Or steps to reproduce the behavior:
faststream run serve:app --reload
Expected behavior No TypeError on reload.
Observed behavior
Environment Running FastStream 0.4.6 with CPython 3.12.1 on Darwin