Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception in function get_max_connection_speed #10

Closed
AngheloAlf opened this issue Oct 8, 2020 · 6 comments
Closed

Exception in function get_max_connection_speed #10

AngheloAlf opened this issue Oct 8, 2020 · 6 comments

Comments

@AngheloAlf
Copy link

Hi!

I tried to run sysmon, but it does not open because of an IndexError: list index out of range exception.

The traceback is:

Traceback (most recent call last):
  File "sysmon.py", line 595, in <module>
    main()
  File "sysmon.py", line 589, in main
    main = MainWindow()
  File "sysmon.py", line 102, in __init__
    self.s = sysinfo()
  File "/home/angie/Software/sourcecode/sysmon/src/gather_data.py", line 59, in __init__
    self.get_max_connection_speed()
  File "/home/angie/Software/sourcecode/sysmon/src/gather_data.py", line 271, in get_max_connection_speed
    self.max_connection_speed.append(processes[-1].split()[1]
IndexError: list index out of range

Other details:

  • OS: Pop!_OS 20.04 LTS
  • Python 3.8.2
  • Command used: python3 sysmon.py

Also, i did install the dependencies as stated on the Readme.md and nvidia-smi is installed on the system.

If you need more info, just ask.

Bye c:

@MatthiasSchinzel
Copy link
Owner

MatthiasSchinzel commented Oct 8, 2020

Hi :)

So what fails is the part of getting the wifi bandwidth. M̶a̶y̶b̶e̶ ̶i̶w̶c̶o̶n̶f̶i̶g̶ ̶i̶s̶ ̶n̶o̶t̶ ̶i̶n̶s̶t̶a̶l̶l̶e̶d̶ ̶o̶n̶ ̶y̶o̶u̶r̶ ̶s̶y̶s̶t̶e̶m̶.̶ ̶ ̶ ̶C̶o̶u̶l̶d̶ ̶y̶o̶u̶ ̶p̶l̶e̶a̶s̶e̶ ̶r̶u̶n̶ ̶'̶i̶w̶c̶o̶n̶f̶i̶g̶'̶ ̶a̶n̶d̶ ̶p̶o̶s̶t̶ ̶t̶h̶e̶ ̶o̶u̶t̶p̶u̶t̶ ̶h̶e̶r̶e̶?̶ See Medaths answer

Thank you so much!

@Medath
Copy link

Medath commented Oct 8, 2020

I have this exact same issue too, it happens when my wifi adapter is not connected to any network.

output of iwconfig wlp3s0 with no wifi connection:

wlp3s0    IEEE 802.11  ESSID:off/any  
          Mode:Managed  Access Point: Not-Associated   Tx-Power=16 dBm   
          Retry short limit:7   RTS thr:off   Fragment thr:off
          Power Management:off

output of iwconfig wlp3s0 with a wifi connection:

wlp3s0    IEEE 802.11  ESSID:"MyAP"  
          Mode:Managed  Frequency:2.412 GHz  Access Point: aa:bb:cc:dd:ee:ff   
          Bit Rate=1 Mb/s   Tx-Power=16 dBm   
          Retry short limit:7   RTS thr:off   Fragment thr:off
          Power Management:off
          Link Quality=61/70  Signal level=-49 dBm  
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:99   Missed beacon:0

I peeked at your code and it's grepping iwconfig for "Bit Rate", which is not present when the adapter is not connected to a network, which means the processes list will be empty, causing the above issue.

I guess there should be a check somewhere to see if the adapter is connected to any network (grepping for ESSID:off/any?)

@MatthiasSchinzel
Copy link
Owner

Exactly, that is the problem! Just ran into the same issue! Give me a few moments!

@MatthiasSchinzel
Copy link
Owner

Alright, on my Laptop it seems to work now and the GUI is not crashing. However, the GUI is not showing "disconnected" yet, still needs to be done.

Please try again! Sorry for the inconvenience!

@Medath
Copy link

Medath commented Oct 8, 2020

Can confirm it fixes the crash for me

@AngheloAlf
Copy link
Author

Can also confirm it is working. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants