Skip to content

Can't retrieve project using v1_get_project #1

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
jbmcfarlin31 opened this issue May 16, 2024 · 0 comments
Open

Can't retrieve project using v1_get_project #1

jbmcfarlin31 opened this issue May 16, 2024 · 0 comments

Comments

@jbmcfarlin31
Copy link

Description

I am trying to port over some of our existing codebase to this new SDK and am having some issues trying to retrieve a single project (among a few others that will likely be separate GH issues).

Corellium SDK version installed via pip: corellium-api==0.3.2

I followed the instructions in the README file. This is my code that is reproducing the error:

import asyncio
import corellium_api

config = corellium_api.Configuration(
    host="https://myredacteddomain.corellium.com", # redacted for security reasons
)

config.access_token = "some_access_token"


async def main():
    async with corellium_api.ApiClient(config) as api:
        client = corellium_api.CorelliumApi(api)
        project = await client.v1_get_project(
            project_id="<project_id_to_lookup>"
        )
        print(project)

if __name__ == "__main__":
    asyncio.run(main())

This results in the following error:

File "/testing.py", line 14, in main
    project = await client.v1_get_project(
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/corellium_api/api_client.py", line 214, in __call_api
    return_data = self.deserialize(response_data, response_type)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/corellium_api/api_client.py", line 286, in deserialize
    return self.__deserialize(data, response_type)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/corellium_api/api_client.py", line 325, in __deserialize
    return self.__deserialize_model(data, klass)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/corellium_api/api_client.py", line 695, in __deserialize_model
    instance = klass(**kwargs)
               ^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/corellium_api/models/project.py", line 67, in __init__
    self.id = id
    ^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/corellium_api/models/project.py", line 97, in id
    raise ValueError("Invalid value for `id`, must not be `None`")  # noqa: E501
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: Invalid value for `id`, must not be `None`

When I use the previous client here, it works without issues.

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

No branches or pull requests

1 participant