<SOLVED> speedtest-cli (ValueError: invalid literal for int() with base 10: '')

Questions about applications and software
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
jimmy-r87
Level 1
Level 1
Posts: 9
Joined: Sun Apr 11, 2021 7:08 pm

<SOLVED> speedtest-cli (ValueError: invalid literal for int() with base 10: '')

Post by jimmy-r87 »

I installed speedtest-cli and it gives me an error every time I try to run it. I have no idea what this means and was wondering if anyone knows the solution to this problem?

the error displayed:

Code: Select all

james@james-yoga:~$ speedtest
Retrieving speedtest.net configuration...
Traceback (most recent call last):
  File "/usr/bin/speedtest", line 11, in <module>
    load_entry_point('speedtest-cli==2.1.2', 'console_scripts', 'speedtest')()
  File "/usr/lib/python3/dist-packages/speedtest.py", line 1986, in main
    shell()
  File "/usr/lib/python3/dist-packages/speedtest.py", line 1872, in shell
    speedtest = Speedtest(
  File "/usr/lib/python3/dist-packages/speedtest.py", line 1091, in __init__
    self.get_config()
  File "/usr/lib/python3/dist-packages/speedtest.py", line 1173, in get_config
    ignore_servers = list(
ValueError: invalid literal for int() with base 10: ''
Error in sys.excepthook:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 153, in apport_excepthook
    with os.fdopen(os.open(pr_filename,
FileNotFoundError: [Errno 2] No such file or directory: '/var/crash/_usr_bin_speedtest.1000.crash'

Original exception was:
Traceback (most recent call last):
  File "/usr/bin/speedtest", line 11, in <module>
    load_entry_point('speedtest-cli==2.1.2', 'console_scripts', 'speedtest')()
  File "/usr/lib/python3/dist-packages/speedtest.py", line 1986, in main
    shell()
  File "/usr/lib/python3/dist-packages/speedtest.py", line 1872, in shell
    speedtest = Speedtest(
  File "/usr/lib/python3/dist-packages/speedtest.py", line 1091, in __init__
    self.get_config()
  File "/usr/lib/python3/dist-packages/speedtest.py", line 1173, in get_config
    ignore_servers = list(
ValueError: invalid literal for int() with base 10: ''


System information:

Code: Select all

System:    Kernel: 5.4.0-72-generic x86_64 bits: 64 compiler: gcc v: 9.3.0 Desktop: Cinnamon 4.8.6 
           wm: muffin dm: LightDM Distro: Linux Mint 20.1 Ulyssa base: Ubuntu 20.04 focal 
Machine:   Type: Convertible System: LENOVO product: 81CT v: Lenovo YOGA 730-13IKB 
           serial: <filter> Chassis: type: 31 v: Lenovo YOGA 730-13IKB serial: <filter> 
           Mobo: LENOVO model: LNVNB161216 v: SDK0J40709 WIN serial: <filter> UEFI: LENOVO 
           v: 7LCN32WW(V1.13) date: 12/29/2020 
Battery:   ID-1: BAT1 charge: 36.1 Wh condition: 38.9/48.1 Wh (81%) volts: 8.1/7.7 
           model: 0x43 0x50 0x54 0x2D 0x43 0x4F 0x PABAS0241231 serial: <filter> 
           status: Discharging 
CPU:       Topology: Quad Core model: Intel Core i5-8250U bits: 64 type: MT MCP arch: Kaby Lake 
           rev: A L2 cache: 6144 KiB 
           flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx bogomips: 28800 
           Speed: 3400 MHz min/max: 400/3400 MHz Core speeds (MHz): 1: 3400 2: 3400 3: 3400 
           4: 3400 5: 3400 6: 3400 7: 3400 8: 3400 
Graphics:  Device-1: Intel UHD Graphics 620 vendor: Lenovo driver: i915 v: kernel bus ID: 00:02.0 
           chip ID: 8086:5917 
           Display: x11 server: X.Org 1.20.9 driver: modesetting unloaded: fbdev,vesa 
           resolution: 1920x1080~60Hz 
           OpenGL: renderer: Mesa Intel UHD Graphics 620 (KBL GT2) v: 4.6 Mesa 20.2.6 
           direct render: Yes 
Audio:     Device-1: Intel Sunrise Point-LP HD Audio vendor: Lenovo driver: snd_hda_intel 
           v: kernel bus ID: 00:1f.3 chip ID: 8086:9d71 
           Sound Server: ALSA v: k5.4.0-72-generic 
Network:   Device-1: Intel Wireless 8265 / 8275 driver: iwlwifi v: kernel port: 3040 
           bus ID: 6c:00.0 chip ID: 8086:24fd 
           IF: wlp108s0 state: up mac: <filter> 
Drives:    Local Storage: total: 238.47 GiB used: 15.27 GiB (6.4%) 
           ID-1: /dev/nvme0n1 vendor: SK Hynix model: HFS256GD9TNG-62A0A size: 238.47 GiB 
           speed: 31.6 Gb/s lanes: 4 serial: <filter> 
Partition: ID-1: / size: 119.33 GiB used: 15.24 GiB (12.8%) fs: ext4 dev: /dev/nvme0n1p6 
USB:       Hub: 1-0:1 info: Full speed (or root) Hub ports: 12 rev: 2.0 chip ID: 1d6b:0002 
           Device-1: 1-5:2 info: Syntek Integrated Camera type: Video driver: uvcvideo rev: 2.0 
           chip ID: 174f:2426 
           Device-2: 1-6:3 info: Synaptics type: <vendor specific> driver: N/A rev: 2.0 
           chip ID: 06cb:0081 
           Device-3: 1-7:4 info: Intel type: Bluetooth driver: btusb rev: 2.0 chip ID: 8087:0a2b 
           Hub: 2-0:1 info: Full speed (or root) Hub ports: 6 rev: 3.0 chip ID: 1d6b:0003 
Sensors:   System Temperatures: cpu: 37.5 C mobo: N/A 
           Fan Speeds (RPM): N/A 
Repos:     No active apt repos in: /etc/apt/sources.list 
           Active apt repos in: /etc/apt/sources.list.d/official-package-repositories.list 
           1: deb http: //mirrors.evowise.com/linuxmint/packages ulyssa main upstream import backport
           2: deb http: //mirror.freethought-internet.co.uk/ubuntu focal main restricted universe multiverse
           3: deb http: //mirror.freethought-internet.co.uk/ubuntu focal-updates main restricted universe multiverse
           4: deb http: //mirror.freethought-internet.co.uk/ubuntu focal-backports main restricted universe multiverse
           5: deb http: //security.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse
           6: deb http: //archive.canonical.com/ubuntu/ focal partner
           Active apt repos in: /etc/apt/sources.list.d/spotify.list 
           1: deb http: //repository.spotify.com stable non-free
           Active apt repos in: /etc/apt/sources.list.d/sublime-text.list 
           1: deb https: //download.sublimetext.com/ apt/stable/
Info:      Processes: 234 Uptime: 10m Memory: 7.50 GiB used: 1.51 GiB (20.2%) Init: systemd v: 245 
           runlevel: 5 Compilers: gcc: 9.3.0 alt: 9 Client: Unknown python3.8 client inxi: 3.0.38 
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
User avatar
spamegg
Level 14
Level 14
Posts: 5044
Joined: Mon Oct 28, 2019 2:34 am
Contact:

Re: speedtest-cli (ValueError: invalid literal for int() with base 10: '')

Post by spamegg »

Repository version of speedtest-cli is broken. Follow instructions here:
https://www.speedtest.net/apps/cli

Code: Select all

sudo apt-get install gnupg1 apt-transport-https dirmngr
export INSTALL_KEY=379CE192D401AB61
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys $INSTALL_KEY
echo "deb https://ookla.bintray.com/debian generic main" | sudo tee  /etc/apt/sources.list.d/speedtest.list
sudo apt-get update
# Other non-official binaries will conflict with Speedtest CLI
# Example how to remove using apt-get
# sudo apt-get remove speedtest-cli
sudo apt-get install speedtest
jimmy-r87
Level 1
Level 1
Posts: 9
Joined: Sun Apr 11, 2021 7:08 pm

<SOLVED> Re: speedtest-cli (ValueError: invalid literal for int() with base 10: '')

Post by jimmy-r87 »

easy fix, thanks :D
borgward
Level 6
Level 6
Posts: 1186
Joined: Mon Dec 17, 2012 10:18 pm

Re: <SOLVED> speedtest-cli (ValueError: invalid literal for int() with base 10: '')

Post by borgward »

Not working. I followed instructions at https://www.speedtest.net/apps/cli
Package speedtest is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'speedtest' has no installation candidate

Also did:
sudo apt-get install gnupg1 apt-transport-https dirmngr
export INSTALL_KEY=379CE192D401AB61
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys $INSTALL_KEY
echo "deb https://ookla.bintray.com/debian generic main" | sudo tee /etc/apt/sources.list.d/speedtest.list
sudo apt-get update
# Other non-official binaries will conflict with Speedtest CLI
# Example how to remove using apt-get
# sudo apt-get remove speedtest-cli
sudo apt-get install speedtest

Neither instructions work
User avatar
spamegg
Level 14
Level 14
Posts: 5044
Joined: Mon Oct 28, 2019 2:34 am
Contact:

Re: <SOLVED> speedtest-cli (ValueError: invalid literal for int() with base 10: '')

Post by spamegg »

borgward, show us your Terminal output when you use the commands. (The lines with the hash symbols # are just comments, they are not meant to be used.)

Please give us information about your install by entering this command in a terminal:

Code: Select all

inxi -Fxpmrz
Click </> from the mini toolbar above the textbox where you type your reply
and then place your cursor between the code markers and paste the results of the
command between the code markers like this: [code]Results[/code].
borgward
Level 6
Level 6
Posts: 1186
Joined: Mon Dec 17, 2012 10:18 pm

Re: <SOLVED> speedtest-cli (ValueError: invalid literal for int() with base 10: '')

Post by borgward »

Code: Select all

System:    Kernel: 5.4.0-72-generic x86_64 bits: 64 compiler: gcc v: 9.3.0 Desktop: Cinnamon 4.8.6 
           Distro: Linux Mint 20.1 Ulyssa base: Ubuntu 20.04 focal 
Machine:   Type: Portable System: Dell product: Inspiron 1520 v: N/A serial: <filter> 
           Mobo: Dell model: 0KY767 serial: <filter> BIOS: Dell v: A09 date: 07/11/2008 
Battery:   ID-1: BAT0 charge: 52.7 Wh condition: 52.7/73.3 Wh (72%) model: Samsung SDI DELL MT2648 status: Full 
Memory:    RAM: total: 3.83 GiB used: 2.21 GiB (57.6%) 
           RAM Report: permissions: Unable to run dmidecode. Root privileges required. 
CPU:       Topology: Dual Core model: Intel Pentium Dual T2370 bits: 64 type: MCP arch: Core Merom rev: D 
           L2 cache: 1024 KiB 
           flags: lm nx pae sse sse2 sse3 ssse3 bogomips: 6913 
           Speed: 835 MHz min/max: 800/1733 MHz Core speeds (MHz): 1: 949 2: 982 
Graphics:  Device-1: Intel Mobile GM965/GL960 Integrated Graphics vendor: Dell driver: i915 v: kernel bus ID: 00:02.0 
           Display: x11 server: X.Org 1.20.9 driver: modesetting unloaded: fbdev,vesa resolution: 1280x800~60Hz 
           OpenGL: renderer: Mesa DRI Intel 965GM (CL) v: 2.1 Mesa 20.2.6 direct render: Yes 
Audio:     Device-1: Intel 82801H HD Audio vendor: Dell driver: snd_hda_intel v: kernel bus ID: 00:1b.0 
           Sound Server: ALSA v: k5.4.0-72-generic 
Network:   Device-1: Broadcom and subsidiaries BCM4401-B0 100Base-TX vendor: Dell driver: b44 v: 2.0 port: 10c0 
           bus ID: 03:00.0 
           Device-2: Edimax EW-7811Un 802.11n Wireless Adapter [Realtek RTL8188CUS] type: USB driver: rtl8192cu 
           bus ID: 2-1:2 
           IF: wlx74da3861f3e6 state: up mac: <filter> 
           Device-3: Dell Wireless 360 Bluetooth type: USB driver: btusb bus ID: 3-2:2 
           IF-ID-1: eth0 state: down mac: <filter> 
Drives:    Local Storage: total: 698.64 GiB used: 388.01 GiB (55.5%) 
           ID-1: /dev/sda vendor: Seagate model: ST9750420AS size: 698.64 GiB 
Partition: ID-1: / size: 52.19 GiB used: 9.67 GiB (18.5%) fs: ext4 dev: /dev/sda5 
           ID-2: /home size: 631.30 GiB used: 378.33 GiB (59.9%) fs: ext4 dev: /dev/sda7 
           ID-3: swap-1 size: 3.72 GiB used: 1.0 MiB (0.0%) fs: swap dev: /dev/sda6 
Sensors:   System Temperatures: cpu: 54.0 C mobo: N/A sodimm: 56.0 C 
           Fan Speeds (RPM): cpu: 2471 
Repos:     No active apt repos in: /etc/apt/sources.list 
           Active apt repos in: /etc/apt/sources.list.d/audio-recorder-ppa-focal.list 
           1: deb http://ppa.launchpad.net/audio-recorder/ppa/ubuntu focal main
           Active apt repos in: /etc/apt/sources.list.d/official-package-repositories.list 
           1: deb http://packages.linuxmint.com ulyssa main upstream import backport
           2: deb http://archive.ubuntu.com/ubuntu focal main restricted universe multiverse
           3: deb http://archive.ubuntu.com/ubuntu focal-updates main restricted universe multiverse
           4: deb http://archive.ubuntu.com/ubuntu focal-backports main restricted universe multiverse
           5: deb http://security.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse
           6: deb http://archive.canonical.com/ubuntu/ focal partner
Info:      Processes: 192 Uptime: 10h 27m Init: systemd runlevel: 5 Compilers: gcc: 9.3.0 Shell: bash v: 5.0.17 
           inxi: 3.0.38 
borgward
Level 6
Level 6
Posts: 1186
Joined: Mon Dec 17, 2012 10:18 pm

Re: <SOLVED> speedtest-cli (ValueError: invalid literal for int() with base 10: '')

Post by borgward »

speedtest is now working on first laptop.

Followed same instructions on second laptop but getting error.

Code: Select all

$ inxi -Fxpmrz
System:    Kernel: 5.4.0-72-generic x86_64 bits: 64 compiler: gcc v: 9.3.0 Desktop: Cinnamon 4.8.6 
           Distro: Linux Mint 20.1 Ulyssa base: Ubuntu 20.04 focal 
Machine:   Type: Laptop System: Apple product: MacBook2,1 v: 1.0 serial: <filter> 
           Mobo: Apple model: Mac-F4208CAA v: PVT serial: <filter> BIOS: Apple v: MB21.88Z.00A5.B07.0706270922 date: 06/27/07 
Memory:    RAM: total: 2.89 GiB used: 1.24 GiB (42.9%) 
           RAM Report: permissions: Unable to run dmidecode. Root privileges required. 
CPU:       Topology: Dual Core model: Intel Core2 T7400 bits: 64 type: MCP arch: Core Merom rev: 6 L2 cache: 4096 KiB 
           flags: lm nx pae sse sse2 sse3 ssse3 vmx bogomips: 8644 
           Speed: 997 MHz min/max: 1000/2167 MHz Core speeds (MHz): 1: 997 2: 997 
Graphics:  Device-1: Intel Mobile 945GM/GMS 943/940GML Express Integrated Graphics driver: i915 v: kernel bus ID: 00:02.0 
           Display: x11 server: X.Org 1.20.9 driver: intel unloaded: fbdev,modesetting,vesa resolution: 1280x800~60Hz 
           OpenGL: renderer: Mesa DRI Intel 945GM v: 1.4 Mesa 20.2.6 direct render: Yes 
Audio:     Device-1: Intel NM10/ICH7 Family High Definition Audio vendor: SigmaTel STAC9221 Codec driver: snd_hda_intel 
           v: kernel bus ID: 00:1b.0 
           Sound Server: ALSA v: k5.4.0-72-generic 
Network:   Device-1: Marvell 88E8053 PCI-E Gigabit Ethernet driver: sky2 v: 1.30 port: 1000 bus ID: 01:00.0 
           IF: enp1s0 state: down mac: <filter> 
           Device-2: Qualcomm Atheros AR5418 Wireless Network Adapter [AR5008E 802.11bgn] vendor: Apple AirPort Extreme 
           driver: ath9k v: kernel port: 1000 bus ID: 02:00.0 
           IF: wls1 state: up mac: <filter> 
Drives:    Local Storage: total: 111.79 GiB used: 22.10 GiB (19.8%) 
           ID-1: /dev/sda vendor: Fujitsu model: MHY2120BH size: 111.79 GiB temp: 35 C 
Partition: ID-1: / size: 23.60 GiB used: 20.45 GiB (86.7%) fs: ext4 dev: /dev/sda1 
           ID-2: /home size: 82.84 GiB used: 1.65 GiB (2.0%) fs: ext4 dev: /dev/sda3 
           ID-3: swap-1 size: 3.38 GiB used: 780 KiB (0.0%) fs: swap dev: /dev/sda2 
Sensors:   System Temperatures: cpu: 57.0 C mobo: N/A 
           Fan Speeds (RPM): N/A 
Repos:     No active apt repos in: /etc/apt/sources.list 
           Active apt repos in: /etc/apt/sources.list.d/audio-recorder-ppa-focal.list 
           1: deb http://ppa.launchpad.net/audio-recorder/ppa/ubuntu focal main
           Active apt repos in: /etc/apt/sources.list.d/official-package-repositories.list 
           1: deb http://packages.linuxmint.com ulyssa main upstream import backport #id:linuxmint_main
           2: deb http://archive.ubuntu.com/ubuntu focal main restricted universe multiverse
           3: deb http://archive.ubuntu.com/ubuntu focal-updates main restricted universe multiverse
           4: deb http://archive.ubuntu.com/ubuntu focal-backports main restricted universe multiverse
           5: deb http://security.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse
           6: deb http://archive.canonical.com/ubuntu/ focal partner
           Active apt repos in: /etc/apt/sources.list.d/speedtest.list 
           1: deb https://ookla.bintray.com/debian generic main
Info:      Processes: 190 Uptime: 16m Init: systemd runlevel: 5 Compilers: gcc: 9.3.0 Shell: bash v: 5.0.17 inxi: 3.0.38 
The last command:

Code: Select all

 $ sudo apt-get install speedtest
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libhal1-flash linux-headers-5.4.0-66 linux-headers-5.4.0-66-generic linux-image-5.4.0-66-generic linux-modules-5.4.0-66-generic
  linux-modules-extra-5.4.0-66-generic
Use 'sudo apt autoremove' to remove them.
The following NEW packages will be installed:
  speedtest
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/930 kB of archives.
After this operation, 2,257 kB of additional disk space will be used.
(Reading database ... 370483 files and directories currently installed.)
Preparing to unpack .../speedtest_1.0.0.2-1.5ae238b_amd64.deb ...
Unpacking speedtest (1.0.0.2-1.5ae238b) ...
dpkg: error processing archive /var/cache/apt/archives/speedtest_1.0.0.2-1.5ae238b_amd64.deb (--unpack):
 trying to overwrite '/usr/bin/speedtest', which is also in package speedtest-cli 2.1.2-2
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Errors were encountered while processing:
 /var/cache/apt/archives/speedtest_1.0.0.2-1.5ae238b_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
How do I determine what the error code is?
Locked

Return to “Software & Applications”