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

Raising FDSNTooManyRequestsException in error handling typo #3219

Closed
fabgiamp opened this issue Nov 16, 2022 · 1 comment · Fixed by #3221
Closed

Raising FDSNTooManyRequestsException in error handling typo #3219

fabgiamp opened this issue Nov 16, 2022 · 1 comment · Fixed by #3221
Labels
Milestone

Comments

@fabgiamp
Copy link

Hello,
according to this code, present also in the current version (1.3.1):

msg = ("Sent too many requests in a given amount of time ('rate "
"limiting'). Wait before making a new request.", server_info)
raise FDSNTooManyRequestsException(msg, server_info)

the first argument of the mentioned exception appears to be a tuple. This causes a TypeError when effectively too many requests are done and the FDSNTooManyRequestsException raises:

TypeError: sequence item 0: expected str instance, tuple found

It seems to be a small typo since the other exceptions have simple strings as first argument.

@megies
Copy link
Member

megies commented Nov 16, 2022

It seems to be a small typo since the other exceptions have simple strings as first argument.

yep seems like a copy-paste problem. Thanks!

@megies megies added bug confirmed bug .clients.fdsn labels Nov 16, 2022
@megies megies added this to the 1.4.0 milestone Nov 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants