Skip to content

Intermittent "ConnectionError: ('Connection aborted.', BadStatusLine(""''''"))" on .refresh() #6

@tony

Description

@tony

This started Late August / Early September of 2018.

This happens maybe 20% of the time.

I recently added from __future__ import unicode_literals in the code.

See also: psf/requests#2364

Python 2.7.15

pip show cloudconvert
Name: cloudconvert
Version: 1.0.0
pip show requests
Name: requests
Version: 2.11.1
[2018-09-04 17:49:16,857] INFO in handin: Convertible handin found for https://work-test.s3-eu-west-1.amazonaws.com/987872540624879.docx that isn't converted yet. Initiating conversion.
Captured exception in MockSentry: (('HTTP request failed error', ConnectionError(ProtocolError('Connection aborted.', BadStatusLine("''",)),)))
Traceback (most recent call last):
  File "/path/application/handin/views/handin.py", line 49, in handin_convert
    convert_handin_file(handin)
  File "/path/application/doc_conversion/convert.py", line 208, in convert_handin_file
    process = poll_cloudconvert.delay(handin, process)
  File "/path/.venv/local/lib/python2.7/site-packages/rq/decorators.py", line 64, in delay
    meta=self.meta, description=self.description)
  File "/path/.venv/local/lib/python2.7/site-packages/rq/queue.py", line 252, in enqueue_call
    job = self.enqueue_job(job, at_front=at_front)
  File "/path/.venv/local/lib/python2.7/site-packages/rq/queue.py", line 328, in enqueue_job
    job = self.run_job(job)
  File "/path/.venv/local/lib/python2.7/site-packages/rq/queue.py", line 257, in run_job
    job.perform()
  File "/path/.venv/local/lib/python2.7/site-packages/rq/job.py", line 573, in perform
    self._result = self._execute()
  File "/path/.venv/local/lib/python2.7/site-packages/rq/job.py", line 579, in _execute
    return self.func(*self.args, **self.kwargs)
  File "/path/application/doc_conversion/jobs.py", line 95, in poll_cloudconvert
    process.refresh()
  File "/path/.venv/local/lib/python2.7/site-packages/cloudconvert/process.py", line 38, in refresh
    self.data = self.api.get(self.url, parameters)
  File "/path/.venv/local/lib/python2.7/site-packages/cloudconvert/api.py", line 58, in get
    return self.rawCall('GET', path, None, is_authenticated)
  File "/path/.venv/local/lib/python2.7/site-packages/cloudconvert/api.py", line 145, in rawCall
    raise HTTPError("HTTP request failed error", error)
HTTPError: ('HTTP request failed error', ConnectionError(ProtocolError('Connection aborted.', BadStatusLine("''",)),))

127.0.0.1 - - [04/Sep/2018 17:49:29] "GET /api/handin/convert/5b8f0bc99f6cf00e67dd9001 HTTP/1.1" 500 -

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