NCC10281982B Posted February 1, 2016 Posted February 1, 2016 For fun I am trying to implement the python speed test discussed here: http://forums.overclockersclub.com/topic/203885-irate-comcast-subscriber-turns-raspberry-pi-into-a-watchdog-for-slow-internet-speeds/?p=2151728On my ubuntu box. I think I have all the modules (that was fun) i need. jeff@jeff-HP-xw8600-Workstation:~$ ./speed_test running test /usr/bin/python: can't find '__main__' module in '/home/jeff/speedtest-cli' ran Traceback (most recent call last): File "./speed_test", line 67, in <module> test() File "./speed_test", line 28, in test d = lines[1][10:14] IndexError: list index out of range Share this post Link to post Share on other sites More sharing options...
Onion Posted February 1, 2016 Posted February 1, 2016 (edited) Looks like something is bugging with the download lines its pulling from. Just for fun, try removing that line and see if the upload works? Edited February 1, 2016 by Onion Share this post Link to post Share on other sites More sharing options...
NCC10281982B Posted February 2, 2016 Posted February 2, 2016 Will do. Share this post Link to post Share on other sites More sharing options...
NCC10281982B Posted February 2, 2016 Posted February 2, 2016 jeff@jeff-HP-xw8600-Workstation:~$ ./speed_test running test /usr/bin/python: can't find '__main__' module in '/home/jeff/speedtest-cli/' ran Traceback (most recent call last): File "./speed_test", line 67, in <module> test() File "./speed_test", line 28, in test d = lines[1][10:14] IndexError: list index out of range I think this has to do with can't find main... wherever main is supposed to be,,, Share this post Link to post Share on other sites More sharing options...
Onion Posted February 2, 2016 Posted February 2, 2016 Take a look at this, maybe it'll help. http://stackoverflow.com/questions/14330411/sublime-text2-python-error-message-usr-bin-python-cant-find-main-module Share this post Link to post Share on other sites More sharing options...
CheeseMan42 Posted February 2, 2016 Posted February 2, 2016 Did you install the additional speedtest-cli utility? If you paste the code I could probably be more help. I know it is posted on the pastebin site but there are some edits that you would have to make in there to get it to work on your machine I believe. Share this post Link to post Share on other sites More sharing options...
NCC10281982B Posted February 4, 2016 Posted February 4, 2016 That problemm went away after I visited the link I posted in the last post in the Comcast thread. Now the problem is getting the script to write the logfile to the Public dir. Blasted permissions. Share this post Link to post Share on other sites More sharing options...
Onion Posted February 4, 2016 Posted February 4, 2016 Just give it 755. Share this post Link to post Share on other sites More sharing options...
NCC10281982B Posted February 4, 2016 Posted February 4, 2016 I did 777 too. I just put it in the root crontab. Lazy I know. Share this post Link to post Share on other sites More sharing options...
steelchizzle Posted August 19, 2017 Posted August 19, 2017 (edited) I did this before in Linux Mint. 1. Download a copy of the python script speediest-cli . Or copy and paste the code into a file and rename it. 2.On Ubuntu or Linux you have to make it a executable to run so open a terminal window and type 'sudo chmod a+x filename'. Now if you type 'ls' to list what is in the directory you should see that the file name has changed color in my case green, Now its executable. 3. Run the file ' sudo python ./Filename. Thats it I think !!. The 'a+x' I got off the internet some where it might not be the best practice but it works perfectly. Now you can schedule this to run when ever you want with crontab if you wish and pipe the results out to a file to have a look at later. I hope this helps. I have not been approved yet so I only get one post a day so I cant reply. If you come across a way to change the servers for the speed test please let me know it could be useful Thanks ! Also I had a problem with 777 also and I found that above and it worked like a charm. Edited August 19, 2017 by steelchizzle Share this post Link to post Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now