-
Notifications
You must be signed in to change notification settings - Fork 174
Description
I attempted to perform a dali search with both runDali() and searchDali() function. Previous version of ProDy was fine until the recent undated 2.6.1 There is a connection error (see the traceback below) when the dali search request waits for a response. The current version also has a note on this (see bottom) to be addressed.
ConnectionError Traceback (most recent call last)
Cell In[3], line 1
----> 1 dali_rec = searchDali('2src','A')
3 while not dali_rec.isSuccess:
4 dali_rec.fetch()
File /opt/anaconda3/envs/prody/lib/python3.12/site-packages/ProDy-2.4.1-py3.12-macosx-10.15-x86_64.egg/prody/database/dali.py:116, in searchDali(pdb, chain, subset, daliURL, **kwargs)
113 parameters = { 'cd1' : pdb_chain, 'method': 'search', 'title': dali_title, 'address': '' }
114 # enc_params = urllib.urlencode(parameters).encode('utf-8')
115 # request = urllib2.Request(daliURL, enc_params)
--> 116 request = requests.post(daliURL, parameters, files=files)
117 try_error = 3
118 while try_error >= 0:
File /opt/anaconda3/envs/prody/lib/python3.12/site-packages/requests/api.py:115, in post(url, data, json, **kwargs)
103 def post(url, data=None, json=None, **kwargs):
104 r"""Sends a POST request.
105
106 :param url: URL for the new :class:Request object.
(...)
112 :rtype: requests.Response
113 """
--> 115 return request("post", url, data=data, json=json, **kwargs)
File /opt/anaconda3/envs/prody/lib/python3.12/site-packages/requests/api.py:59, in request(method, url, **kwargs)
55 # By using the 'with' statement we are sure the session is closed, thus we
56 # avoid leaving sockets open which can trigger a ResourceWarning in some
57 # cases, and look like a memory leak in others.
58 with sessions.Session() as session:
---> 59 return session.request(method=method, url=url, **kwargs)
File /opt/anaconda3/envs/prody/lib/python3.12/site-packages/requests/sessions.py:589, in Session.request(self, method, url, params, data, headers, cookies, files, auth, timeout, allow_redirects, proxies, hooks, stream, verify, cert, json)
584 send_kwargs = {
585 "timeout": timeout,
586 "allow_redirects": allow_redirects,
587 }
588 send_kwargs.update(settings)
--> 589 resp = self.send(prep, **send_kwargs)
591 return resp
File /opt/anaconda3/envs/prody/lib/python3.12/site-packages/requests/sessions.py:703, in Session.send(self, request, **kwargs)
700 start = preferred_clock()
702 # Send the request
--> 703 r = adapter.send(request, **kwargs)
705 # Total elapsed time of the request (approximately)
706 elapsed = preferred_clock() - start
File /opt/anaconda3/envs/prody/lib/python3.12/site-packages/requests/adapters.py:682, in HTTPAdapter.send(self, request, stream, timeout, verify, cert, proxies)
667 resp = conn.urlopen(
668 method=request.method,
669 url=url,
(...)
678 chunked=chunked,
679 )
681 except (ProtocolError, OSError) as err:
--> 682 raise ConnectionError(err, request=request)
684 except MaxRetryError as e:
685 if isinstance(e.reason, ConnectTimeoutError):
686 # TODO: Remove this in 3.0.0: see #2811
ConnectionError: ('Connection aborted.', ConnectionResetError(54, 'Connection reset by peer'))