Search code examples
pythonbddpytestnidaqmxdaq-mx

Tox returning key error: 'PROGRAMFILES' when running DAQmxConfig.py file


I am getting an error when running py.test command.
Inside the tox file, I have setup the deps to install pytest-bdd, PyDAQmx, and all other relevant installations.
My problem is that the DAQmxConfig.py file (that comes with the pydaqmx installation) fails as I think it cannot find the program files directory.
See the code here: http://pydoc.net/Python/PyDAQmx/1.3/PyDAQmx.DAQmxConfig/

Screenshots of the errors follow:

Tox error the first time

Tox error the second time


Solution

  • In tox.ini file just write the following:

    [testenv]
    setenv = 
      PROGRAMFILES = C:\Program Files