Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1875396 - traceback when trying to run speedtest-cli
Summary: traceback when trying to run speedtest-cli
Keywords:
Status: CLOSED DUPLICATE of bug 1891213
Alias: None
Product: Fedora
Classification: Fedora
Component: speedtest-cli
Version: 33
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Matías Kreder
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-09-03 13:32 UTC by Dennis Gilmore
Modified: 2020-11-21 15:04 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-11-14 19:19:48 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Dennis Gilmore 2020-09-03 13:32:03 UTC
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:

Comment 1 Lokesh Mandvekar 2020-09-12 17:56:08 UTC
See this now on f33 as well.

Comment 2 Simon Putt 2020-10-08 10:05:02 UTC
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

Comment 3 Marc Ponschab 2020-10-23 14:04:47 UTC
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)

Comment 4 Christian Kujau 2020-11-01 16:52:46 UTC
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)]

Comment 5 Michael Cronenworth 2020-11-14 19:19:48 UTC
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 ***


Note You need to log in before you can comment on or make changes to this bug.