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

[Windows 10] sensors_temperatures() not found #1718

Open
rana-ans opened this issue Mar 19, 2020 · 3 comments
Open

[Windows 10] sensors_temperatures() not found #1718

rana-ans opened this issue Mar 19, 2020 · 3 comments

Comments

@rana-ans
Copy link

Platform

  • { OS version }
  • { psutil version: python3 -c "import psutil; print(psutil.version)" }
  • { python version }

Windows
Windows 10

Python 3.7.3 (v3.7.3:ef4ec6ed12, Mar 25 2019, 21:26:53) [MSC v.1916 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license()" for more information.

import psutil
print(psutil.version)
5.7.0

Bug description

psutil.sensors_temperatures() not found
psutil.sensors_fans() not found

psutil.sensors_temperatures()
Traceback (most recent call last):
File "<pyshell#3>", line 1, in
psutil.sensors_temperatures()
AttributeError: module 'psutil' has no attribute 'sensors_temperatures'

same happens with psutil.sensors_fans()

Test results
{ output of python -c psutil.tests (failures only, not full result) }

psutil.test()
USER PID %MEM VSZ RSS NICE STATUS START TIME CMDLINE
SYSTEM 0 0.0 60.0K 8.0K runni 26:33 System Idle P
SYSTEM 4 0.0 192.0K 132.0K runni 15:19 System
88 0.2 8.4M 12.7M runni 15:14 00:01 WUDFHost.exe
120 1.1 9.8M 89.2M runni 15:14 00:01 Registry
396 0.0 1.1M 1.0M runni 15:14 00:00 smss.exe
User 536 0.1 2.3M 8.9M 32 runni 15:15 00:00 C:\WINDOWS\Sy
564 0.1 2.6M 10.1M runni 22:30 00:02 WmiApSrv.exe
576 0.1 1.9M 4.7M runni 15:14 00:06 csrss.exe
676 0.1 1.4M 5.3M runni 15:14 00:00 wininit.exe
684 0.1 2.5M 5.5M runni 15:14 00:44 csrss.exe
748 0.1 5.8M 8.4M runni 15:14 00:28 services.exe
764 0.2 8.5M 16.9M runni 15:14 00:24 lsass.exe
788 0.2 9.5M 16.1M runni 15:14 01:02 svchost.exe
832 0.1 2.9M 10.5M runni 15:14 00:00 winlogon.exe
952 0.1 1.9M 6.7M runni 15:17 00:00 BgGameMon.exe
956 0.0 932.0K 3.3M runni 15:14 00:00 svchost.exe
988 0.3 13.9M 27.7M runni 15:14 00:51 svchost.exe
1012 0.1 5.9M 6.0M runni 15:14 00:02 fontdrvhost.e
1020 0.0 3.6M 2.1M runni 15:14 00:00 fontdrvhost.e
1052 0.1 2.9M 7.3M runni 15:14 00:01 svchost.exe
1116 0.0 1.4M 4.0M runni 15:14 00:00 WUDFHost.exe
User 1144 0.1 1.8M 7.3M 32 runni 15:16 00:00 C:\Windows\Sy
1176 0.1 2.7M 7.9M runni 15:14 00:01 svchost.exe
1196 0.9 94.4M 69.4M runni 15:14 10:23 dwm.exe
User 1276 0.7 37.0M 56.7M 64 runni 22:24 00:04 C:\Program Fi
1316 0.1 2.8M 9.3M runni 15:24 00:01 svchost.exe
1344 0.1 2.5M 8.7M runni 15:14 00:00 svchost.exe
1352 0.1 2.1M 9.8M runni 15:14 00:00 svchost.exe
1404 0.2 20.3M 16.3M runni 15:14 02:14 BullGuardCore
1448 0.1 1.5M 5.1M runni 15:14 00:00 svchost.exe
1456 0.1 2.0M 6.8M runni 15:14 00:00 svchost.exe
1464 0.2 6.2M 12.7M runni 15:14 00:04 svchost.exe
1520 0.1 2.7M 10.2M runni 15:14 00:00 svchost.exe
1644 0.2 15.2M 15.0M runni 15:14 00:04 svchost.exe
1764 0.1 2.7M 8.7M runni 15:14 00:06 svchost.exe
User 1808 0.3 13.6M 22.1M 32 runni 15:57 00:07 C:\Users\User
1848 0.1 7.3M 9.1M runni 15:14 00:09 svchost.exe
1864 0.1 1.8M 6.9M runni 15:14 00:00 svchost.exe
1980 0.1 2.3M 6.2M runni 15:14 00:07 svchost.exe
2008 0.1 1.4M 5.5M runni 15:14 00:00 svchost.exe
2056 0.1 2.2M 8.3M runni 15:14 00:09 svchost.exe
2108 0.1 4.8M 9.9M runni 15:14 00:22 svchost.exe
2164 0.2 7.1M 14.6M runni 15:14 00:29 svchost.exe
2200 0.1 2.3M 8.3M runni 15:14 00:00 svchost.exe
2244 0.1 2.5M 11.0M runni 15:14 00:39 svchost.exe
2252 0.1 3.3M 7.2M runni 15:14 01:16 svchost.exe
2260 0.1 1.3M 5.0M runni 15:14 00:00 svchost.exe
2268 0.1 1.9M 5.8M runni 15:14 00:00 svchost.exe
2332 0.1 2.7M 7.9M runni 15:14 00:00 svchost.exe
2460 2.5 1.0M 204.8M runni 15:14 00:56 MemCompressio
2560 0.1 1.8M 6.5M runni 15:14 00:00 svchost.exe
2624 0.1 3.0M 7.6M runni 15:14 00:20 svchost.exe
2668 0.1 2.0M 6.4M runni 15:14 00:00 igfxCUIServic
2744 0.1 1.7M 6.1M runni 15:14 00:00 svchost.exe
2752 0.1 1.6M 6.5M runni 15:14 00:00 svchost.exe
User 2844 0.2 14.1M 14.4M 32 runni 21:52 00:01 C:\Users\User
2888 0.2 3.3M 13.4M runni 15:14 00:03 svchost.exe
2960 0.2 3.4M 14.7M runni 15:14 00:08 svchost.exe
User 2972 0.3 8.1M 23.0M 32 runni 22:17 00:00 C:\Windows\Sy
User 2976 0.0 22.5M 900.0K 32 stopp 15:15 00:00 C:\Windows\Im
3068 0.1 1.7M 5.5M runni 15:14 00:02 svchost.exe
User 3100 0.1 1.8M 7.1M 32 runni 18:18 00:00 C:\Windows\Sy
User 3168 0.3 9.3M 27.7M 32 runni 22:03 01:24 C:\Program Fi
3204 0.1 2.0M 6.5M runni 15:14 00:03 svchost.exe
3224 0.2 8.5M 16.8M runni 15:14 00:31 svchost.exe
3308 0.2 7.4M 20.0M runni 22:45 00:02 svchost.exe
3384 0.2 6.0M 14.9M runni 15:14 00:08 svchost.exe
User 3496 0.3 8.0M 24.9M 32 runni 15:14 00:25 sihost.exe
User 3532 0.3 11.6M 24.7M 32 runni 15:14 00:30 C:\WINDOWS\sy
3560 0.1 24.1M 11.8M runni 15:14 00:00 PresentationF
User 3644 0.4 8.2M 30.5M 32 runni 15:14 00:11 C:\WINDOWS\sy
3652 0.1 2.7M 11.1M runni 15:14 00:00 svchost.exe
3660 0.1 1.5M 4.6M runni 15:14 00:00 AsLdrSrv64.ex
3680 0.2 4.4M 19.0M runni 15:14 00:26 svchost.exe
User 3848 0.0 2.1M 1.0M 16384 runni 15:14 00:00 C:\Program Fi
User 3856 0.0 1.7M 720.0K 32 runni 15:14 00:00 C:\Program Fi
User 3872 0.0 2.1M 1.9M 128 runni 15:14 00:00 C:\Program Fi
User 3884 0.0 2.3M 1.9M 128 runni 15:14 00:00 C:\Program Fi
User 3952 0.2 8.9M 17.0M 32 runni 15:14 00:07 taskhostw.exe
4024 0.1 5.4M 10.1M runni 15:14 00:04 spoolsv.exe
User 4148 0.1 2.3M 9.5M 32 runni 15:14 00:00 C:\WINDOWS\Sy
4268 0.1 1.7M 6.2M runni 15:14 00:00 svchost.exe
4284 0.1 4.7M 11.1M runni 15:14 00:00 svchost.exe
User 4296 0.3 12.9M 22.4M 64 runni 22:33 00:00 C:\Program Fi
4364 0.1 2.7M 6.7M runni 15:14 00:16 svchost.exe
User 4388 0.7 33.6M 57.9M 64 runni 22:24 00:01 C:\Program Fi
4424 0.1 1.6M 5.8M runni 15:14 00:00 svchost.exe
4432 0.2 14.0M 18.2M runni 15:14 00:22 svchost.exe
User 4440 0.6 48.0M 49.5M 32 runni 21:50 00:00 C:\Program Fi
User 4480 0.2 4.1M 12.9M 128 runni 15:14 00:39 ctfmon.exe
4492 0.1 2.0M 6.5M runni 15:14 00:00 svchost.exe
User 4632 0.4 10.8M 32.8M 32 runni 15:30 00:08 C:\WINDOWS\Sy
User 4676 0.9 80.8M 72.8M 32 runni 15:57 00:27 C:\Users\User
User 4756 0.3 7.8M 21.2M 32 runni 15:14 00:02 C:\WINDOWS\Sy
4768 0.1 3.2M 9.0M runni 15:14 00:05 AppleMobileDe
4780 0.1 1.3M 4.6M runni 15:14 00:00 armsvc.exe
4820 0.1 2.2M 6.4M runni 15:14 00:00 None
4824 0.1 12.3M 8.7M runni 15:14 00:00 ASUSDisplayCt
User 4952 1.7 81.7M 133.8M 32 runni 15:14 04:13 C:\WINDOWS\Ex
4964 0.2 4.7M 13.3M runni 15:16 00:03 svchost.exe
5004 0.1 4.5M 6.5M runni 15:14 00:00 None
5040 0.1 2.8M 9.1M runni 15:14 00:00 None
5136 0.0 920.0K 3.0M runni 15:14 00:00 AsHidSrv64.ex
5152 0.1 1.2M 4.2M runni 15:14 00:00 None
5180 0.1 5.5M 11.8M runni 15:14 00:31 BullGuardFile
5196 0.3 104.0M 27.0M runni 15:14 00:34 BullGuardFilt
5244 0.1 1.8M 5.0M runni 15:14 00:00 mDNSResponder
5252 0.2 9.4M 17.9M runni 15:14 04:04 BullGuardFire
5264 2.6 367.0M 205.8M runni 15:14 03:01 BullGuardScan
5288 0.1 3.9M 7.4M runni 15:14 00:02 BullGuardUpda
5300 0.3 37.0M 24.2M runni 15:14 02:19 BullGuardSent
5312 0.2 19.4M 16.0M runni 15:14 00:00 BullGuardVPNS
5344 0.2 4.9M 13.4M runni 15:14 00:02 svchost.exe
5432 0.1 4.3M 9.2M runni 15:14 00:03 svchost.exe
5448 0.4 36.2M 29.0M runni 15:14 00:06 OfficeClickTo
5460 0.2 4.4M 15.3M runni 21:58 00:00 svchost.exe
5488 0.2 7.4M 14.6M runni 15:14 00:03 svchost.exe
5500 0.1 1.4M 5.3M runni 15:14 00:00 svchost.exe
5508 0.3 19.6M 25.7M runni 15:14 00:09 svchost.exe
5516 0.3 31.4M 27.8M runni 15:14 01:25 svchost.exe
5524 0.1 1.4M 5.5M runni 15:14 00:00 IntelCpHDCPSv
5548 0.1 1.6M 4.3M runni 15:14 00:00 esif_uf.exe
5556 0.1 4.2M 6.6M runni 15:14 00:00 DTSAPO3Servic
5564 0.1 4.2M 11.7M runni 15:14 00:11 svchost.exe
User 5584 7.1 824.2M 574.1M 32 runni 22:30 00:58 C:\Program Fi
5588 0.1 4.9M 10.0M runni 15:14 00:00 EvtEng.exe
5616 0.1 2.9M 6.2M runni 15:14 00:00 GiftBoxServic
User 5716 0.3 14.3M 27.9M 32 runni 22:42 00:09 C:\Users\User
User 5744 0.1 2.9M 11.3M 32 runni 21:50 00:01 C:\Program Fi
5748 0.1 2.2M 7.4M runni 15:14 00:00 svchost.exe
5768 0.1 3.6M 7.9M runni 15:16 00:00 LMS.exe
User 5808 0.0 21.0M 332.0K 32 stopp 18:18 00:00 C:\Program Fi
5820 0.2 6.1M 14.2M runni 21:49 00:00 None
5864 0.2 15.8M 12.5M runni 15:14 00:00 RefreshRateSe
5872 0.1 1.6M 5.1M runni 15:14 00:00 svchost.exe
5904 0.1 2.0M 7.1M runni 15:14 00:00 RegSrvc.exe
5912 0.1 1.5M 4.9M runni 15:14 00:00 remotesolverd
6008 0.1 1.4M 4.6M runni 15:14 00:00 RstMwService.
6024 0.1 1.7M 5.6M runni 15:14 00:00 sqlwriter.exe
6092 0.1 2.2M 7.1M runni 15:14 00:00 SSUService.ex
6136 0.1 1.9M 6.2M runni 15:14 00:00 svchost.exe
6164 0.1 1.3M 5.1M runni 15:14 00:00 IntelCpHeciSv
User 6168 0.2 6.4M 20.1M 32 runni 15:14 00:08 C:\Windows\Sy
User 6196 0.5 19.7M 38.5M 32 runni 22:24 00:00 C:\Program Fi
6240 0.1 1.3M 4.5M runni 15:14 00:00 svchost.exe
6260 0.2 4.8M 17.5M runni 15:14 00:01 svchost.exe
6292 0.1 6.8M 11.9M runni 15:14 00:01 TeamViewer_Se
6328 0.1 1.3M 4.4M runni 15:14 00:00 svchost.exe
User 6336 0.1 1.9M 8.3M 32 runni 22:03 00:02 C:\Program Fi
6392 0.2 4.3M 12.2M runni 15:14 00:01 ZeroConfigSer
6540 0.1 1.7M 6.2M runni 15:14 00:00 svchost.exe
User 6612 1.8 118.4M 142.6M 32 runni 22:24 00:17 C:\Program Fi
6616 0.0 17.4M 3.8M runni 15:14 00:00 dispatcher.ex
6756 0.1 6.5M 6.2M runni 15:14 00:00 conhost.exe
User 6868 0.1 2.1M 8.6M 32 runni 22:24 00:00 C:\Program Fi
6884 0.1 5.5M 9.9M runni 15:14 00:00 dasHost.exe
User 7040 0.1 1.8M 6.5M 32 runni 15:35 00:00 C:\WINDOWS\sy
User 7092 0.2 10.3M 13.4M 32 runni 15:58 00:00 C:\Users\User
User 7148 2.4 175.0M 192.2M 32768 runni 22:24 00:40 C:\Program Fi
7268 0.1 3.1M 8.9M runni 15:14 00:00 svchost.exe
User 7468 0.2 20.7M 17.9M 32 runni 15:14 00:00 GiftBox.Agent
7476 0.1 27.1M 9.4M runni 15:14 00:01 BullGuardSent
7628 0.1 1.5M 5.4M runni 15:14 00:00 svchost.exe
7760 0.1 2.1M 7.0M runni 15:14 00:00 svchost.exe
8064 0.1 2.2M 5.9M runni 15:14 00:00 svchost.exe
User 8100 0.3 4.1M 21.8M 32 runni 15:14 00:02 C:\WINDOWS\sy
8256 0.1 2.3M 7.9M runni 15:14 00:00 svchost.exe
8264 0.1 1.9M 6.8M runni 15:14 00:00 svchost.exe
8304 0.1 2.0M 6.7M runni 15:14 00:00 svchost.exe
8376 0.5 17.9M 36.9M runni 22:12 00:02 svchost.exe
User 8384 0.5 21.1M 37.8M 32 runni 22:24 00:06 C:\Program Fi
User 8728 0.2 5.3M 14.7M 32 runni 18:32 00:00 C:\Windows\Sy
User 8816 0.5 23.3M 42.0M 32 runni 22:24 00:03 C:\Program Fi
User 8980 1.7 158.5M 136.9M 64 runni 15:58 13:36 C:\Users\User
User 9012 0.9 40.6M 70.2M 64 runni 22:24 00:08 C:\Program Fi
User 9064 0.0 41.2M 620.0K 32 stopp 18:32 00:01 C:\Program Fi
9224 0.1 10.4M 7.2M runni 15:14 00:01 BullGuardHelp
9376 0.1 2.7M 6.7M runni 15:14 00:00 svchost.exe
User 9476 0.2 5.6M 15.0M 32 runni 22:16 00:00 taskhostw.exe
User 9500 0.7 35.7M 53.4M 64 runni 22:24 00:01 C:\Program Fi
User 9540 0.3 8.7M 24.5M 32 runni 16:12 00:04 C:\Windows\Sy
User 9748 0.4 44.0M 34.0M 32 runni 21:49 00:09 C:\Program Fi
9860 0.4 28.9M 32.5M runni 15:14 00:19 SearchIndexer
User 10108 1.0 38.0M 82.9M 32 runni 15:14 00:13 C:\WINDOWS\Sy
10136 0.2 9.7M 16.4M runni 15:14 00:01 svchost.exe
User 10324 0.3 6.6M 20.8M 32 runni 15:14 00:03 C:\Windows\Sy
10380 0.2 4.1M 16.4M runni 15:14 00:01 svchost.exe
User 10644 0.1 1.7M 6.5M 32 runni 20:35 00:00 C:\WINDOWS\sy
User 10808 0.6 25.0M 50.9M 32 runni 15:14 00:30 C:\Windows\Sy
User 10880 0.0 6.5M 820.0K 16384 runni 15:14 00:00 ??\C:\WINDOW
User 10912 2.7 149.0M 220.7M 32 stopp 15:14 00:44 C:\Windows\Sy
User 11000 0.1 4.2M 10.7M 32 runni 15:33 00:00 C:\WINDOWS\sy
User 11040 0.1 12.8M 8.2M 16384 runni 15:14 03:05 C:\WINDOWS\sy
11248 0.1 2.1M 9.1M runni 21:49 00:00 rundll32.exe
11360 0.1 3.5M 8.1M runni 22:45 00:00 svchost.exe
User 11404 0.4 13.4M 33.3M 32 stopp 16:12 00:01 C:\WINDOWS\Sy
User 11512 0.0 16.5M 268.0K 32 stopp 18:18 00:00 C:\Program Fi
User 11528 0.2 10.3M 19.4M 32 runni 22:43 00:03 C:\Users\User
11600 0.1 6.2M 8.2M runni 18:03 00:00 svchost.exe
User 11940 2.2 122.1M 180.6M 32 runni 22:24 01:08 C:\Program Fi
User 11952 0.3 6.9M 21.2M 32 runni 21:49 00:00 C:\Program Fi
User 12008 0.0 14.3M 2.3M 32 stopp 15:14 00:01 C:\Program Fi
User 12092 0.2 7.9M 18.6M 32 stopp 15:14 00:01 C:\Windows\Sy
User 12280 0.2 5.0M 14.6M 32 runni 15:16 00:01 C:\WINDOWS\sy
12308 0.1 2.0M 7.7M runni 15:14 00:00 unsecapp.exe
12456 0.3 18.0M 25.7M runni 15:14 00:10 WmiPrvSE.exe
12856 0.3 13.5M 24.2M runni 15:14 00:10 svchost.exe
12892 0.1 3.8M 6.1M runni 15:16 00:00 SgrmBroker.ex
13140 0.4 12.7M 30.6M runni 21:49 00:01 nvcontainer.e
User 13168 0.6 33.8M 50.5M 32 runni 15:57 01:46 C:\Users\User
User 13204 0.1 3.0M 8.6M 32 runni 15:14 00:00 C:\Program Fi
13240 0.1 3.3M 8.3M runni 15:14 00:00 dllhost.exe
13256 0.0 1.7M 604.0K runni 15:14 00:00 GoogleCrashHa
13260 0.0 1.7M 452.0K runni 15:14 00:00 GoogleCrashHa
User 13348 0.1 1.6M 6.6M 32 runni 15:14 00:00 C:\Windows\Sy
User 13580 0.1 8.8M 9.8M 32 runni 15:57 00:00 C:\Users\User
User 13584 0.2 36.1M 12.3M 16384 runni 15:14 00:40 C:\Program Fi
User 13588 0.1 1.8M 6.9M 32 runni 15:14 00:00 C:\Windows\Sy
User 13640 0.1 1.4M 5.2M 32 runni 15:14 00:00 C:\Program Fi
13652 0.1 2.0M 10.2M runni 15:14 00:02 svchost.exe
User 13788 0.2 23.4M 17.2M 32 runni 15:14 00:00 C:\Program Fi
User 13796 0.7 35.3M 56.8M 32 runni 22:24 00:02 C:\Program Fi
User 14040 0.3 31.8M 25.0M 32 runni 21:50 00:00 C:\Program Fi
User 14080 0.3 6.2M 21.6M 32 runni 21:55 00:00 C:\Windows\Sy
14184 0.1 3.6M 10.0M runni 15:14 00:00 SecurityHealt
User 14196 0.3 21.9M 26.6M 32 runni 20:01 00:01 C:\Windows\Sy
User 14260 0.3 17.4M 24.0M 32 runni 15:17 00:03 C:\Program Fi
14472 0.1 1.2M 4.4M runni 16:44 00:00 svchost.exe
User 14820 0.1 1.7M 6.6M 32 runni 22:24 00:00 C:\Program Fi
User 15172 0.6 18.3M 47.4M 32 runni 21:50 00:13 C:\Program Fi
User 15244 1.3 66.2M 100.6M 32 runni 22:24 00:45 C:\Program Fi
User 15344 0.6 16.6M 47.3M 32 stopp 21:55 00:01 C:\WINDOWS\Sy
User 15476 1.2 38.2M 96.4M 32 runni 20:01 00:05 C:\Program Fi
User 15492 0.4 24.9M 31.0M 32 runni 15:15 00:02 C:\WINDOWS\sy
User 15520 0.0 69.9M 616.0K 32 stopp 15:15 00:03 C:\Program Fi
User 15724 0.2 5.0M 13.1M 32 runni 15:15 00:00 C:\Windows\Sy
15800 0.1 1.8M 8.2M runni 15:16 00:00 svchost.exe
User 15960 0.6 23.0M 45.2M 32 runni 22:24 00:01 C:\Program Fi
16280 0.4 29.4M 30.9M runni 21:49 00:03 None
16312 0.1 1.3M 4.6M runni 15:16 00:00 jhi_service.e

@rana-ans rana-ans added the bug label Mar 19, 2020
@KM4YRI
Copy link

KM4YRI commented Mar 19, 2020

I just encountered this error on Windows 10.

Per the docs, "If sensors are not supported by the OS an empty dict is returned."

A proposed fix, which would agree with the documentation would be:

https://github.com/giampaolo/psutil/blob/master/psutil/__init__.py#L2261
(referencing commit #ea4887e758ee2845f8e238655aaadb56f504e128)

def sensors_temperatures(fahrenheit=False):
    return dict()

@rana-ans
Copy link
Author

rana-ans commented Mar 20, 2020

I just encountered this error on Windows 10.

Per the docs, "If sensors are not supported by the OS an empty dict is returned."

A proposed fix, which would agree with the documentation would be:

https://github.com/giampaolo/psutil/blob/master/psutil/__init__.py#L2261
(referencing commit #ea4887e758ee2845f8e238655aaadb56f504e128)

def sensors_temperatures(fahrenheit=False):
    return dict()

I can get the temperatures and fan speed using CMD but I cannot, using this module
Laptop specs: Asus TUF fx505

@isaiah2004
Copy link

My error is same but it says attribute not found. it does not run on windows i suggest using wmi instead. atleast just for the temps.

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

No branches or pull requests

4 participants