Get sensor values and fan speeds2019 Community Moderator ElectionHow to get the ASCII value of a character?How to get the current time in PythonHow do I sort a dictionary by value?Getting the last element of a list in PythonHow to get the number of elements in a list in Python?Parsing values from a JSON file?How to access environment variable values?win32com (python) errorError while importing wmiExecuting wmi.Registry.EnumKey gives type mismatch error

Gravity magic - How does it work?

What are the naunces between the use of 訊く instead of 聞く in the following sentence?

Are all passive ability checks floors for active ability checks?

Recruiter wants very extensive technical details about all of my previous work

Are ETF trackers fundamentally better than individual stocks?

Why did it take so long to abandon sail after steamships were demonstrated?

How could a scammer know the apps on my phone / iTunes account?

Min function accepting varying number of arguments in C++17

Why doesn't the EU now just force the UK to choose between referendum and no-deal?

A Cautionary Suggestion

What are substitutions for coconut in curry?

In a future war, an old lady is trying to raise a boy but one of the weapons has made everyone deaf

How Could an Airship Be Repaired Mid-Flight

Does Mathematica reuse previous computations?

Why would a flight no longer considered airworthy be redirected like this?

Interplanetary conflict, some disease destroys the ability to understand or appreciate music

How to explain that I do not want to visit a country due to personal safety concern?

Sailing the cryptic seas

Professor being mistaken for a grad student

What is the significance behind "40 days" that often appears in the Bible?

Why doesn't using two cd commands in bash script execute the second command?

Is it normal that my co-workers at a fitness company criticize my food choices?

What is the domain in a tikz parametric plot?

How to make healing in an exploration game interesting



Get sensor values and fan speeds



2019 Community Moderator ElectionHow to get the ASCII value of a character?How to get the current time in PythonHow do I sort a dictionary by value?Getting the last element of a list in PythonHow to get the number of elements in a list in Python?Parsing values from a JSON file?How to access environment variable values?win32com (python) errorError while importing wmiExecuting wmi.Registry.EnumKey gives type mismatch error










7















I've been trying to get a Python script to show temperatures for CPU, GPU and other availabile sensors in my hardware, but I haven't found anything useful.



I tried using WMI to get those values, but my processor is apparently not supported.



The code I used was:



import wmi
w = wmi.WMI(namespace="rootwmi")
temperature_info = w.MSAcpi_ThermalZoneTemperature()[0]
print temperature_info.CurrentTemperature


which I got from another stackoverflow thread, and I get thrown the error
Traceback (most recent call last):



 File "C:/Users/Joe/Desktop/test.py", line 3, in <module>
temperature_info = w.MSAcpi_ThermalZoneTemperature()[0]
File "C:Python27libsite-packageswmi.py", line 819, in query
handle_com_error ()
File "C:Python27libsite-packageswmi.py", line 241, in handle_com_error
raise klass (com_error=err)
x_wmi: <x_wmi: Unexpected COM Error (-2147217396, 'OLE error 0x8004100c', None, None)>


which, according to Microsoft Support, means Not Supported (0x8004100C)

I have tried running the command-line version of this code in a cmd.exe window ran as an administrator, but I got the same error.



Is there any other way to access CPU and GPU temperatures?



PS: My OS is Windows 10 and my CPU is AMD FX-8350. I am unsure whether my OS or my CPU are at fault for this error.










share|improve this question




























    7















    I've been trying to get a Python script to show temperatures for CPU, GPU and other availabile sensors in my hardware, but I haven't found anything useful.



    I tried using WMI to get those values, but my processor is apparently not supported.



    The code I used was:



    import wmi
    w = wmi.WMI(namespace="rootwmi")
    temperature_info = w.MSAcpi_ThermalZoneTemperature()[0]
    print temperature_info.CurrentTemperature


    which I got from another stackoverflow thread, and I get thrown the error
    Traceback (most recent call last):



     File "C:/Users/Joe/Desktop/test.py", line 3, in <module>
    temperature_info = w.MSAcpi_ThermalZoneTemperature()[0]
    File "C:Python27libsite-packageswmi.py", line 819, in query
    handle_com_error ()
    File "C:Python27libsite-packageswmi.py", line 241, in handle_com_error
    raise klass (com_error=err)
    x_wmi: <x_wmi: Unexpected COM Error (-2147217396, 'OLE error 0x8004100c', None, None)>


    which, according to Microsoft Support, means Not Supported (0x8004100C)

    I have tried running the command-line version of this code in a cmd.exe window ran as an administrator, but I got the same error.



    Is there any other way to access CPU and GPU temperatures?



    PS: My OS is Windows 10 and my CPU is AMD FX-8350. I am unsure whether my OS or my CPU are at fault for this error.










    share|improve this question


























      7












      7








      7


      1






      I've been trying to get a Python script to show temperatures for CPU, GPU and other availabile sensors in my hardware, but I haven't found anything useful.



      I tried using WMI to get those values, but my processor is apparently not supported.



      The code I used was:



      import wmi
      w = wmi.WMI(namespace="rootwmi")
      temperature_info = w.MSAcpi_ThermalZoneTemperature()[0]
      print temperature_info.CurrentTemperature


      which I got from another stackoverflow thread, and I get thrown the error
      Traceback (most recent call last):



       File "C:/Users/Joe/Desktop/test.py", line 3, in <module>
      temperature_info = w.MSAcpi_ThermalZoneTemperature()[0]
      File "C:Python27libsite-packageswmi.py", line 819, in query
      handle_com_error ()
      File "C:Python27libsite-packageswmi.py", line 241, in handle_com_error
      raise klass (com_error=err)
      x_wmi: <x_wmi: Unexpected COM Error (-2147217396, 'OLE error 0x8004100c', None, None)>


      which, according to Microsoft Support, means Not Supported (0x8004100C)

      I have tried running the command-line version of this code in a cmd.exe window ran as an administrator, but I got the same error.



      Is there any other way to access CPU and GPU temperatures?



      PS: My OS is Windows 10 and my CPU is AMD FX-8350. I am unsure whether my OS or my CPU are at fault for this error.










      share|improve this question
















      I've been trying to get a Python script to show temperatures for CPU, GPU and other availabile sensors in my hardware, but I haven't found anything useful.



      I tried using WMI to get those values, but my processor is apparently not supported.



      The code I used was:



      import wmi
      w = wmi.WMI(namespace="rootwmi")
      temperature_info = w.MSAcpi_ThermalZoneTemperature()[0]
      print temperature_info.CurrentTemperature


      which I got from another stackoverflow thread, and I get thrown the error
      Traceback (most recent call last):



       File "C:/Users/Joe/Desktop/test.py", line 3, in <module>
      temperature_info = w.MSAcpi_ThermalZoneTemperature()[0]
      File "C:Python27libsite-packageswmi.py", line 819, in query
      handle_com_error ()
      File "C:Python27libsite-packageswmi.py", line 241, in handle_com_error
      raise klass (com_error=err)
      x_wmi: <x_wmi: Unexpected COM Error (-2147217396, 'OLE error 0x8004100c', None, None)>


      which, according to Microsoft Support, means Not Supported (0x8004100C)

      I have tried running the command-line version of this code in a cmd.exe window ran as an administrator, but I got the same error.



      Is there any other way to access CPU and GPU temperatures?



      PS: My OS is Windows 10 and my CPU is AMD FX-8350. I am unsure whether my OS or my CPU are at fault for this error.







      python windows wmi cpu temperature






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Mar 6 at 19:55









      user1251007

      7,518103868




      7,518103868










      asked Jun 25 '16 at 19:36









      George LazuGeorge Lazu

      746




      746






















          0






          active

          oldest

          votes











          Your Answer






          StackExchange.ifUsing("editor", function ()
          StackExchange.using("externalEditor", function ()
          StackExchange.using("snippets", function ()
          StackExchange.snippets.init();
          );
          );
          , "code-snippets");

          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "1"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f38032260%2fget-sensor-values-and-fan-speeds%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes















          draft saved

          draft discarded
















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f38032260%2fget-sensor-values-and-fan-speeds%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Save data to MySQL database using ExtJS and PHP [closed]2019 Community Moderator ElectionHow can I prevent SQL injection in PHP?Which MySQL data type to use for storing boolean valuesPHP: Delete an element from an arrayHow do I connect to a MySQL Database in Python?Should I use the datetime or timestamp data type in MySQL?How to get a list of MySQL user accountsHow Do You Parse and Process HTML/XML in PHP?Reference — What does this symbol mean in PHP?How does PHP 'foreach' actually work?Why shouldn't I use mysql_* functions in PHP?

          Compiling GNU Global with universal-ctags support Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern) Data science time! April 2019 and salary with experience The Ask Question Wizard is Live!Tags for Emacs: Relationship between etags, ebrowse, cscope, GNU Global and exuberant ctagsVim and Ctags tips and trickscscope or ctags why choose one over the other?scons and ctagsctags cannot open option file “.ctags”Adding tag scopes in universal-ctagsShould I use Universal-ctags?Universal ctags on WindowsHow do I install GNU Global with universal ctags support using Homebrew?Universal ctags with emacsHow to highlight ctags generated by Universal Ctags in Vim?

          Add ONERROR event to image from jsp tldHow to add an image to a JPanel?Saving image from PHP URLHTML img scalingCheck if an image is loaded (no errors) with jQueryHow to force an <img> to take up width, even if the image is not loadedHow do I populate hidden form field with a value set in Spring ControllerStyling Raw elements Generated from JSP tagds with Jquery MobileLimit resizing of images with explicitly set width and height attributeserror TLD use in a jsp fileJsp tld files cannot be resolved