You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Originally posted by GuruComposer September 12, 2022
Apache Airflow version
2.3.4
What happened
I used to be able to use ipdb to debug DAGs by running airflow tasks test <dag_name> <dag_id>, and hitting an ipdb breakpoint (ipdb.set_trace()).
This no longer works. I get a strange type error:
return self.dispatch_line(frame)
File "/usr/local/lib/python3.9/bdb.py", line 112, in dispatch_line
self.user_line(frame)
File "/usr/local/lib/python3.9/pdb.py", line 262, in user_line
self.interaction(frame, None)
File "/home/astro/.local/lib/python3.9/site-packages/IPython/core/debugger.py", line 336, in interaction
OldPdb.interaction(self, frame, traceback)
File "/usr/local/lib/python3.9/pdb.py", line 357, in interaction
self._cmdloop()
File "/usr/local/lib/python3.9/pdb.py", line 322, in _cmdloop
self.cmdloop()
File "/usr/local/lib/python3.9/cmd.py", line 126, in cmdloop
line = input(self.prompt)
TypeError: an integer is required (got type NoneType)```
### What you think should happen instead
I should get the ipdb shell.
### How to reproduce
1. Add ipdb breakpoint anywhere in airflow task.
import ipdb; ipdb.set_trace()
2. Run that task:
Run `airflow tasks test <dag_name> <dag_id>`, and
### Operating System
Debian GNU/Linux
### Versions of Apache Airflow Providers
2.3.4
The text was updated successfully, but these errors were encountered:
airflow ❯ python testredir.py
[0] > /home/ash/code/astro/upgrade-test-project/testredir.py(7)<module>()
-> ...
Traceback (most recent call last):
File "/home/ash/code/astro/upgrade-test-project/testredir.py", line 7, in <module>
...
File "/home/ash/code/astro/upgrade-test-project/testredir.py", line 7, in <module>
...
File "/usr/lib/python3.10/bdb.py", line 90, in trace_dispatch
return self.dispatch_line(frame)
File "/usr/lib/python3.10/bdb.py", line 114, in dispatch_line
self.user_line(frame)
File "/usr/lib/python3.10/pdb.py", line 262, in user_line
self.interaction(frame, None)
File "/home/ash/.virtualenvs/airflow/lib/python3.10/site-packages/pdb.py", line 231, in interaction
self._cmdloop()
File "/usr/lib/python3.10/pdb.py", line 322, in _cmdloop
self.cmdloop()
File "/usr/lib/python3.10/cmd.py", line 126, in cmdloop
line = input(self.prompt)
TypeError: 'NoneType' object cannot be interpreted as an integer
Converted back to issue as I've reproduced it and traced the issue back to #24362
Discussed in #26352
Originally posted by GuruComposer September 12, 2022
Apache Airflow version
2.3.4
What happened
I used to be able to use ipdb to debug DAGs by running
airflow tasks test <dag_name> <dag_id>
, and hitting an ipdb breakpoint (ipdb.set_trace()).This no longer works. I get a strange type error:
The text was updated successfully, but these errors were encountered: