在DIAdem中使用Python DataPlugin時無法讀取檔案

更新 Apr 1, 2024

產品資訊

軟體

  • DIAdem 2020
  • DIAdem 2020 SP1
  • SystemLink 2020 R3

問題敘述

我想使用Python開發DataPlugins,我開啟了DIAdem隨附的Python DataPlugin範例(在DIAdem ExampleFinder中,Examples>>Mining and Loading Data>>Creating a Python DataPlugin )。但是當我讀取範例CSV文件時,出現以下錯誤:

Cannot load the file <file path> with the loader <dataplugin name>

More information:
"Module cannot be loaded from compiled python script"
我該如何解決此問題?

解決方案

如果您在環境變數設定中有設置環境變數PYTHONPATH ,則會發生此問題,該變數指向Python要找尋並引入的Modules的所在路徑。因此,要使上述問題能夠排除並正常工作,您需要刪除全局PYTHONPATH

要檢查是否已定義該變數,可以打開Windows命令提示字元 (cmd)並輸入set指令。

我們DIAdem和SystemLink 的開發團隊已經發現此問題,並將在SystemLink 2020 R4和DIAdem 2021中改善此問題。