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
Traceback (most recent call last):
File "C:\Users\Trim21\proj\test\f.py", line 14, in <module>
op.read("non-exists-path")
opendal.NotFoundError: NotFound (permanent) at stat, context: { service: redis, path: non-exists-path } => kv doesn't have this path
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\Trim21\proj\test\f.py", line 15, in <module>
except opendal.NotFoundError as e:
AttributeError: module 'opendal' has no attribute 'NotFoundError'
what actually work, which is not opendal nor NotFoundError, but opendal.exceptions.NotFound :
trim21
changed the title
bug: python exception module name doesn't match
bug: python exception module name and class name both don't match
Dec 25, 2024
Describe the bug
op.read("non-exists-path")
will throw exception like this:But if you actually try to catch exception
opendal.NotFoundError
you will encounter another error:what actually work, which is not
opendal
norNotFoundError
, butopendal.exceptions.NotFound
:Steps to Reproduce
Expected Behavior
exception module name should match or re-export them from top level
Additional Context
No response
Are you willing to submit a PR to fix this bug?
The text was updated successfully, but these errors were encountered: