Doesn't work with Python 3.5.3 from Debian Stretch
safinaskar opened this issue · 4 comments
I use Debian Stretch, its Python 3 version is 3.5.3. I get this error message:
$ cd ~/opt/tor-browser_en-US && python3 ./tor-relay-scanner-0.0.7.pyz -g 1 --timeout 3 --browser --start-browser
Traceback (most recent call last):
File "/usr/lib/python3.5/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "/usr/lib/python3.5/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "./tor-relay-scanner-0.0.7.pyz/__main__.py", line 2, in <module>
File "<frozen importlib._bootstrap>", line 969, in _find_and_load
File "<frozen importlib._bootstrap>", line 954, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 896, in _find_spec
File "<frozen importlib._bootstrap_external>", line 1147, in find_spec
File "<frozen importlib._bootstrap_external>", line 1123, in _get_spec
File "<frozen importlib._bootstrap_external>", line 1104, in _legacy_get_spec
File "<frozen importlib._bootstrap>", line 444, in spec_from_loader
File "<frozen importlib._bootstrap_external>", line 541, in spec_from_file_location
File "./tor-relay-scanner-0.0.7.pyz/tor_relay_scanner/scanner.py", line 137
print(f"Tor Relay Scanner. Will scan up to {WORKING_RELAY_NUM_GOAL}" +
^
SyntaxError: invalid syntax
So it seems Python 3.5.3 is not supported. So I cannot use this tool on my computer
/!\ Debian LTS support for Debian 9 "Stretch" ended on June 30, 2022
I'll check if it's easy to adapt the utility for older Python versions, but it that requires conflicting code modifications, I won't do that.
Use *.pyz file from https://github.com/ValdikSS/tor-relay-scanner/actions/runs/2797666236
This code is not going to be merged to the main branch.
This doesn't work. This time I get this error message:
$ cd ~/opt/tor-browser_en-US && python3 ~/opt/tor-browser_en-US/tor-relay-scanner-bca6c6d.pyz -g 1 --timeout 3 --browser --start-browser
/home/user/opt/tor-browser_en-US/tor-relay-scanner-bca6c6d.pyz/requests/__init__.py:114: RequestsDependencyWarning: urllib3 (1.26.11) or chardet (2.3.0)/charset_normalizer (2.0.12) doesn't match a supported version!
Traceback (most recent call last):
File "/usr/lib/python3.5/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "/usr/lib/python3.5/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/home/user/opt/tor-browser_en-US/tor-relay-scanner-bca6c6d.pyz/__main__.py", line 2, in <module>
File "<frozen importlib._bootstrap>", line 969, in _find_and_load
File "<frozen importlib._bootstrap>", line 958, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 664, in _load_unlocked
File "<frozen importlib._bootstrap>", line 634, in _load_backward_compatible
File "/home/user/opt/tor-browser_en-US/tor-relay-scanner-bca6c6d.pyz/tor_relay_scanner/scanner.py", line 10, in <module>
File "<frozen importlib._bootstrap>", line 969, in _find_and_load
File "<frozen importlib._bootstrap>", line 958, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 664, in _load_unlocked
File "<frozen importlib._bootstrap>", line 634, in _load_backward_compatible
File "/home/user/opt/tor-browser_en-US/tor-relay-scanner-bca6c6d.pyz/requests/__init__.py", line 147, in <module>
File "<frozen importlib._bootstrap>", line 969, in _find_and_load
File "<frozen importlib._bootstrap>", line 954, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 896, in _find_spec
File "<frozen importlib._bootstrap_external>", line 1147, in find_spec
File "<frozen importlib._bootstrap_external>", line 1123, in _get_spec
File "<frozen importlib._bootstrap_external>", line 1104, in _legacy_get_spec
File "<frozen importlib._bootstrap>", line 444, in spec_from_loader
File "<frozen importlib._bootstrap_external>", line 541, in spec_from_file_location
File "/home/user/opt/tor-browser_en-US/tor-relay-scanner-bca6c6d.pyz/requests/packages.py", line 20
if mod == package or mod.startswith(f"{package}."):
^
SyntaxError: invalid syntax
But don't spend your time for fixing this for me only. I was able to run tor browser in virtual machine, so everything is okey for me now
It seem to not work due to requests module incompatibility. You can do any of these:
- git checkout python35 branch and install
python3-requests
from the repository - compile or download newer Python version
- Use docker/lxd/systemd-nspawn/chroot container with newer OS to run the script
- Use a VM