Jump to content
  • 0

analogImpedance statusMeasure error


dmeichle

Question

Hi - 

I love this pydwf api, so useful! 

However, I am having an issue with analogImpedance.statusMeasure() with the Analog Discovery 2; with even the most minimal example I get the error below, which doesn't make sense since FDwfAnalogImpedanceStatusInput() does only take three arguments not four...

File "/home/dpm314/.local/lib/python3.8/site-packages/pydwf/core/api/analog_impedance.py", line 409, in statusMeasure
    result = self.lib.FDwfAnalogImpedanceStatusInput(self.hdwf, measure.value, c_value)

TypeError: this function takes at least 4 arguments (3 given)

 

Any help greatly appreciated ! Is this an issue of having the wrong/incompatible version installed ? 

Thanks and greetings from New England, 

David

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

Hej David,

I had the same error but managed to fix it, it is actually an error in the original pydwf module. You need to open the analog_impedance.py (from your error message yours is at "/home/dpm314/.local/lib/python3.8/site-packages/pydwf/core/api/analog_impedance.py"). If you go to the last function definition you will find statuMeasure, here you need to change "result = self.lib.FDwfAnalogImpedanceStatusInput(self.hdwf, measure.value, c_value)"  to "result = self.lib.FDwfAnalogImpedanceStatusMeasure(self.hdwf, measure.value, c_value)" and save it.

Once you re-import DwfAnalogImpedance, the status.Measure() should work.

Good luck and cheers,

Edo

Link to comment
Share on other sites

  • 0

Hi @dmeichle, @edo,

It's a pity that I missed the original post in May!

Edo mailed me about this issue (and the solution) last Friday. It was a stupid copy/paste error in the Analog-Impedance module, which is a part of the library that is not as well tested. I fixed the issue and released a new pydwf version that has the fix.

Cheers, Sidney

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...