-
Notifications
You must be signed in to change notification settings - Fork 191
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ProcessNode.is_valid_cache
: catch AttributeError
for unloadable identifier
#5222
ProcessNode.is_valid_cache
: catch AttributeError
for unloadable identifier
#5222
Conversation
…dentifier The `is_valid_cache` property is supposed to only raise a `ValueError` when the function or class represented by the `process_type` identifier cannot be loaded. However, for a normal Python identifier of an existing module but with a function or class that does not exist in that module an `AttributeError` will be thrown which was not caught and converted.
@ltalirz I think this should fix your issue |
Thanks a lot, I'll check it later today |
Codecov Report
@@ Coverage Diff @@
## develop #5222 +/- ##
===========================================
+ Coverage 81.21% 81.21% +0.01%
===========================================
Files 532 532
Lines 37357 37357
===========================================
+ Hits 30336 30337 +1
+ Misses 7021 7020 -1
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks a lot @sphuber - there's a typo but up to you whether you want to fix it.
just so I understand: the fix of the issue is implicit here, since ValueError
s will be dealt with and so the failure here is no longer catastrophic, is that right?
Shall we open a separate issue for getting a more specific process type for calcfunctions that are not defined at the module level?
Thanks @ltalirz away from my computer now, will take of this at the end of the weekend.
Exactly, downstream is correctly catching ValueError but nothing else.
Yes, thatis still an unsolved issue so good to open one. |
Co-authored-by: Leopold Talirz <[email protected]>
Fixes #5220
The
is_valid_cache
property is supposed to only raise aValueError
when the function or class represented by the
process_type
identifiercannot be loaded. However, for a normal Python identifier of an existing
module but with a function or class that does not exist in that module
an
AttributeError
will be thrown which was not caught and converted.