Pull requests

#2 Merged
Repository
jamesob_ jamesob_
Branch
default
Repository
Ludia Ludia
Branch
default

Only conditionally log stats data (to empty list errors)

Author
  1. James O'Beirne
Reviewers
Description

Our unittest suite is around 450 separate tests. It seems that about 80% of the way into the running the suite, ddbmock starts to throw strange errors that look like this:

DynamoDBResponseError: DynamoDBResponseError: 500 InternalServerError
{'message': "ValueError: ('min() arg is an empty sequence',)", '__type': 'com.amazonaws.dynamodb.v20111205#InternalFailure'}

I eventually found that the cause of this was in the utils.Stat object, which was attempting to log one of its attributes (initialized to an empty list), which resulted in taking the min, max, and average of an empty sequence.

I've added a simple check to prevent this.

Comments (6)

  1. Michael Hart

    Has this made it into the latest release (1.0.1)? I keep getting similar errors (after the server has been running for a few minutes and then attempting to call PutItem)

    2013-03-26 09:21:10,877 ERROR [Request logger][Dummy-3] request_id=42 action=PutItem exception=ValueError body=('min() arg is an empty sequence',)
    2013-03-26 09:21:10,935 ERROR [Request logger][Dummy-4] request_id=43 action=PutItem exception=ValueError body=('min() arg is an empty sequence',)
    2013-03-26 09:21:11,041 ERROR [Request logger][Dummy-2] request_id=44 action=PutItem exception=ValueError body=('min() arg is an empty sequence',)
    

    Is this a different issue?

  2. Michael Hart

    It appears to be the same issue. Is a new release on its way at all? Also, I can't find the v1.0.1 tag either, so I'm kind of unclear where this source is at - is it up to date?

  3. Éric Araujo

    This bug is not closed, so it looks like the patch is not in yet.

    I see version 1.0.1 on PyPI but not in the repo tags, which is weird. I’ll check with the admin of the Ludia account but we have a busy week and then he’ll be away for a few weeks.