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

libearth.codecs throws AttributeError #32

summerlight opened this issue Dec 25, 2013 · 0 comments

libearth.codecs throws AttributeError #32

summerlight opened this issue Dec 25, 2013 · 0 comments


Copy link

@summerlight summerlight commented Dec 25, 2013

Concurrent, multiple threads that handle rss responses may raise AttritubeError. Below is the stack trace.

Traceback (most recent call last):
  File "C:\Python27\lib\site-packages\flask\", line 1836, in __call__
    return self.wsgi_app(environ, start_response)
  File "C:\Python27\lib\site-packages\earthreader\web\", line 59, in __ca
    return, start_response)
  File "C:\Python27\lib\site-packages\flask\", line 1820, in wsgi_app
    response = self.make_response(self.handle_exception(e))
  File "C:\Python27\lib\site-packages\flask\", line 1403, in handle_except
    reraise(exc_type, exc_value, tb)
  File "C:\Python27\lib\site-packages\flask\", line 1817, in wsgi_app
    response = self.full_dispatch_request()
  File "C:\Python27\lib\site-packages\flask\", line 1477, in full_dispatch
    rv = self.handle_user_exception(e)
  File "C:\Python27\lib\site-packages\flask\", line 1381, in handle_user_e
    reraise(exc_type, exc_value, tb)
  File "C:\Python27\lib\site-packages\flask\", line 1475, in full_dispatch
    rv = self.dispatch_request()
  File "C:\Python27\lib\site-packages\flask\", line 1461, in dispatch_requ
    return self.view_functions[rule.endpoint](**req.view_args)
  File "C:\Python27\lib\site-packages\earthreader\web\", line 249, in feed
    cursor = Cursor(category_id)
  File "C:\Python27\lib\site-packages\earthreader\web\", line 133, in __in
    self.subscriptionlist = (stage.subscriptions if stage.subscriptions
  File "C:\Python27\lib\site-packages\libearth\", line 610, in __get__
    return obj.read_merged_document(self.document_type, self.key_spec, key)
  File "C:\Python27\lib\site-packages\libearth\", line 273, in read_merg
    doc =, k)
  File "C:\Python27\lib\site-packages\libearth\", line 250, in read
    document = read(document_type, chunks)
  File "C:\Python27\lib\site-packages\libearth\", line 1667, in read
    if not doc._parse_next():
  File "C:\Python27\lib\site-packages\libearth\", line 1010, in _parse_
  File "C:\Python27\lib\xml\sax\", line 207, in feed
    self._parser.Parse(data, isFinal)
  File "C:\Python27\lib\xml\sax\", line 338, in start_element_ns
    AttributesNSImpl(newattrs, qnames))
  File "C:\Python27\lib\site-packages\libearth\", line 1385, in startEl
  File "C:\Python27\lib\site-packages\libearth\", line 659, in decode
    text = decoder.function(text)
  File "C:\Python27\lib\site-packages\libearth\", line 230, in decode
    res = datetime.datetime.strptime(timestamp, '%d %b %Y %H:%M:%S')
AttributeError: _strptime

Below link suggests that python implementation on windows has thread-safety bug on strptime initialization. I guess that those issues can also be related to this bug.

@dahlia dahlia closed this Dec 25, 2013
dahlia added a commit that referenced this issue Dec 25, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.