stem.descriptor.remote not handling 'HTTP/1.0 404 Not found' gracefully
running (commit 4BE6695A)
torsocks download_descriptor.py -t server -f 7FE6E24BF6058EA55717C18D34FCD049307D8D2C --orport 171.25.193.9:80
one receives
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/stem/descriptor/remote.py", line 560, in _download_descriptors
Downloading server descriptor from 171.25.193.9:80...
self.content, self.reply_headers = _download_from_orport(endpoint, self.compression, self.resource)
File "/usr/local/lib/python3.7/site-packages/stem/descriptor/remote.py", line 973, in _download_from_orport
raise stem.ProtocolError("Response should begin with HTTP success, but was '%s'" % str_tools._to_unicode(first_line))
stem.ProtocolError: Response should begin with HTTP success, but was 'HTTP/1.0 404 Not found'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/stem/descriptor/remote.py", line 560, in _download_descriptors
self.content, self.reply_headers = _download_from_orport(endpoint, self.compression, self.resource)
File "/usr/local/lib/python3.7/site-packages/stem/descriptor/remote.py", line 973, in _download_from_orport
raise stem.ProtocolError("Response should begin with HTTP success, but was '%s'" % str_tools._to_unicode(first_line))
stem.ProtocolError: Response should begin with HTTP success, but was 'HTTP/1.0 404 Not found'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/tor/Downloads/../download_descriptor.py", line 137, in <module>
main()
File "/home/tor/Downloads/../download_descriptor.py", line 116, in main
compression = [stem.descriptor.remote.Compression.GZIP]
File "/usr/local/lib/python3.7/site-packages/stem/descriptor/remote.py", line 484, in run
return list(self._run(suppress))
File "/usr/local/lib/python3.7/site-packages/stem/descriptor/remote.py", line 495, in _run
raise self.error
File "/usr/local/lib/python3.7/site-packages/stem/descriptor/remote.py", line 560, in _download_descriptors
self.content, self.reply_headers = _download_from_orport(endpoint, self.compression, self.resource)
File "/usr/local/lib/python3.7/site-packages/stem/descriptor/remote.py", line 973, in _download_from_orport
raise stem.ProtocolError("Response should begin with HTTP success, but was '%s'" % str_tools._to_unicode(first_line))
stem.ProtocolError: Response should begin with HTTP success, but was 'HTTP/1.0 404 Not found'
could be better