Opened 5 months ago

Closed 4 months ago

#30106 closed defect (duplicate)

Unable to download server descriptors in stem 1.7

Reported by: cypherpunks Owned by: atagar
Priority: High Milestone:
Component: Core Tor/Stem Version:
Severity: Major Keywords: descriptor
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:


Using the following code to get tor server descriptors works with stem 1.6, but fails with stem 1.7.

/tmp/stemtest$ cat 
import stem.descriptor.remote
downloader = stem.descriptor.remote.DescriptorDownloader(
desc = list(downloader.get_server_descriptors())
print(f'Got {len(desc)} tor descriptors')
/tmp/stemtest$ python -m pip install
Collecting stem<1.7                                                                                                                                                                                                
Installing collected packages: stem
Successfully installed stem-1.6.0
/tmp/stemtest$ python
Got 7387 tor descriptors

But using stem 1.7 this fails

/tmp/stemtest$ python 
Traceback (most recent call last):
  File "", line 6, in <module>
    desc = list(downloader.get_server_descriptors())
  File "/home/newp/.pyenv/versions/stemtest/lib/python3.7/site-packages/stem/descriptor/", line 630, in get_server_descriptors
    return self.query(resource, **query_args)
  File "/home/newp/.pyenv/versions/stemtest/lib/python3.7/site-packages/stem/descriptor/", line 811, in query
    return Query(resource, **args)
  File "/home/newp/.pyenv/versions/stemtest/lib/python3.7/site-packages/stem/descriptor/", line 375, in __init__
    self.endpoints.append(stem.DirPort(endpoint[0], endpoint[1]))  # TODO: remove this in stem 2.0
  File "/home/newp/.pyenv/versions/stemtest/lib/python3.7/site-packages/stem/", line 571, in __init__
    raise ValueError("'%s' isn't a valid port" % port)
ValueError: 'None' isn't a valid port

There do not appear to be references to get_server_descriptors function changing in the 1.7 changelog. The environment is python 3.7.1 x64 using ubuntu 18.04.

Child Tickets

Change History (2)

comment:1 Changed 5 months ago by teor

Version: sbws: unspecified

comment:2 Changed 4 months ago by atagar

Resolution: duplicate
Status: newclosed

Hi cypherpunks, sorry about the delay. This is already fixed in the git repo...

Note: See TracTickets for help on using tickets.