Jump to content


Photo
- - - - -

python IndexError


  • Please log in to reply
9 replies to this topic

#1 NCC10281982B

NCC10281982B

    I am so done.

  • Moderator
  • PipPipPipPipPipPip
  • 6965 posts
  • Gender:Male
  • Location:Bellevue, WA

Posted 01 February 2016 - 12:41 PM

For fun I am trying to implement the python speed test discussed here: http://forums.overcl...eeds/?p=2151728On my ubuntu box.

I think I have all the modules (that was fun) i need.

[email protected]:~$ ./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 am DUMB, okay? Dumb as a post! Think I'm happy about it?
 
sigimage.gifCFr15LujaQwHZgiAc222zw.png

#2 Onion

Onion

    Onions are delicious

  • Members
  • PipPipPipPipPip
  • 4241 posts
  • Gender:Male
  • Location:English Colonies

Posted 01 February 2016 - 02:05 PM

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 by Onion, 01 February 2016 - 02:07 PM.

Desktop: i7 6700K @ 4.9 GHz - Asus Z170A - Gigabyte GTX 970 - 2 x 8 GB DDR4 3200 Mhz - Samsung Evo 850 500 GB - EVGA SuperNova G2 750 - Noctua NH-D14 - Fractal Core 3300
MacBook Pro Retina 13: i5 5287U @ 3.3 Ghz - Intel Iris 6100 - 8 GB DDR3 1867 Mhz - 512 GB SSD

Peripherals: Dell UP2516D - Bose QC25 - Poker 3 w/ Cherry MX Blue - Corsair M65

Legacy Overclocks: Q9450 @ 4.0 GHz - Q6700 @ 4.0 GHz
OCC - Home of the Potato Overclock


#3 NCC10281982B

NCC10281982B

    I am so done.

  • Moderator
  • PipPipPipPipPipPip
  • 6965 posts
  • Gender:Male
  • Location:Bellevue, WA

Posted 01 February 2016 - 08:15 PM

Will do.
I am DUMB, okay? Dumb as a post! Think I'm happy about it?
 
sigimage.gifCFr15LujaQwHZgiAc222zw.png

#4 NCC10281982B

NCC10281982B

    I am so done.

  • Moderator
  • PipPipPipPipPipPip
  • 6965 posts
  • Gender:Male
  • Location:Bellevue, WA

Posted 02 February 2016 - 04:14 AM

[email protected]:~$ ./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,,,


I am DUMB, okay? Dumb as a post! Think I'm happy about it?
 
sigimage.gifCFr15LujaQwHZgiAc222zw.png

#5 Onion

Onion

    Onions are delicious

  • Members
  • PipPipPipPipPip
  • 4241 posts
  • Gender:Male
  • Location:English Colonies

Posted 02 February 2016 - 10:52 AM

Take a look at this, maybe it'll help.

 

http://stackoverflow...ind-main-module


Desktop: i7 6700K @ 4.9 GHz - Asus Z170A - Gigabyte GTX 970 - 2 x 8 GB DDR4 3200 Mhz - Samsung Evo 850 500 GB - EVGA SuperNova G2 750 - Noctua NH-D14 - Fractal Core 3300
MacBook Pro Retina 13: i5 5287U @ 3.3 Ghz - Intel Iris 6100 - 8 GB DDR3 1867 Mhz - 512 GB SSD

Peripherals: Dell UP2516D - Bose QC25 - Poker 3 w/ Cherry MX Blue - Corsair M65

Legacy Overclocks: Q9450 @ 4.0 GHz - Q6700 @ 4.0 GHz
OCC - Home of the Potato Overclock


#6 CheeseMan42

CheeseMan42

    Certified NVIDIA Fanboy

  • News Editor
  • PipPipPipPipPip
  • 4377 posts
  • Gender:Male
  • Location:McLean, VA

Posted 02 February 2016 - 02:20 PM

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.


i7-6700K @ 4.2GHz | Noctua NH-D14 | MSI Gaming M7 | 2x8GB G.Skill Ripjaws V | GTX 980 Ti | 120GB Samsung 850 EVO M.2 | Corsair 750TX | CM Stacker 830 | SoundBlaster X-Fi Titanium | Sennheiser HD650 + Schiit Magni/Modi 2 + Logitech G430 | Logitech G500s | CM Quick Fire Rapid

Intel i3 NUC | 8GB RAM | Samsung 120GB M.2 || Samsung Chromebook || Google Nexus 7

SteamFor Sale Thread | OCC Steam Group | Follow OCC on facebook.png
Gr4vitas (3/18/09) - So moral of the story is. Vista 64 bit makes me happy in the pants.


#7 NCC10281982B

NCC10281982B

    I am so done.

  • Moderator
  • PipPipPipPipPipPip
  • 6965 posts
  • Gender:Male
  • Location:Bellevue, WA

Posted 04 February 2016 - 11:15 AM

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.


I am DUMB, okay? Dumb as a post! Think I'm happy about it?
 
sigimage.gifCFr15LujaQwHZgiAc222zw.png

#8 Onion

Onion

    Onions are delicious

  • Members
  • PipPipPipPipPip
  • 4241 posts
  • Gender:Male
  • Location:English Colonies

Posted 04 February 2016 - 02:18 PM

Just give it 755.

Desktop: i7 6700K @ 4.9 GHz - Asus Z170A - Gigabyte GTX 970 - 2 x 8 GB DDR4 3200 Mhz - Samsung Evo 850 500 GB - EVGA SuperNova G2 750 - Noctua NH-D14 - Fractal Core 3300
MacBook Pro Retina 13: i5 5287U @ 3.3 Ghz - Intel Iris 6100 - 8 GB DDR3 1867 Mhz - 512 GB SSD

Peripherals: Dell UP2516D - Bose QC25 - Poker 3 w/ Cherry MX Blue - Corsair M65

Legacy Overclocks: Q9450 @ 4.0 GHz - Q6700 @ 4.0 GHz
OCC - Home of the Potato Overclock


#9 NCC10281982B

NCC10281982B

    I am so done.

  • Moderator
  • PipPipPipPipPipPip
  • 6965 posts
  • Gender:Male
  • Location:Bellevue, WA

Posted 04 February 2016 - 02:58 PM

I did :( 777 too. I just put it in the root crontab. Lazy I know.


I am DUMB, okay? Dumb as a post! Think I'm happy about it?
 
sigimage.gifCFr15LujaQwHZgiAc222zw.png

#10 steelchizzle

steelchizzle

    New Member

  • New Members
  • 6 posts

Posted 19 August 2017 - 06:48 AM

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 by steelchizzle, 19 August 2017 - 06:50 AM.