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 1891213 - speedtest-cli does not run successfully after installation.
Summary: speedtest-cli does not run successfully after installation.
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: speedtest-cli
Version: 33
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
Assignee: Matías Kreder
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 1875396 1883534 1895221 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-10-24 12:45 UTC by Heðin
Modified: 2021-04-26 13:10 UTC (History)
14 users (show)

Fixed In Version: speedtest-cli-2.1.2-1.fc33
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-12-06 03:04:16 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
dnf list installed python* (18.02 KB, text/plain)
2020-10-24 12:45 UTC, Heðin
no flags Details

Description Heðin 2020-10-24 12:45:02 UTC
Created attachment 1723913 [details]
dnf list installed python*

Description of problem:
sudo dnf install speedtest-cli -y && speedtest-cli == crash of speedtest-cli

Version-Release number of selected component (if applicable):
Installed Packages
Name         : speedtest-cli
Version      : 2.1.1
Release      : 6.fc33
Architecture : noarch
Size         : 90 k
Source       : speedtest-cli-2.1.1-6.fc33.src.rpm
Repository   : @System
From repo    : fedora
Summary      : Command line interface for testing internet bandwidth
URL          : https://github.com/sivel/speedtest-cli
License      : ASL 2.0
Description  : Command line interface for testing internet bandwidth using speedtest.net


How reproducible:
every time.

Steps to Reproduce:
1. $ sudo dnf install speedtest-cli
2. $ speedtest-cli

Actual results:
$ speedtest-cli 
Retrieving speedtest.net configuration...
Testing from Vodafone (REDACTED IP)...
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


Expected results:
speedtest-cli would test my internet connection speed.

Additional info:
$ cat /etc/fedora-release 
Fedora release 33 (Thirty Three)
$ uname -r
5.8.15-301.fc33.x86_64
$ python --version
Python 3.9.0

Comment 1 Kamal Marhubi 2020-10-26 22:42:18 UTC
Commenting on this one since it seems most focused and useful.

tl;dr: Upgrading from 2.1.1 -> 2.1.2 should fix this.

The initial error appears to be a result of upgrading to 3.9:
> Deprecated since version 3.2, will be removed in version 3.9: Use method Element.iter() instead.

https://docs.python.org/3.8/library/xml.etree.elementtree.html#xml.etree.ElementTree.Element.getiterator

The further errors are a result of an imprecise fallback to another XML API.

It looks like this was fixed in a commit that made it into v2.1.2:
https://github.com/sivel/speedtest-cli/commit/81bba6070c9069f8770212f119232d0622ddb111

Indeed, testing with that version downloaded from github works just fine:

    $ wget --quiet https://raw.githubusercontent.com/sivel/speedtest-cli/v2.1.2/speedtest.py
    $ chmod +x speedtest.py
    $ ./speedtest.py --list | head -3
    Retrieving speedtest.net configuration...
      911) Fibrenoire Internet (Montreal, QC, Canada) [2.46 km]
    16754) Bell Mobility (Montreal, QC, Canada) [2.46 km]

Comment 2 Michael Cronenworth 2020-11-14 19:19:47 UTC
*** Bug 1875396 has been marked as a duplicate of this bug. ***

Comment 3 Michael Cronenworth 2020-11-14 19:20:05 UTC
*** Bug 1883534 has been marked as a duplicate of this bug. ***

Comment 4 Michael Cronenworth 2020-11-14 19:20:21 UTC
*** Bug 1895221 has been marked as a duplicate of this bug. ***

Comment 5 Michael Cronenworth 2020-11-14 19:22:37 UTC
@Matías, could you push a 2.1.2 update? I could also do it if you need help.

Comment 6 Fedora Update System 2020-11-24 06:20:44 UTC
FEDORA-2020-2fa0fafc0f has been submitted as an update to Fedora 33. https://bodhi.fedoraproject.org/updates/FEDORA-2020-2fa0fafc0f

Comment 7 Fedora Update System 2020-11-25 02:11:47 UTC
FEDORA-2020-2fa0fafc0f has been pushed to the Fedora 33 testing repository.
In short time you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2020-2fa0fafc0f`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-2fa0fafc0f

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 8 deadgnom32 2020-12-05 12:44:17 UTC
Similar problem has been detected:

install speedtest-cli
run speedtest-cli

I think it has something to do with newer python versions, than those it has been written for.

reporter:       libreport-2.14.0
cmdline:        /usr/bin/python3 /usr/bin/speedtest-cli
crash_function: get_servers
exception_type: AttributeError
executable:     /usr/bin/speedtest-cli
interpreter:    python3-3.9.0-1.fc33.x86_64
kernel:         5.9.11-200.fc33.x86_64
package:        speedtest-cli-2.1.1-6.fc33
reason:         speedtest.py:1268:get_servers:NameError: name 'ExpatError' is not defined
runlevel:       N 5
type:           Python3
uid:            1000

Comment 9 Fedora Update System 2020-12-06 03:04:16 UTC
FEDORA-2020-2fa0fafc0f has been pushed to the Fedora 33 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 10 Henrique Doiche 2021-04-18 22:35:41 UTC
It looks like as a duplicated bug: https://bugzilla.redhat.com/show_bug.cgi?id=1948086
Fedora 33 
package speedtest-cli-2.1.2-1.fc33.noarch.


Retrieving speedtest.net configuration...
Traceback (most recent call last):
  File "/usr/bin/speedtest-cli", line 33, in <module>
    sys.exit(load_entry_point('speedtest-cli==2.1.2', 'console_scripts', 'speedtest-cli')())
  File "/usr/lib/python3.9/site-packages/speedtest.py", line 1985, in main
    shell()
  File "/usr/lib/python3.9/site-packages/speedtest.py", line 1871, in shell
    speedtest = Speedtest(
  File "/usr/lib/python3.9/site-packages/speedtest.py", line 1090, in __init__
    self.get_config()
  File "/usr/lib/python3.9/site-packages/speedtest.py", line 1172, in get_config
    ignore_servers = list(
ValueError: invalid literal for int() with base 10: ''



Why is the bug reference locked?


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