[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-bugs] #30106 [Core Tor/Stem]: Unable to download server descriptors in stem 1.7
#30106: Unable to download server descriptors in stem 1.7
-------------------------------+-------------------------------
Reporter: cypherpunks | Owner: atagar
Type: defect | Status: new
Priority: High | Component: Core Tor/Stem
Version: sbws: unspecified | Severity: Major
Keywords: descriptor | 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 stem_break.py
import stem.descriptor.remote
downloader = stem.descriptor.remote.DescriptorDownloader(
use_mirrors=True,
timeout=30,
)
desc = list(downloader.get_server_descriptors())
print(f'Got {len(desc)} tor descriptors')
}}}
{{{
/tmp/stemtest$ python -m pip install
"stem<1.7"
Collecting stem<1.7
Installing collected packages: stem
Successfully installed stem-1.6.0
/tmp/stemtest$ python stem_break.py
Got 7387 tor descriptors
}}}
But using stem 1.7 this fails
{{{
/tmp/stemtest$ python stem_break.py
Traceback (most recent call last):
File "stem_break.py", line 6, in <module>
desc = list(downloader.get_server_descriptors())
File "/home/newp/.pyenv/versions/stemtest/lib/python3.7/site-
packages/stem/descriptor/remote.py", 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/remote.py", line 811, in query
return Query(resource, **args)
File "/home/newp/.pyenv/versions/stemtest/lib/python3.7/site-
packages/stem/descriptor/remote.py", 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/__init__.py", 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.
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/30106>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs