1

簡単なコード:

from PyDAQmx import Task
task = Task()

レイズ:

<...>
File "C:\Users\Adrian\Anaconda3\lib\site-packages\PyDAQmx\DAQmxFunctions.py", line 28, in mafunction
    DAQmxGetExtendedErrorInfo(errBuff,2048)
ctypes.ArgumentError: argument 1: <class 'RecursionError'>: maximum recursion depth exceeded while calling a Python object

関数のエラー:

def catch_error_default(f):
    def mafunction(*arg):
        error = f(*arg)
        if error<0:
            errBuff = create_string_buffer(2048)
            DAQmxGetExtendedErrorInfo(errBuff,2048) # <<<--- error here <<<---
            raise DAQError(error,errBuff.value.decode("utf-8"), f.__name__)
        elif error>0:
            errBuff = create_string_buffer(2048)
            DAQmxGetErrorString (error, errBuff, 2048);
#            print "WARNING  :",error, "  ", errBuff.value.decode("utf-8")
            raise DAQError(error,errBuff.value.decode("utf-8"), f.__name__)
        return error
    return mafunction

理由がわかりません。

「instrumental-lib」と「NiceLib」(http://instrumental-lib.readthedocs.io/en/latest/ni-daqs.html)をインストールしようとした後ですが、Anaconda、PyDAQmx、およびNIDAQmxドライバーを再インストールしても何もありません効果。

4

1 に答える 1

1

まず、NI MAX データベースをクリアする必要があります: NI MAX を開きます -> ツール -> 構成データをリセットします。

次に、すべての NI ソフトウェアをアンインストールします (復元しないでください)。

その後、NI DAQmx を再度インストールします。

Anacondaも再インストールしますが、やるべきではないと思います。

于 2016-11-04T17:14:08.293 に答える