Skip to content
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

Incorrect parameters for check_type function from typeguard #437

Closed
KnightCoder opened this issue Jul 7, 2023 · 2 comments · Fixed by #438 or #411
Closed

Incorrect parameters for check_type function from typeguard #437

KnightCoder opened this issue Jul 7, 2023 · 2 comments · Fixed by #438 or #411

Comments

@KnightCoder
Copy link

Issue description:
As the first parameter passed to the check_type function from typeguard package is unexpected, the execution breaks with the following TypeError:
TypeError: check_type() takes 2 positional arguments but 3 were given

Check the incorrect line of code here:

check_type("value", value, data_type)

More reference:
Typeguard API reference doc: https://typeguard.readthedocs.io/en/latest/api.html#typeguard.check_type

Suggested correction:
Instead, the code must have been:
check_type(value, data_type)

KnightCoder added a commit to KnightCoder/monai-deploy-app-sdk that referenced this issue Jul 8, 2023
@MMelQin
Copy link
Collaborator

MMelQin commented Jul 12, 2023

Thank you @KnightCoder for raising this issue. The SDK v0.5 implementation is using the typeguard v2.x API but the v3 brought breaking changes.
We had recommended pinning the version of the typeguard ~=2.12.1 before this PR addresses in the soon to be released patch build v0.5.1

@MMelQin
Copy link
Collaborator

MMelQin commented Aug 3, 2023

Addressed in release v0.5.1, and pinning typeguard ~=2.12.1 must be removed.

@MMelQin MMelQin closed this as completed Aug 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment