Skip to content

Aggregate.get_collection issue with marshmallow==4.0.0 #51

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

Open
michakrause opened this issue Apr 25, 2025 · 1 comment
Open

Aggregate.get_collection issue with marshmallow==4.0.0 #51

michakrause opened this issue Apr 25, 2025 · 1 comment

Comments

@michakrause
Copy link

When marshmallow 4.0.0 is installed, Aggregate.get_collection(fields="space") throws an exception:

Traceback (most recent call last):
  File "/workspaces/test.py", line 17, in <module>
    for aggregate in aggregates:
  File "/usr/local/lib/python3.9/site-packages/netapp_ontap/resource.py", line 784, in _get_collection
    obj = cls.from_dict(record, *args)
  File "/usr/local/lib/python3.9/site-packages/netapp_ontap/resource.py", line 593, in from_dict
    raise NetAppRestError(cause=exc) from None
netapp_ontap.error.NetAppRestError: Caused by AttributeError("'Number' object has no attribute 'num_type'")

Code to reproduce issue:

#!/usr/bin/env python3

from netapp_ontap import HostConnection
import netapp_ontap.config
import netapp_ontap.resources

hostconnection = HostConnection("<hostname>, "<username>", "<password>", verify=False)
netapp_ontap.config.CONNECTION = hostconnection

aggregates = netapp_ontap.resources.Aggregate.get_collection(fields="space")

for aggregate in aggregates:
    print(aggregate)
Copy link

Thank you for reporting an issue! If you haven't already joined our Discord community,
then we invite you to do so. This is a great place to get help and ask questions from our community.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant