Description of problem: When running speedtest-cli I get the following errors speedtest-cli --list Retrieving speedtest.net configuration... Traceback (most recent call last): File "/usr/lib/python3.9/site-packages/speedtest.py", line 1264, in get_servers elements = root.getiterator('server') AttributeError: 'xml.etree.ElementTree.Element' object has no attribute 'getiterator' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/lib/python3.9/site-packages/speedtest.py", line 1267, in get_servers root = DOM.parseString(serversxml) NameError: name 'DOM' is not defined During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/bin/speedtest-cli", line 33, in <module> sys.exit(load_entry_point('speedtest-cli==2.1.1', 'console_scripts', 'speedtest-cli')()) File "/usr/lib/python3.9/site-packages/speedtest.py", line 1929, in main shell() File "/usr/lib/python3.9/site-packages/speedtest.py", line 1826, in shell speedtest.get_servers() File "/usr/lib/python3.9/site-packages/speedtest.py", line 1268, in get_servers except ExpatError: NameError: name 'ExpatError' is not defined Version-Release number of selected component (if applicable): speedtest-cli-2.1.1-6.fc33.noarch How reproducible: Steps to Reproduce: 1. 2. 3. Actual results: Expected results: Additional info:
See this now on f33 as well.
Seeing the same thing here too on Fedora 33 Beta Retrieving speedtest.net configuration... Testing from Virgin Media (xxx.xxx.xxx.xxx)... Retrieving speedtest.net server list... Traceback (most recent call last): File "/usr/lib/python3.9/site-packages/speedtest.py", line 1264, in get_servers elements = root.getiterator('server') AttributeError: 'xml.etree.ElementTree.Element' object has no attribute 'getiterator' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/lib/python3.9/site-packages/speedtest.py", line 1267, in get_servers root = DOM.parseString(serversxml) NameError: name 'DOM' is not defined During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/bin/speedtest-cli", line 33, in <module> sys.exit(load_entry_point('speedtest-cli==2.1.1', 'console_scripts', 'speedtest-cli')()) File "/usr/lib/python3.9/site-packages/speedtest.py", line 1929, in main shell() File "/usr/lib/python3.9/site-packages/speedtest.py", line 1849, in shell speedtest.get_servers(servers=args.server, exclude=args.exclude) File "/usr/lib/python3.9/site-packages/speedtest.py", line 1268, in get_servers except ExpatError: NameError: name 'ExpatError' is not defined
On the homepage of speedtest-cli (https://github.com/sivel/speedtest-cli) is indicated: speedtest-cli works with Python 2.4-3.7 Probably the error occurs because of an incompatibility with Python 3.9: $ speedtest-cli --version speedtest-cli 2.1.1 Python 3.9.0 (default, Oct 6 2020, 00:00:00) [GCC 10.2.1 20200826 (Red Hat 10.2.1-3)
speedtest-cli runs just fine with Python3 (Arch Linux ships a Python 3.8 build for a while now). Maybe it just needs a rebuild: $ lsb_release -irs Fedora 33 $ pip install --user git+https://github.com/sivel/speedtest-cli.git Collecting git+https://github.com/sivel/speedtest-cli.git Cloning https://github.com/sivel/speedtest-cli.git to /run/user/1000/pip-req-build-f1yykpu_ Using legacy 'setup.py install' for speedtest-cli, since package 'wheel' is not installed. Installing collected packages: speedtest-cli Running setup.py install for speedtest-cli ... done Successfully installed speedtest-cli-2.1.2 $ .local/bin/speedtest --version speedtest-cli 2.1.2 Python 3.9.0 (default, Oct 6 2020, 00:00:00) [GCC 10.2.1 20200826 (Red Hat 10.2.1-3)]
Closing dupes. The new, parent bug has a fix. Upgrading to 2.1.2. *** This bug has been marked as a duplicate of bug 1891213 ***