How to use debugger to troubleshoot HTTPFile.read #1624
-
The HTTPFileSystem uses async, and I have no idea how to use breakpoints the way I normally would to troubleshoot. Here is the code that's giving me trouble (you would need a NASA Earthdata credentials to run it, sorry, but the thing I'm troubleshooting is a specific service that requires auth).
Here's the traceback.
The But it does not hit because it's in a different thread? How can I see what fsspec is actually getting as a response to that |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
You are correct, when fsspec is called from sync code, it runs an async event loop on a dedicated thread. However, because python has a GIL, you are totally able to place a breakpoint in the fetch method (with pdb, your favourite IDE or even editing http.py to add a |
Beta Was this translation helpful? Give feedback.
-
That may be, I think perhaps this is C code calling back into the python interpreter. |
Beta Was this translation helpful? Give feedback.
That may be, I think perhaps this is C code calling back into the python interpreter.