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

Account: Input should be a valid string #32

Open
scott-fehrman-sp opened this issue Oct 18, 2024 · 0 comments
Open

Account: Input should be a valid string #32

scott-fehrman-sp opened this issue Oct 18, 2024 · 0 comments

Comments

@scott-fehrman-sp
Copy link

Ran into an issue with the Accounts API. If I list accounts with a search value it works fine. When I request "all" via Paginator I get an error, see below.

Paginating call, offset = 0
Paginating call, offset = 250
Paginating call, offset = 500
Paginating call, offset = 750
Paginating call, offset = 1000
Paginating call, offset = 1250
Paginating call, offset = 1500
Paginating call, offset = 1750
Paginating call, offset = 2000
Paginating call, offset = 2250
Paginating call, offset = 2500
Paginating call, offset = 2750
Paginating call, offset = 3000
Paginating call, offset = 3250
Paginating call, offset = 3500
Paginating call, offset = 3750
Paginating call, offset = 4000
Paginating call, offset = 4250
Paginating call, offset = 4500
... Exception: 1 validation error for Account
sourceName
  Input should be a valid string [type=string_type, input_value=None, input_type=NoneType]
    For further information visit https://errors.pydantic.dev/2.9/v/string_type

Here are the two different uses for list_accounts ...

if search:
    ...
    records = instance.list_accounts(filters=filters, sorters=sorters)
else:
    records = Paginator.paginate(instance.list_accounts, 10000)
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