Skip to content

Unexpected keyword argument 'total' prevents events from being sent #143

Description

@mrdon

Occasionally, I see this in the logs:

Unhandled exception in event processor. Analytics events were not processed. [init() got an unexpected keyword argument 'total']

It doesn't happen all the time, and I think I traced it down to how retries are handled. This library uses a _EventRetry subclass of urllib3.Retry, however, Retry will try to recreate itself via the "new" function, passing in all the arguments it received. Unfortunately, _EventRetry doesn't support any of those arguments, specifically 'total', and I think this is causing the error.

The fix would be to, at a minimum, add **kwargs to the constructor, or better yet, pass those same arguments down.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions