https://prefect.io logo
#prefect-community
Title
# prefect-community
t

Thomas Hoeck

07/21/2020, 7:33 AM
Hi all. Is there a way to get more descriptive tracebacks i Prefect Cloud? Currently I'm getting:
Unexpected error: ZeroDivisionError('division by zero')
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/prefect/engine/runner.py", line 48, in inner
new_state = method(self, state, *args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/prefect/engine/task_runner.py", line 952, in get_task_run_state
self.task.run, timeout=self.task.timeout, **raw_inputs
File "/usr/local/lib/python3.7/site-packages/prefect/utilities/executors.py", line 182, in timeout_handler
return fn(*args, **kwargs)
File "<ipython-input-6-39643be0b44f>", line 9, in hello_task
ZeroDivisionError: division by zero
I know it is part of the Hybrid model that code isn't shared but is there a way to get a normal python traceback, so I can see the failed line?
j

josh

07/21/2020, 11:40 AM
Hmm @Thomas Hoeck how are you running this with Cloud? My runs look to be giving me a descriptive enough traceback:
Copy code
Unexpected error: ZeroDivisionError('division by zero')
Traceback (most recent call last):
  File "/Users/josh/Desktop/code/prefect/src/prefect/engine/runner.py", line 48, in inner
    new_state = method(self, state, *args, **kwargs)
  File "/Users/josh/Desktop/code/prefect/src/prefect/engine/task_runner.py", line 820, in get_task_run_state
    self.task.run, timeout=self.task.timeout, **raw_inputs
  File "/Users/josh/Desktop/code/prefect/src/prefect/utilities/executors.py", line 188, in timeout_handler
    return fn(*args, **kwargs)
  File "raiseonexception.py", line 5, in a
    return 1 / 0
ZeroDivisionError: division by zero
Where it shows the line in my task that raises the exception. Are you looking for more?
t

Thomas Hoeck

07/21/2020, 1:02 PM
I'm running it using a Docker Agent. I was expecting to get the same lines as you.
Copy code
File "raiseonexception.py", line 5, in a
    return 1 / 0
It might be because I registered the flow in Jupyter.
But the above is my error log from Prefect Cloud.