Skip to content

Value Error Parsing Logging Timestamp #1788

@waprin

Description

@waprin

logging.Client.list_entries(), where client is is raising:

  File "/Users/waprin/.virtualenvs/docsamples10/src/gcloud/gcloud/_helpers.py", line 344, in _rfc3339_nanos_to_datetime
    dt_str, _RFC3339_NANOS.pattern))
ValueError: Timestamp: u'2016-04-11T18:00:01.000Z', does not match pattern: '\n    (?P<no_fraction>\n        \\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}  # YYYY-MM-DDTHH:MM:SS\n    )\n    \\.                                       # decimal point\n    (?P<nanos>\\d{9})                         # nanoseconds\n    Z    

What's weird is that I ran this snippet a few times last week and repeatedly got this error. Yesterday I arn it and it worked. Today it's coming back. I'm not sure if it has something to do with certain times not fitting the regex ,or certain entries having a different format.

I am willing to look into this and submit a PR myself.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions