Speedtest not working after upgrade to 2.5.0
-
Hi,
of course its not the most important thing but the speedtest-cli seems not to work anymore since update pfsense from 2.4.5-p1 to 2.5.0.
On the CLI this is the output:
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/pkg_resources/init.py", line 583, in _build_master
ws.require(requires)
File "/usr/local/lib/python3.7/site-packages/pkg_resources/init.py", line 900, in require
needed = self.resolve(parse_requirements(requirements))
File "/usr/local/lib/python3.7/site-packages/pkg_resources/init.py", line 791, in resolve
raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.VersionConflict: (speedtest-cli 2.1.2 (/usr/local/lib/python3.7/site-packages), Requirement.parse('speedtest-cli==2.1.1'))During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/bin/speedtest", line 6, in <module>
from pkg_resources import load_entry_point
File "/usr/local/lib/python3.7/site-packages/pkg_resources/init.py", line 3251, in <module>
@_call_aside
File "/usr/local/lib/python3.7/site-packages/pkg_resources/init.py", line 3235, in _call_aside
f(*args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/pkg_resources/init.py", line 3264, in _initialize_master_working_set
working_set = WorkingSet._build_master()
File "/usr/local/lib/python3.7/site-packages/pkg_resources/init.py", line 585, in _build_master
return cls._build_from_requirements(requires)
File "/usr/local/lib/python3.7/site-packages/pkg_resources/init.py", line 598, in _build_from_requirements
dists = ws.resolve(reqs, Environment())
File "/usr/local/lib/python3.7/site-packages/pkg_resources/init.py", line 786, in resolve
raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'speedtest-cli==2.1.1' distribution was not found and is required by the applicationUninstall and reinstall the package did not help.
Any toughts?
Regards,
fireodo -
I have the speedtest widget installed, which uses the CLI, and it is running OK on 2.5 release.
https://github.com/aln-1/pfsense-speedtest-widget
-
@occamsrazor said in Speedtest not working after upgrade to 2.5.0:
I have the speedtest widget installed, which uses the CLI, and it is running OK on 2.5 release.
https://github.com/aln-1/pfsense-speedtest-widget
Can you go to the CLI and look what version of speedtest you have installed?
-
@fireodo said in Speedtest not working after upgrade to 2.5.0:
Can you go to the CLI and look what version of speedtest you have installed?
If you can tell me how to do that, sorry I don't know how to....
-
@occamsrazor said in Speedtest not working after upgrade to 2.5.0:
If you can tell me how to do that, sorry I don't know how to....
Open a ssh session with putty, choose "8" and at the CLI enter: speedtest --version
-
@fireodo said in Speedtest not working after upgrade to 2.5.0:
Open a ssh session with putty, choose "8" and at the CLI enter: speedtest --version
[2.5.0-RELEASE][root@*************]/root: speedtest --version
speedtest-cli 2.1.2
Python 3.7.9 (default, Feb 5 2021, 20:17:27) [Clang 10.0.1 (git@github.com:llvm/llvm-project.git llvmorg-10.0.1-0-gef32c611a -
@occamsrazor said in Speedtest not working after upgrade to 2.5.0:
@fireodo said in Speedtest not working after upgrade to 2.5.0:
Open a ssh session with putty, choose "8" and at the CLI enter: speedtest --version
[2.5.0-RELEASE][root@*************]/root: speedtest --version
speedtest-cli 2.1.2
Python 3.7.9 (default, Feb 5 2021, 20:17:27) [Clang 10.0.1 (git@github.com:llvm/llvm-project.git llvmorg-10.0.1-0-gef32c611aThanks - seems that in my case (i upgraded from 2.4.5_p1 to 2.5.0) there is something went wrong because the 2.1.1 version works ...
-
@fireodo said in Speedtest not working after upgrade to 2.5.0:
pkg_resources.DistributionNotFound: The 'speedtest-cli==2.1.1' distribution was not found and is required by the application
.....
Uninstall and reinstall the package did not help.2.1.1 is compiled for FreeBSD 11.3, used by pfSense 2.4.5-p1.
2.5.0 is based on FreeBSD 12.x - "python3.7" could also be different. -
Mine works fine on several upgrades to 2.5.0 and 21.02, definitely a glitch there.
Did you try
pkg install -f py37-speedtest-cli-2.1.2
-
@mfld said in Speedtest not working after upgrade to 2.5.0:
pkg install -f py37-speedtest-cli-2.1.2
I removed the 2.1.2 version completely an reinstalled - no avail. I switched to the old repository (2.4.5_1) and got the 2.1.1 - this is working like a charm on 2.5.0 - I wish I could understand what is here faulty ...
-
@fireodo
For those who stumble on this thread:I found myself the fault: there was another pair of speedtest and speedtest-cli (executables) left (after program removal) in the "/usr/bin" from the previous speedtest installation (2.1.1) that where conflicting with the speedtest / speedtest-cli (2.1.2) from the "/usr/local/bin".
Now everything is as it should be. Sorry for embarrassing you!
fireodo
-
Yeah, that's one of the side effect when you install manually FreeBSD packages that use another 'file foot print' as the pfSense-FreeBSD packages, present in the pfSense package repository.
As soon as you install stuff manually with "pkg install ..." I advise you to takes Notes.
That is : install the pfSense Notes package.
And enter all the details, like the package file name, version, FreeBSD version, etc.
Add also settings, if you created them.
The Notes will get saved with your config.Inspecting the package (they are archive files that can be inspected) show you what files are copied where.
-
It would be nice if they could include the speedtest CLI + widget packages in the package directory....
-
@occamsrazor said in Speedtest not working after upgrade to 2.5.0:
speedtest CLI
It is in the pfSense repository.
Remember : the pfSense repository is not the FreeBSD repository.But " pfSense repository" doesn't automatically mean it's in the pfSense package manager, as these are packages that are (re)written express so they can use the pfSense GUI.
edit : understand also that Netgate/pfSense isn't going to 'advertise' all these packages, as installing them manually can have all kind of side effects, which has nothing to do with the core pfSense functionalities.
-
@gertjan said in Speedtest not working after upgrade to 2.5.0:
@occamsrazor said in Speedtest not working after upgrade to 2.5.0:
speedtest CLI
It is in the pfSense repository.
Remember : the pfSense repository is not the FreeBSD repository.But " pfSense repository" doesn't automatically mean it's in the pfSense package manager, as these are packages that are (re)written express so they can use the pfSense GUI.
edit : understand also that Netgate/pfSense isn't going to 'advertise' all these packages, as installing them manually can have all kind of side effects, which has nothing to do with the core pfSense functionalities.
I guess what occamsrazor mean is that the "speedtest"-package should contain the afferent widget included in one single package ...
-
Hi, I've got problem with speedtest after upgrade too, unfortunately it is not connected to conflicting versions as I've checked to only have 2.1.2 version installed. It seems python do not have ssl module available and for some reason speedtest triies to use https version even without using --secure switch.
Here is a stack trace
Retrieving speedtest.net configuration...
Traceback (most recent call last):
File "/usr/local/bin/speedtest", line 11, in <module>
load_entry_point('speedtest-cli==2.1.2', 'console_scripts', 'speedtest')()
File "/usr/local/lib/python3.7/site-packages/speedtest.py", line 1986, in main
shell()
File "/usr/local/lib/python3.7/site-packages/speedtest.py", line 1875, in shell
secure=args.secure
File "/usr/local/lib/python3.7/site-packages/speedtest.py", line 1091, in init
self.get_config()
File "/usr/local/lib/python3.7/site-packages/speedtest.py", line 1121, in get_config
uh, e = catch_request(request, opener=self._opener)
File "/usr/local/lib/python3.7/site-packages/speedtest.py", line 730, in catch_request
uh = _open(request)
File "/usr/local/lib/python3.7/urllib/request.py", line 531, in open
response = meth(req, response)
File "/usr/local/lib/python3.7/urllib/request.py", line 641, in http_response
'http', request, response, code, msg, hdrs)
File "/usr/local/lib/python3.7/urllib/request.py", line 563, in error
result = self._call_chain(*args)
File "/usr/local/lib/python3.7/urllib/request.py", line 503, in _call_chain
result = func(*args)
File "/usr/local/lib/python3.7/urllib/request.py", line 755, in http_error_302
return self.parent.open(new, timeout=req.timeout)
File "/usr/local/lib/python3.7/urllib/request.py", line 525, in open
response = self._open(req, data)
File "/usr/local/lib/python3.7/urllib/request.py", line 543, in _open
'_open', req)
File "/usr/local/lib/python3.7/urllib/request.py", line 503, in _call_chain
result = func(*args)
File "/usr/local/lib/python3.7/site-packages/speedtest.py", line 563, in https_open
SpeedtestHTTPSConnection,
NameError: name 'SpeedtestHTTPSConnection' is not defined -
@gertjan said in Speedtest not working after upgrade to 2.5.0:
It is in the pfSense repository.
Thanks. I wasn't aware of that.
Remember : the pfSense repository is not the FreeBSD repository.
But " pfSense repository" doesn't automatically mean it's in the pfSense package manager, as these are packages that are (re)written express so they can use the pfSense GUI.Well as the speedtest-cli has a widget that can be installed into the pfSense GUI... seems like it would make sense to add it to the packages list in the Package Manager,
-
Speedtest 2.1.2 Broken
Speedtest 2.1.2 broke yesterday and stopped working, producing the error message:
ValueError: invalid literal for int() with base 10: ''.
An updated version 2.1.3 has been posted by the author, but has not yet been picked up into the package repositories.
Since a package update doesn't work, this manual update method worked for me in the interim:
# CONFIRM VERSION : speedtest --version speedtest-cli 2.1.2 Python 3.7.9 (default, Feb 5 2021, 20:17:58) [Clang 10.0.1 (git@github.com:llvm/llvm-project.git llvmorg-10.0.1-0-gef32c611a # CHANGE TO PYTHON PACKAGE DIRECTORY : cd /usr/local/lib/python3.7/site-packages # MANUALLY DOWNLOAD NEWEST .PY FILE : curl -Lo speedtest.py https://raw.githubusercontent.com/sivel/speedtest-cli/master/speedtest.py # CONFIRM VERSION : speedtest --version speedtest-cli 2.1.3 Python 3.7.9 (default, Feb 5 2021, 20:17:58) [Clang 10.0.1 (git@github.com:llvm/llvm-project.git llvmorg-10.0.1-0-gef32c611a
-
@kevinrice thank you for posting this. I could not get 3 of my boxes speedtest working until I found your post here. My speedtest bricked on all three moving over to 2.5.X. All is working as it should now. You are awesome!!!
-
WOW !!!
Thanks 1000 thanks
Upgrading to 2.1.3 as per your instructions worked perfectly.
THANKS. THANKS. THANKS. THANKS.