Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Get_backtest() / Pyfolio not working in research

Hi, for all backtesting I have tried, I get the following error while attempting to run get_backtest() with backtest IDs that used to work seamlessly.

ChunkedEncodingError Traceback (most recent call last)
in ()
----> 1 bt1 = get_backtest('56cbcd1169c89d0dec9773b4') # 1+ 3 & 3 + 1

/build/src/qexec_repo/qexec/research/api.py in get_backtest(backtest_id) 260 return BacktestResult(client.get_sqlbacktest(backtest_id),
261 progress_bar,
--> 262 backtest_id)
263
264

/build/src/qexec_repo/qexec/research/results.py in init(self, result_iterator, progress_bar, algo_id) 441 saw_a_perf_packet = False
442 progress_bar.start()
--> 443 for msg in result_iterator:
444 prefix, payload = msg['prefix'], msg['payload']
445

/build/src/qexec_repo/qexec/research/web/client.pyc in get_sqlbacktest(self, backtest_id) 353 resp = self._make_get_sqlbacktest_request(backtest_id)
354 with closing(resp):
--> 355 for msg in resp.iter_lines():
356 yield loads(msg)
357

/usr/local/lib/python2.7/dist-packages/requests/models.pyc in iter_lines(self, chunk_size, decode_unicode, delimiter) 700 pending = None
701
--> 702 for chunk in self.iter_content(chunk_size=chunk_size, decode_unicode=decode_unicode):
703
704 if pending is not None:

/usr/local/lib/python2.7/dist-packages/requests/models.pyc in generate() 661 yield chunk
662 except ProtocolError as e:
--> 663 raise ChunkedEncodingError(e)
664 except DecodeError as e:
665 raise ContentDecodingError(e)

ChunkedEncodingError: ('Connection broken: IncompleteRead(0 bytes read)', IncompleteRead(0 bytes read))

3 responses

+1
I'm getting those errors too.

Every time, @ random completion %.

# Get backtest object  
bt = get_backtest('56d52c10d6adb80f19520d14')  

# Create all tear sheets  
bt.create_full_tear_sheet()  
 27% ETA:  0:04:40|###############                                            |  
---------------------------------------------------------------------------  
ChunkedEncodingError                      Traceback (most recent call last)  
<ipython-input-16-884fd7af7fb0> in <module>()  
      1 # Get backtest object  
----> 2 bt = get_backtest('56d52c10d6adb80f19520d14')  

Yep, it has been broken for a few weeks now. Specialty for a longer test periods. The request in the back-end server times out !