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

Exception: Invalid key: Google for enum <enum 'ManagementAgentType'>. #320

Closed
fa-tech-net opened this issue Jan 24, 2024 · 2 comments
Closed
Assignees

Comments

@fa-tech-net
Copy link

While fetching managed devices with the following call :

GraphServiceClient -> device_management.managed_devices.get()

  File "[...]\msgraph_beta\generated\models\managed_device.py", line 400, in <lambda>
    "managementAgent": lambda n : setattr(self, 'management_agent', n.get_enum_value(ManagementAgentType)),
  File "[...]\kiota_serialization_json\json_parse_node.py", line 201, in get_enum_value
    raise Exception(f'Invalid key: {camel_case_key} for enum {enum_class}.')
Exception: Invalid key: Google for enum <enum 'ManagementAgentType'>.

File generated is missing a management agent type google, in class ManagementAgentType from generated\models\management_agent_type.py

Manually adding the Google enum in the file fix the issue

@SilasKenneth
Copy link
Member

Hi @fa-tech-net ,
Sorry for the late response.
Looks like this is an issue that was resolved in #316.
Kindly confirm if you are still facing the issue.

@SilasKenneth SilasKenneth added the status:waiting-for-author-feedback Issue that we've responded but needs author feedback to close label Jun 5, 2024
@fa-tech-net
Copy link
Author

It solves the issue, thanks !

@SilasKenneth SilasKenneth removed the status:waiting-for-author-feedback Issue that we've responded but needs author feedback to close label Jun 6, 2024
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

2 participants