Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • Trac Trac
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Issues 246
    • Issues 246
    • List
    • Boards
    • Service Desk
    • Milestones
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value stream
  • Wiki
    • Wiki
  • Activity
  • Create a new issue
  • Issue Boards
Collapse sidebar
  • Legacy
  • TracTrac
  • Issues
  • #30262

Closed
Open
Created Apr 23, 2019 by starlight@starlight

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

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking