TristanBrotherton/netcheck

Speedtest not working even though installed

kymberlys opened this issue · 2 comments

I already had speedtest-cli installed and it was working, but I was getting an error message saying it's not installed, and it was also not able to download it for some reason. At first this was because I didn't have wget installed on my Mac, but after installing wget I was still getting a download error. It just looped around telling me that speedtest-cli is a directory:

[29/06/20 5:13:34] netcheck on  master
➜ ./netcheck.sh
-----------------------------------------------------------------------------
SpeedTest-CLI:     Not Installed


Installing this library will allow tests of network connection speed.
https://github.com/sivel/speedtest-cli
Installation is a single python file, saved in this directory.

Install in this directory now? (y/n)
y

Installing https://github.com/sivel/speedtest-cli ...
speedtest-cli: Is a directory

SpeedTest-CLI:     Not Installed


Installing this library will allow tests of network connection speed.
https://github.com/sivel/speedtest-cli
Installation is a single python file, saved in this directory.

Install in this directory now? (y/n)
y

Installing https://github.com/sivel/speedtest-cli ...
speedtest-cli: Is a directory

SpeedTest-CLI:     Not Installed


Installing this library will allow tests of network connection speed.
https://github.com/sivel/speedtest-cli
Installation is a single python file, saved in this directory.

Install in this directory now? (y/n)
^C

I did manage to fix this by copying speedtest.py from the speedtest-cli directory over and then running netcheck.sh again. It still said at first that it wasn't installed, but this time after prompting me to download it, the file was recognized and it seems to have worked:

[29/06/20 5:20:50] netcheck on  master [?]
➜ cp ../speedtest-cli/speedtest.py ~/netcheck/speedtest.py
[29/06/20 5:21:25] netcheck on  master [?]
➜ ./netcheck.sh
-----------------------------------------------------------------------------
SpeedTest-CLI:     Not Installed


Installing this library will allow tests of network connection speed.
https://github.com/sivel/speedtest-cli
Installation is a single python file, saved in this directory.

Install in this directory now? (y/n)
y

Installing https://github.com/sivel/speedtest-cli ...

SpeedTest-CLI:     Installed
Logging to:        connection.log
************ Monitoring started at: Mon Jun 29 17:21:34 EDT 2020 ************

It looks like it's okay now but I thought you might like to know about it.

Hello there, firstly thank you for the comprehensive issue report! I think I have identified the cause of the problem, it can occur when netcheck is executed from a path outside of its directory. ie not like ./netcheck.sh but like ./var/folder/netcheck/netcheck.sh - I’m working on a fix for it.

Should be fixed in the last release