【问题标题】:Failed to import ul from mcculw从 mcculw 导入 ul 失败
【发布时间】:2017-10-08 16:56:17
【问题描述】:

以下是我尝试导入适用于 Windows 的 MCC 通用库 Python API 的方法:

import ctypes
from mcculw import ul
from mcculw.enums import InterfaceType

作为奖励,以下是 Python 向我抛出的错误:

  File "yadayada.py", line 12, in <module>
    from mcculw import ul
  File "D:\Python27\lib\site-packages\mcculw\ul.py", line 39, in <module>
    _cbw.cbAChanInputMode.argtypes = [c_int, c_int, c_int]
  File "D:\Python27\lib\ctypes\__init__.py", line 378, in __getattr__
    func = self.__getitem__(name)
  File "D:\Python27\lib\ctypes\__init__.py", line 383, in __getitem__
    func = self._FuncPtr((name_or_ordinal, self))
AttributeError: function 'cbAChanInputMode' not found

我必须承认,我有幸目睹了比这更不言自明的错误消息。

【问题讨论】:

    标签: python windows data-acquisition


    【解决方案1】:

    我刚刚通过 pip 安装了 mcculw,但我上次更新 MCC DLL 是几年前。点击我的方式到https://www.mccdaq.com/Software-Downloads.aspx,下载最新的 MCC DAQ CD 包,安装它,从此一切顺利。

    TL;DR:更新您的 MCC DAQ 软件。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多