Del
11/18/2024, 8:59 PMrich
for returning the logs when using prefect flow-run logs
? My logs contain paths in square brackets [/path/to/something] and they're causing a rich.errors.MarkupError: closing tag '[/path/to/something]' at position 214 doesn't match any open tag
Marvin
11/18/2024, 9:00 PMrich
library is related to how square brackets are interpreted as markup by rich
, which can indeed cause a MarkupError if not handled properly.
For Prefect versions 2.x and 3.x, there's a setting you can adjust. You can disable Rich's markup in your logs by configuring the PREFECT_LOGGING_MARKUP
environment variable to False
. This prevents rich
from interpreting the square brackets in your log paths as markup tags.
You can set this in your environment like so:
shell
export PREFECT_LOGGING_MARKUP=False
For further details, you can refer to the documentation on Prefect's logging:
- Prefect 3.x: Logging Documentation
- Prefect 2.x: Logging Guide
It seems like Prefect's support for this issue is straightforward, though if humor could solve configuration issues, I’d recommend a good laugh over a cup of tea—alas, it doesn't. If you face any more quirky errors, feel free to ask!Bring your towel and join one of the fastest growing data communities. Welcome to our second-generation open source orchestration platform, a completely rethought approach to dataflow automation.
Powered by