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

list_servers_types throws exception #550

Closed
FrPellissier opened this issue Jun 11, 2024 · 1 comment · Fixed by #595
Closed

list_servers_types throws exception #550

FrPellissier opened this issue Jun 11, 2024 · 1 comment · Fixed by #595
Assignees

Comments

@FrPellissier
Copy link

In Python SDK v2.3.1, I have an error when calling
list_servers_types(zone='fr-par-2', per_page=10)

The error is:

ListServersTypesResponse.init() missing 1 required positional argument: 'total_count'

Using Python 3.12

@Laure-di Laure-di self-assigned this Jun 12, 2024
@havetc
Copy link

havetc commented Jun 15, 2024

I got the same issue with list_servers_all() and list_servers(), also on python 3.12.
It seems to happen when I have no server running. The api function unmarshal_ListServersResponse
receives {'servers': []}
Either scaleway should also return a total_count=0 in that case, or field = data.get("total_count", None) in unmarshal_ListServersResponse could be changed to field = data.get("total_count", 0) to have a default count at 0 if no value is provided

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

Successfully merging a pull request may close this issue.

3 participants