wilddom / memrise2anki-extension

An extension for Anki 2 that downloads and converts a course from Memrise into an Anki deck.
ISC License
159 stars 22 forks source link

fix incomplete reads #30

Closed wilddom closed 8 years ago

wilddom commented 8 years ago

Reported here: https://anki.tenderapp.com/discussions/add-ons/6411-memrise-importer-doesnt-work https://anki.tenderapp.com/discussions/add-ons/4802-httplibincompleteread-incompleteread-error-in-memrise2anki

This course allegedly should cause the exception: http://www.memrise.com/course/794205/unternehmensfuhrung-bwl-iv-modul-31102/

According to some sources this seems to be a bug in handling chunked responses either in the server or in python's httplib.

Though, not quite sure how to handle such exceptions.

Sources: http://bobrochel.blogspot.co.nz/2010/11/bad-servers-chunked-encoding-and.html http://stackoverflow.com/questions/14442222/how-to-handle-incompleteread-in-python http://stackoverflow.com/questions/14149100/incompleteread-using-httplib

wilddom commented 8 years ago

Maybe sending a HTTP 1.0 request could help: http://stackoverflow.com/questions/13656757/how-to-send-http-1-0-request-via-urllib2