---------------------------------------------------------------------------
timeout Traceback (most recent call last)
~/.local/share/virtualenvs/algos-book-zMo2shYq/lib/python3.6/site-packages/urllib3/connectionpool.py in _make_request(self, conn, method, url, timeout, chunked, **httplib_request_kw)
420 # Otherwise it looks like a bug in the code.
--> 421 six.raise_from(e, None)
422 except (SocketTimeout, BaseSSLError, SocketError) as e:
~/.local/share/virtualenvs/algos-book-zMo2shYq/lib/python3.6/site-packages/urllib3/packages/six.py in raise_from(value, from_value)
~/.local/share/virtualenvs/algos-book-zMo2shYq/lib/python3.6/site-packages/urllib3/connectionpool.py in _make_request(self, conn, method, url, timeout, chunked, **httplib_request_kw)
415 try:
--> 416 httplib_response = conn.getresponse()
417 except BaseException as e:
~/.pyenv/versions/3.6.8/lib/python3.6/http/client.py in getresponse(self)
1330 try:
-> 1331 response.begin()
1332 except ConnectionError:
~/.pyenv/versions/3.6.8/lib/python3.6/http/client.py in begin(self)
296 while True:
--> 297 version, status, reason = self._read_status()
298 if status != CONTINUE:
~/.pyenv/versions/3.6.8/lib/python3.6/http/client.py in _read_status(self)
257 def _read_status(self):
--> 258 line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
259 if len(line) > _MAXLINE:
~/.pyenv/versions/3.6.8/lib/python3.6/socket.py in readinto(self, b)
585 try:
--> 586 return self._sock.recv_into(b)
587 except timeout:
timeout: timed out
During handling of the above exception, another exception occurred:
ReadTimeoutError Traceback (most recent call last)
~/.local/share/virtualenvs/algos-book-zMo2shYq/lib/python3.6/site-packages/requests/adapters.py in send(self, request, stream, timeout, verify, cert, proxies)
448 retries=self.max_retries,
--> 449 timeout=timeout
450 )
~/.local/share/virtualenvs/algos-book-zMo2shYq/lib/python3.6/site-packages/urllib3/connectionpool.py in urlopen(self, method, url, body, headers, retries, redirect, assert_same_host, timeout, pool_timeout, release_conn, chunked, body_pos, **response_kw)
719 retries = retries.increment(
--> 720 method, url, error=e, _pool=self, _stacktrace=sys.exc_info()[2]
721 )
~/.local/share/virtualenvs/algos-book-zMo2shYq/lib/python3.6/site-packages/urllib3/util/retry.py in increment(self, method, url, response, error, _pool, _stacktrace)
399 if read is False or not self._is_method_retryable(method):
--> 400 raise six.reraise(type(error), error, _stacktrace)
401 elif read is not None:
~/.local/share/virtualenvs/algos-book-zMo2shYq/lib/python3.6/site-packages/urllib3/packages/six.py in reraise(tp, value, tb)
734 raise value.with_traceback(tb)
--> 735 raise value
736 finally:
~/.local/share/virtualenvs/algos-book-zMo2shYq/lib/python3.6/site-packages/urllib3/connectionpool.py in urlopen(self, method, url, body, headers, retries, redirect, assert_same_host, timeout, pool_timeout, release_conn, chunked, body_pos, **response_kw)
671 headers=headers,
--> 672 chunked=chunked,
673 )
~/.local/share/virtualenvs/algos-book-zMo2shYq/lib/python3.6/site-packages/urllib3/connectionpool.py in _make_request(self, conn, method, url, timeout, chunked, **httplib_request_kw)
422 except (SocketTimeout, BaseSSLError, SocketError) as e:
--> 423 self._raise_timeout(err=e, url=url, timeout_value=read_timeout)
424 raise
~/.local/share/virtualenvs/algos-book-zMo2shYq/lib/python3.6/site-packages/urllib3/connectionpool.py in _raise_timeout(self, err, url, timeout_value)
330 raise ReadTimeoutError(
--> 331 self, url, "Read timed out. (read timeout=%s)" % timeout_value
332 )
ReadTimeoutError: HTTPConnectionPool(host='localhost', port=8983): Read timed out. (read timeout=60)
During handling of the above exception, another exception occurred:
ReadTimeout Traceback (most recent call last)
~/.local/share/virtualenvs/algos-book-zMo2shYq/lib/python3.6/site-packages/pysolr.py in _send_request(self, method, path, body, headers, files)
384 resp = requests_method(url, data=bytes_body, headers=headers, files=files,
--> 385 timeout=self.timeout, auth=self.auth)
386 except requests.exceptions.Timeout as err:
~/.local/share/virtualenvs/algos-book-zMo2shYq/lib/python3.6/site-packages/requests/sessions.py in post(self, url, data, json, **kwargs)
580
--> 581 return self.request('POST', url, data=data, json=json, **kwargs)
582
~/.local/share/virtualenvs/algos-book-zMo2shYq/lib/python3.6/site-packages/requests/sessions.py in request(self, method, url, params, data, headers, cookies, files, auth, timeout, allow_redirects, proxies, hooks, stream, verify, cert, json)
532 send_kwargs.update(settings)
--> 533 resp = self.send(prep, **send_kwargs)
534
~/.local/share/virtualenvs/algos-book-zMo2shYq/lib/python3.6/site-packages/requests/sessions.py in send(self, request, **kwargs)
645 # Send the request
--> 646 r = adapter.send(request, **kwargs)
647
~/.local/share/virtualenvs/algos-book-zMo2shYq/lib/python3.6/site-packages/requests/adapters.py in send(self, request, stream, timeout, verify, cert, proxies)
528 elif isinstance(e, ReadTimeoutError):
--> 529 raise ReadTimeout(e, request=request)
530 else:
ReadTimeout: HTTPConnectionPool(host='localhost', port=8983): Read timed out. (read timeout=60)
During handling of the above exception, another exception occurred:
SolrError Traceback (most recent call last)
<ipython-input-12-5fb60887ce6d> in <module>
4 model_df = model_df.head(20)
5 for index, row in tqdm.tqdm_notebook(model_df.iterrows(), total=model_df.shape[0]):
----> 6 result = find_matches(row)
7 results.append(result)
8 df = pd.concat(results)
<ipython-input-7-dd03a394198e> in find_matches(target)
28
29 # Delete the model legislation that we're done
---> 30 solr.delete(q='bill_id:0')
31
32 return pd.DataFrame({
~/.local/share/virtualenvs/algos-book-zMo2shYq/lib/python3.6/site-packages/pysolr.py in delete(self, id, q, commit, softCommit, waitFlush, waitSearcher, handler)
958 m = '<delete><query>%s</query></delete>' % q
959
--> 960 return self._update(m, commit=commit, softCommit=softCommit, waitFlush=waitFlush, waitSearcher=waitSearcher, handler=handler)
961
962 def commit(self, softCommit=False, waitFlush=None, waitSearcher=None, expungeDeletes=None, handler='update'):
~/.local/share/virtualenvs/algos-book-zMo2shYq/lib/python3.6/site-packages/pysolr.py in _update(self, message, clean_ctrl_chars, commit, softCommit, waitFlush, waitSearcher, overwrite, handler)
498 message = sanitize(message)
499
--> 500 return self._send_request('post', path, message, {'Content-type': 'text/xml; charset=utf-8'})
501
502 def _extract_error(self, resp):
~/.local/share/virtualenvs/algos-book-zMo2shYq/lib/python3.6/site-packages/pysolr.py in _send_request(self, method, path, body, headers, files)
387 error_message = "Connection to server '%s' timed out: %s"
388 self.log.error(error_message, url, err, exc_info=True)
--> 389 raise SolrError(error_message % (url, err))
390 except requests.exceptions.ConnectionError as err:
391 error_message = "Failed to connect to server at '%s', are you sure that URL is correct? Checking it in a browser might help: %s"
SolrError: Connection to server 'http://localhost:8983/solr/legislation/update/?commit=true' timed out: HTTPConnectionPool(host='localhost', port=8983): Read timed out. (read timeout=60)