Skip to content

Exception handling in uproot/source/coalesce.py #1450

@zlmarshall

Description

@zlmarshall

Hello,

In uproot/source/coalesce.py , when there is a bad response from an upstream server, this happens:

~/.local/lib/python3.11/site-packages/uproot/source/coalesce.py in result(self, timeout)
     37             # Pyodide futures don't support timeout
     38             return self._parent.result()[self._s]
---> 39         return self._parent.result(timeout=timeout)[self._s]
     40 
     41 

TypeError: 'ClientResponseError' object is not subscriptable

This looks like it just needs a bit nicer error handling to pass on the error appropriately. Of course, it's an error in any case, so it's just a matter of making sure that the "correct" error is shown rather than something with a stack from uproot.

(Of course, this is a pretty tricky one to give a reproducer for right now — our server has some instability that's generating the error, but it doesn't happen every time...)

Thanks,
Zach

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug (unverified)The problem described would be a bug, but needs to be triagedcleanupNot broken, but could be more streamlined

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions