Python 錯誤訊息 - nidcpower.errors.DriverTooOldError

更新 Nov 2, 2023

產品資訊

驅動程式

  • NI-DCPower

其他

  • Python™ nidcpower module

問題敘述

  • 當我試圖執行一些SMU的 Python範例程式碼時,Python 卻回報說找不到 NI DC Power 函式:
AttributeError: function 'niDCPower_InitializeWithIndependentChannels' not found

屬性錯誤.png
  • 我嘗試使用 Python API 來控制我的 PXI(e) SMU。執行我的程式碼時遇到以下錯誤:
nidcpower.errors.DriverTooOldError: A function was not found in the NI-DCPower runtime. Please visit http://www.ni.com/downloads/drivers/ to download a newer version and install it.

司機太老了.png

解決方案

這個錯誤可透過檢查和更新NI DCPowerPyPIPython的版本來解決。
NI-DCPower Python API 已經針對 NI-DCPower 2021 進行了測試,因此較舊的驅動程式版本可能無法執行。所需的軟體版本可以在nidcpower上找到。