Opened 5 years ago

Closed 5 years ago

#3540 closed defect (not a bug)

Fetch question

Reported by: Greg Couch Owned by: Eric Pettersen
Priority: normal Milestone:
Component: Input/Output Version:
Keywords: Cc:
Blocked By: Blocking:
Notify when closed: Platform: all
Project: ChimeraX

Description

The following bug report has been submitted:
Platform:        Windows-10-10.0.18362
ChimeraX Version: 1.1.dev202007210154 (2020-07-21 01:54:46 UTC)
Description
Was testing negative caching of URLs that time out, but my new code in chimerax.core.fetch.fetch_file was not called.  What's the status of chimerax.core.fetch? There is a lot of duplication between it and core_formats.web_fetch.  And core.fetch.fetch_file is used in many places.

Log:
UCSF ChimeraX version: 1.1.dev202007210154 (2020-07-21)  
© 2016-2020 Regents of the University of California. All rights reserved.  
How to cite UCSF ChimeraX  

> open http://ahs.jacobsonlab.org/file.pdb

Failed command: open http://ahs.jacobsonlab.org/file.pdb  
Traceback (most recent call last):  
File
"A:\cygwin64\home\gregc\src\chimerax\ChimeraX.app\bin\lib\urllib\request.py",
line 1319, in do_open  
encode_chunked=req.has_header('Transfer-encoding'))  
File
"A:\cygwin64\home\gregc\src\chimerax\ChimeraX.app\bin\lib\http\client.py",
line 1252, in request  
self._send_request(method, url, body, headers, encode_chunked)  
File
"A:\cygwin64\home\gregc\src\chimerax\ChimeraX.app\bin\lib\http\client.py",
line 1298, in _send_request  
self.endheaders(body, encode_chunked=encode_chunked)  
File
"A:\cygwin64\home\gregc\src\chimerax\ChimeraX.app\bin\lib\http\client.py",
line 1247, in endheaders  
self._send_output(message_body, encode_chunked=encode_chunked)  
File
"A:\cygwin64\home\gregc\src\chimerax\ChimeraX.app\bin\lib\http\client.py",
line 1026, in _send_output  
self.send(msg)  
File
"A:\cygwin64\home\gregc\src\chimerax\ChimeraX.app\bin\lib\http\client.py",
line 966, in send  
self.connect()  
File
"A:\cygwin64\home\gregc\src\chimerax\ChimeraX.app\bin\lib\http\client.py",
line 938, in connect  
(self.host,self.port), self.timeout, self.source_address)  
File "A:\cygwin64\home\gregc\src\chimerax\ChimeraX.app\bin\lib\socket.py",
line 728, in create_connection  
raise err  
File "A:\cygwin64\home\gregc\src\chimerax\ChimeraX.app\bin\lib\socket.py",
line 716, in create_connection  
sock.connect(sa)  
TimeoutError: [WinError 10060] A connection attempt failed because the
connected party did not properly respond after a period of time, or
established connection failed because connected host has failed to respond  
  
During handling of the above exception, another exception occurred:  
  
Traceback (most recent call last):  
File "A:\cygwin64\home\gregc\src\chimerax\ChimeraX.app\bin\lib\site-
packages\chimerax\cmd_line\tool.py", line 263, in execute  
cmd.run(cmd_text)  
File "A:\cygwin64\home\gregc\src\chimerax\ChimeraX.app\bin\lib\site-
packages\chimerax\core\commands\cli.py", line 2805, in run  
result = ci.function(session, **kw_args)  
File "A:\cygwin64\home\gregc\src\chimerax\ChimeraX.app\bin\lib\site-
packages\chimerax\open_command\cmd.py", line 95, in cmd_open  
return Command(session, registry=registry).run(provider_cmd_text, log=log)  
File "A:\cygwin64\home\gregc\src\chimerax\ChimeraX.app\bin\lib\site-
packages\chimerax\core\commands\cli.py", line 2805, in run  
result = ci.function(session, **kw_args)  
File "A:\cygwin64\home\gregc\src\chimerax\ChimeraX.app\bin\lib\site-
packages\chimerax\open_command\cmd.py", line 123, in provider_open  
(session, ident, format_name, ignore_cache), provider_kw)  
File "A:\cygwin64\home\gregc\src\chimerax\ChimeraX.app\bin\lib\site-
packages\chimerax\open_command\cmd.py", line 384, in collated_open  
return func(*func_args, **func_kw)  
File "A:\cygwin64\home\gregc\src\chimerax\ChimeraX.app\bin\lib\site-
packages\chimerax\core_formats\\__init__.py", line 63, in fetch  
ignore_cache=ignore_cache, **kw)  
File "A:\cygwin64\home\gregc\src\chimerax\ChimeraX.app\bin\lib\site-
packages\chimerax\core_formats\web_fetch.py", line 48, in fetch_web  
uncompress=uncompress)  
File "A:\cygwin64\home\gregc\src\chimerax\ChimeraX.app\bin\lib\site-
packages\chimerax\core_formats\web_fetch.py", line 127, in retrieve_url  
with urlopen(request, timeout=timeout, context=ssl_context) as response:  
File
"A:\cygwin64\home\gregc\src\chimerax\ChimeraX.app\bin\lib\urllib\request.py",
line 222, in urlopen  
return opener.open(url, data, timeout)  
File
"A:\cygwin64\home\gregc\src\chimerax\ChimeraX.app\bin\lib\urllib\request.py",
line 525, in open  
response = self._open(req, data)  
File
"A:\cygwin64\home\gregc\src\chimerax\ChimeraX.app\bin\lib\urllib\request.py",
line 543, in _open  
'_open', req)  
File
"A:\cygwin64\home\gregc\src\chimerax\ChimeraX.app\bin\lib\urllib\request.py",
line 503, in _call_chain  
result = func(*args)  
File
"A:\cygwin64\home\gregc\src\chimerax\ChimeraX.app\bin\lib\urllib\request.py",
line 1347, in http_open  
return self.do_open(http.client.HTTPConnection, req)  
File
"A:\cygwin64\home\gregc\src\chimerax\ChimeraX.app\bin\lib\urllib\request.py",
line 1321, in do_open  
raise URLError(err)  
urllib.error.URLError: <urlopen error [WinError 10060] A connection attempt
failed because the connected party did not properly respond after a period of
time, or established connection failed because connected host has failed to
respond>  
  
urllib.error.URLError:  
  
File
"A:\cygwin64\home\gregc\src\chimerax\ChimeraX.app\bin\lib\urllib\request.py",
line 1321, in do_open  
raise URLError(err)  
  
See log for complete Python traceback.  
  




OpenGL version: 3.3.0 NVIDIA 451.48
OpenGL renderer: GeForce GTX 970/PCIe/SSE2
OpenGL vendor: NVIDIA Corporation
Manufacturer: MSI
Model: MS-7885
OS: Microsoft Windows 10 Home (Build 18363)
Memory: 34,258,157,568
MaxProcessMemory: 137,438,953,344
CPU: 12 Intel(R) Core(TM) i7-5820K CPU @ 3.30GHz"
PyQt version: 5.12.3
Compiled Qt version: 5.12.4
Runtime Qt version: 5.12.9

Change History (2)

comment:1 by Eric Pettersen, 5 years ago

Component: UnassignedInput/Output
Owner: set to Eric Pettersen
Platform: all
Project: ChimeraX
Status: newaccepted
Summary: ChimeraX bug report submissionFetch question

comment:2 by Eric Pettersen, 5 years ago

Resolution: not a bug
Status: acceptedclosed

fetch_file is for fetching data files that ChimeraX caches. web_fetch is for fetching HTML and other URLs that ChimeraX does not (explicitly) cache itself.

Note: See TracTickets for help on using tickets.