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

4.0.2 Error - Exception in thread Thread-30 (__update_plugin) | TypeError: 'NoneType' object is not iterable #2769

Closed
AnthonyBe opened this issue May 15, 2024 · 3 comments
Labels

Comments

@AnthonyBe
Copy link

Describe the bug
Was running 3.4.0.5 and upgraded to 4.0.2
Running this on Windows Server 2016 with python 3.12
On start-up of Glances in web-server mode I get the following error.
Glances continues to start-up and run without issue.

Exception in thread Thread-30 (__update_plugin):
Traceback (most recent call last):
  File "C:\Python312\Lib\threading.py", line 1073, in _bootstrap_inner
    self.run()
  File "C:\Python312\Lib\threading.py", line 1010, in run
    self._target(*self._args, **self._kwargs)
  File "C:\Python312\Lib\site-packages\glances\stats.py", line 264, in __update_plugin
    self._plugins[p].update()
  File "C:\Python312\Lib\site-packages\glances\plugins\plugin\model.py", line 1168, in wrapper
    ret = fct(self, *args, **kw)
          ^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Python312\Lib\site-packages\glances\plugins\plugin\model.py", line 1185, in wrapper
    ret = fct(*args, **kw)
          ^^^^^^^^^^^^^^^^
  File "C:\Python312\Lib\site-packages\glances\plugins\sensors\__init__.py", line 190, in update
    stats.extend(s)
TypeError: 'NoneType' object is not iterable
Glances Web User Interface started on http://0.0.0.0:61208/
�[32mINFO�[0m:     Started server process [�[36m6744�[0m]
�[32mINFO�[0m:     Waiting for application startup.
�[32mINFO�[0m:     Application startup complete.
�[32mINFO�[0m:     Uvicorn running on �[1mhttp://0.0.0.0:61208�[0m (Press CTRL+C to quit)

To Reproduce
Steps to reproduce the behavior:

  1. Start Glances with the following options 'glances -w'
  2. See error

Expected behavior
No error

Screenshots
n/a

Environment (please complete the following information)

  • Operating System (lsb_release -a or OS name/version): Windows Server 2016
  • Glances & psutil versions: Glances version: 4.0.2, PsUtil version: 5.9.8
  • How do you install Glances (Pypi package, script, package manager, source): Pypi package (pip install glances[all])
  • Glances test (only available with Glances 3.1.7 or higher):
C:\Python312>glances --issue
Exception in thread Thread-30 (__update_plugin):
Traceback (most recent call last):
 File "C:\Python312\Lib\threading.py", line 1073, in _bootstrap_inner
   self.run()
 File "C:\Python312\Lib\threading.py", line 1010, in run
   self._target(*self._args, **self._kwargs)
 File "C:\Python312\Lib\site-packages\glances\stats.py", line 264, in __update_plugin
   self._plugins[p].update()
 File "C:\Python312\Lib\site-packages\glances\plugins\plugin\model.py", line 1168, in wrapper
   ret = fct(self, *args, **kw)
         ^^^^^^^^^^^^^^^^^^^^^^
 File "C:\Python312\Lib\site-packages\glances\plugins\plugin\model.py", line 1185, in wrapper
   ret = fct(*args, **kw)
         ^^^^^^^^^^^^^^^^
 File "C:\Python312\Lib\site-packages\glances\plugins\sensors\__init__.py", line 190, in update
   stats.extend(s)
TypeError: 'NoneType' object is not iterable
===============================================================================
Glances �[94m4.0.2�[0m (C:\Python312\Lib\site-packages\glances\__init__.py)
Python �[94m3.12.3�[0m (C:\Python312\python.exe)
PsUtil �[94m5.9.8�[0m (C:\Python312\Lib\site-packages\psutil\__init__.py)
===============================================================================
�[94malert         �[92m[OK]   �[94m 0.00000s
�[0m[]�[0m
�[94mamps          �[92m[OK]   �[94m 0.00000s
�[0m[]�[0m
�[94mcloud         �[92m[OK]   �[94m 0.00000s
�[0m{}�[0m
�[94mconnections   �[92m[OK]   �[94m 0.00000s
�[0m{'ESTABLISHED': 33,
'LISTEN': 47,
'SYN_RECV': 0,
'SYN_SENT': 0,
'initiated': 0,
'net_connections_enabled': True,
'nf_conntrack_enabled': False,
'terminated': 0}�[0m
�[94mcontainers    �[92m[OK]   �[94m 0.00000s
�[0m[]�[0m
�[94mcore          �[92m[OK]   �[94m 0.00000s
�[0m{'log': 2, 'phys': 2}�[0m
�[94mcpu           �[92m[OK]   �[94m 0.01644s
�[0m{'cpucore': 2,
'ctx_switches': 7820,
'ctx_switches_gauge': 10345966,
'ctx_switches_rate_per_sec': 2233.0,
'dpc': 2.2,
'idle': 9.1,
'interrupts': 6130,
'interrupts_gauge': 7362189,
'interrupts_rate_per_sec': 1750.0,
'soft_interrupts': 0,
'soft_interrupts_gauge': 0,
'soft_interrupts_rate_per_sec': 0.0,
'syscalls': 1072127,
'syscalls_gauge': 192624653,
'syscalls_rate_per_sec': 306200.0,
'system': 49.3,
'time_since_update': 3.501389741897583,
'total': 90.8,
'user': 38.9}�[0m
�[94mdiskio        �[92m[OK]   �[94m 0.00000s �[93mkey=disk_name �[0m
[{'disk_name': 'PhysicalDrive0',
 'key': 'disk_name',
 'read_bytes': 1290752,
 'read_bytes_gauge': 8871805952,
 'read_bytes_rate_per_sec': 368639.0,
 'read_count': 52,
 'read_count_gauge': 288703,
 'read_count_rate_per_sec': 14.0,
 'time_since_update': 3.501389741897583,
 'write_bytes': 3297280,
 'write_bytes_gauge': 8757166080,
 'write_bytes_rate_per_sec': 941706.0,
 'write_count': 168,
 'write_count_gauge': 219644,
 'write_count_rate_per_sec': 47.0}, ...]�[0m
�[94mfolders       �[92m[OK]   �[94m 0.00000s
�[0m[]�[0m
�[94mfs            �[92m[OK]   �[94m 0.01482s �[93mkey=mnt_point �[0m
[{'device_name': 'C:\\',
 'free': 221862445056,
 'fs_type': 'NTFS',
 'key': 'mnt_point',
 'mnt_point': 'C:\\',
 'percent': 59.6,
 'size': 549048020992,
 'used': 327185575936}, ...]�[0m
�[94mgpu           �[92m[OK]   �[94m 0.00000s
�[0m[]�[0m
�[94mhelp          �[92m[OK]   �[94m 0.00000s
�[0mNone�[0m
�[94mip            �[92m[OK]   �[94m 0.41164s
�[0m{'address': '***',
'gateway': '***',
'mask': '***',
'mask_cidr': '***',
'public_address': '***',
'public_info_human': '***'}�[0m
�[94mirq           �[92m[OK]   �[94m 0.00000s
�[0m[]�[0m
�[94mload          �[92m[OK]   �[94m 0.00000s
�[0m{'cpucore': 2, 'min1': 0.88, 'min15': 0.06, 'min5': 0.18}�[0m
�[94mmem           �[92m[OK]   �[94m 0.00000s
�[0m{'available': 6405156864, 'free': 6405156864, 'percent': 62.6, 'total': 17143681024, 'used': 10738524160}�[0m
�[94mmemswap       �[92m[OK]   �[94m 0.01562s
�[0m{'free': 2405724160,
'percent': 5.7,
'sin': 0,
'sout': 0,
'time_since_update': 3.943467617034912,
'total': 2550136832,
'used': 144412672}�[0m
�[94mnetwork       �[92m[OK]   �[94m 0.00000s �[93mkey=interface_name �[0m
[{'alias': None,
 'bytes_all': 0,
 'bytes_all_gauge': 0,
 'bytes_all_rate_per_sec': 0.0,
 'bytes_recv': 0,
 'bytes_recv_gauge': 0,
 'bytes_recv_rate_per_sec': 0.0,
 'bytes_sent': 0,
 'bytes_sent_gauge': 0,
 'bytes_sent_rate_per_sec': 0.0,
 'interface_name': 'Ethernet 2',
 'key': 'interface_name',
 'speed': 0,
 'time_since_update': 3.9122180938720703}, ...]�[0m
�[94mnow           �[92m[OK]   �[94m 0.00000s
�[0m{'custom': '2024-05-15 13:20:01 +1000', 'iso': '2024-05-15T13:20:01+10:00'}�[0m
�[94mpercpu        �[92m[OK]   �[94m 0.01869s �[93mkey=cpu_number �[0m
[{'cpu_number': 0, 'idle': 3.7, 'key': 'cpu_number', 'system': 32.1, 'total': 96.3, 'user': 59.9}, ...]�[0m
�[94mports         �[92m[OK]   �[94m 0.00000s
�[0m[]�[0m
�[94mprocesscount  �[92m[OK]   �[94m 0.35032s
�[0m{'pid_max': 0, 'running': 97, 'sleeping': 0, 'thread': 1151, 'total': 100}�[0m
�[94mprocesslist   �[92m[OK]   �[94m 0.00000s
�[0m[]�[0m
�[94mpsutilversion �[92m[OK]   �[94m 0.00000s
�[0m'5.9.8'�[0m
�[94mquicklook     �[92m[OK]   �[94m 0.00000s
�[0m{'cpu': 90.8,
'cpu_hz': 2500000000.0,
'cpu_hz_current': 2500000000.0,
'cpu_log_core': 2,
'cpu_name': 'CPU',
'cpu_phys_core': 2,
'load': 3.0,
'mem': 62.6,
'percpu': [{...}, {...}],
'swap': 5.7}�[0m
�[94mraid          �[92m[OK]   �[94m 0.00000s
�[0m{}�[0m
�[94msensors       �[91m[ERROR]�[94m 1.38567s �[0m'NoneType' object is not iterable�[0m
�[94msmart         �[92m[OK]   �[94m 2.80605s
�[0m[]�[0m
�[94msystem        �[92m[OK]   �[94m 0.00000s
�[0m{'hostname': 'ANTMICROSERVER',
'hr_name': 'Windows 2016Server SP0 64bit',
'os_name': 'Windows',
'os_version': '2016Server SP0',
'platform': '64bit'}�[0m
�[94muptime        �[92m[OK]   �[94m 0.00000s
�[0m{'seconds': 4205}�[0m
�[94mversion       �[92m[OK]   �[94m 0.00000s
�[0m'4.0.2'�[0m
�[94mwifi          �[92m[OK]   �[94m 0.00000s
�[0m[]�[0m
===============================================================================
Total time to update all stats: �[94m5.17247s�[0m
===============================================================================

Additional context
Add any other context about the problem here.

You can also pastebin:

@RazCrimson RazCrimson added the bug label May 15, 2024
@RazCrimson
Copy link
Collaborator

RazCrimson commented May 15, 2024

@AnthonyBe
Could you run glances with these arguments and provide the logs?
Add these after the current command that you use to run glances.

--disable-plugin alert,processlist,wifi,fs,network,diskio,cpu,load,mem,memswap,quicklook,gpu,ip,raid,containers,folders,percpu,uptime,amps,processcount,core,cloud,help,now,ports,system -d

I think this is the same issue as in #2763

@RazCrimson
Copy link
Collaborator

@AnthonyBe
Please upgrade to 4.0.3. That should fix the issue

@AnthonyBe
Copy link
Author

Upgraded from 4.0.2 to 4.0.4 this morning and it has resolved the issue! Thanks!

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

No branches or pull requests

2 participants