nicolargo / glances

Glances an Eye on your system. A top/htop alternative for GNU/Linux, BSD, Mac OS and Windows operating systems.
http://nicolargo.github.io/glances/
Other
26.23k stars 1.49k forks source link

Crash in the Wifi plugin on my Laptop #1151

Closed kalgecin closed 6 years ago

kalgecin commented 6 years ago

Traceback (most recent call last): File "/usr/local/bin/glances", line 11, in sys.exit(main()) File "/usr/local/lib/python2.7/dist-packages/glances/init.py", line 134, in main start(config=config, args=args) File "/usr/local/lib/python2.7/dist-packages/glances/init.py", line 103, in start mode.serve_forever() File "/usr/local/lib/python2.7/dist-packages/glances/standalone.py", line 115, in serve_forever self.serve_forever() File "/usr/local/lib/python2.7/dist-packages/glances/standalone.py", line 104, in serve_forever self.screen.update(self.stats) File "/usr/local/lib/python2.7/dist-packages/glances/outputs/glances_curses.py", line 978, in update self.flush(stats, cs_status=cs_status) File "/usr/local/lib/python2.7/dist-packages/glances/outputs/glances_curses.py", line 956, in flush self.display(stats, cs_status=cs_status) File "/usr/local/lib/python2.7/dist-packages/glances/outputs/glances_curses.py", line 528, in display stat_display = self.get_stat_display(stats, plugin_max_width) File "/usr/local/lib/python2.7/dist-packages/glances/outputs/glances_curses.py", line 483, in __get_stat_display args=self.args, max_width=plugin_max_width) File "/usr/local/lib/python2.7/dist-packages/glances/plugins/glances_plugin.py", line 762, in get_stats_display 'msgdict': self.msg_curse(args), File "/usr/local/lib/python2.7/dist-packages/glances/plugins/glances_wifi.py", line 197, in msg_curse if len(hotspotname) > ifname_max_width: TypeError: object of type 'NoneType' has no len()

nicolargo commented 6 years ago

Please fill the issue with all mandatories information:

Versions

Logs

You can also pastebin the Glances logs file (https://glances.readthedocs.io/en/latest/config.html#logging)

kalgecin commented 6 years ago

Glances v2.11.1 with psutil v5.2.2

No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 17.04 Release: 17.04 Codename: zesty

glances worked fine after the laptop went to sleep. don't know how i can reproduce this, but glances wouldn't start during the incident. works fine now

nicolargo commented 6 years ago

Ok, i will had a check on the Glances Wifi in order to catch the error.

nicolargo commented 6 years ago

Patch done in the latest commit.

Available in the DEVELOP branch and will be release in Glances 3.0.

Thanks for the issue report !