i am having a weird issue. All of a sudden i am getting “NameError: name ‘get_run_logger’ is not defined” in all my flow runs. Was working fine yesterday.
15:09:36.386 | INFO | Flow run 'sincere-coot' - Created subflow run 'tunneling-platypus' for flow 'map-fmp-cot-report'
15:09:36.388 | INFO | Flow run 'tunneling-platypus' - View at <http://127.0.0.1:4200/flow-runs/flow-run/cc147a85-dd61-468e-ba3c-0618b6d82633>
15:09:36.476 | INFO | Flow run 'tunneling-platypus' - Created task run 'feather_get_tickers_cot-0' for task 'feather_get_tickers_cot'
15:09:36.478 | INFO | Flow run 'tunneling-platypus' - Executing 'feather_get_tickers_cot-0' immediately...
15:09:36.557 | ERROR | Task run 'feather_get_tickers_cot-0' - Encountered exception during execution:
get_run_logger().info(f"GET feather file: {filepath}")
NameError: name 'get_run_logger' is not defined
j
Jake Kaplan
08/19/2023, 8:58 PM
what happens when you do just:
Copy code
from prefect import get_run_logger
get_run_logger()
what about:
Copy code
from prefect.logging import get_run_logger
get_run_logger()
Jake Kaplan
08/19/2023, 8:59 PM
you might have a naming or import conflict somewhere?
k
Kyle
08/19/2023, 8:59 PM
weird it was working yesterday in both my scripts. i didnt change the other one and it isnt working either.
Kyle
08/19/2023, 9:10 PM
looks like it does print/log one higher up the flow. not sure why it stopped working lower down the flow. i’ll mess with it. both your examples yield same result.
Kyle
08/19/2023, 9:17 PM
i think i figured it out. the culprit was a get_run_logger() i had put in a bad place. inside the feather resource. which is in my other scripts too.
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.