Hi all,
I am encountering an issue when calling the client.iam.groups.list(all=True)
method in my Python 3.12 environment within Azure Batch. The code runs without issues in my local setup (also Python 3.12), but it fails in Azure Batch with the following traceback:
Traceback (most recent call last): File "GroupMembersCapabilities.py", line 55, in <module> groups = client.iam.groups.list(all=True) File "D:\Users\...\site-packages\cognite\client\_api\iam.py", line 297, in list return GroupList._load(res.json()("items"], cognite_client=self._cognite_client, allow_unknown=True) File "D:\Users\...\site-packages\cognite\client\data_classes\iam.py", line 224, in _load dcls._RESOURCE._load(res, cognite_client, allow_unknown) for res in resource_list] File "D:\Users\...\site-packages\cognite\client\data_classes\iam.py", line 147, in _load capabilities=sCapability.load(c, allow_unknown) for c in resource.get("capabilities", ,])] or None File "D:\Users\...\site-packages\cognite\client\data_classes\capabilities.py", line 193, in load actions=sUnknownAcl.Action.load(act, allow_unknown) for act in datat"actions"]] File "D:\Users\...\site-packages\cognite\client\data_classes\capabilities.py", line 106, in load return cls(action) File "C:\Python312\Lib\enum.py", line 748, in __call__ raise TypeError: <enum 'Action'> has no members; specify `names=()` if you meant to create a new, empty, enum
It seems like the issue lies with the Enum
for Action
not having members or being improperly loaded. I’ve confirmed that both my local environment and Azure Batch are using Python 3.12 and the cognite-sdk
version is 7.62.1 in both environments.
Could you provide any guidance on why this is happening in Azure Batch but not locally, or if there’s a compatibility issue with Python 3.12 and cognite-sdk
7.62.1?
Thank you for your assistance!