Jump to content
  • 0

AttributeError: module 'dwfconstants' has no attribute 'DwfWindowRectangular'


tdeball

Question

Hi,

I am working through some of the Waveform SDK examples on an Analog Discovery 2. I can get all of the samples in the SDK/samples/py directory to work. Then i progressed to the "WaveForms-SDK-Getting-Started-PY-master" samples. None of these are working due to the error below. Any help would be appreciated!

 

XXX-MacBook-Pro-2:~ XXX$ /usr/bin/python3 /Users/XXX/Downloads/WaveForms-SDK-Getting-Started-PY-master/test_device_info.py
Traceback (most recent call last):
  File "/Users/XXX/Downloads/WaveForms-SDK-Getting-Started-PY-master/test_device_info.py", line 1, in <module>
    from WF_SDK import device, error       # import instruments
  File "/Users/XXX/Downloads/WaveForms-SDK-Getting-Started-PY-master/WF_SDK/__init__.py", line 15, in <module>
    from WF_SDK import tools
  File "/Users/XXX/Downloads/WaveForms-SDK-Getting-Started-PY-master/WF_SDK/tools.py", line 29, in <module>
    class window:
  File "/Users/XXX/Downloads/WaveForms-SDK-Getting-Started-PY-master/WF_SDK/tools.py", line 31, in window
    rectangular = constants.DwfWindowRectangular
AttributeError: module 'dwfconstants' has no attribute 'DwfWindowRectangular'

Link to comment
Share on other sites

9 answers to this question

Recommended Posts

  • 0

Hi Attila,

I am tring to work on something related to the Waveforms SDK. I got the issue as mentioned by @tdeball. Updated the Waveforms to the latest version, still facing the same issue. I will be glab receiving help in this regards.

D:\localWS\XXX\Testing\xxx\Testjig_UI> & d:/localWS/XXX/Testing/xxx/Testjig_UI/venv/Scripts/python.exe d:/localWS/XXX/Testing/xxx/Testjig_UI/ADwithPy.py
Traceback (most recent call last):
  File "d:\localWS\XXX\Testing\xxx\Testjig_UI\ADwithPy.py", line 22, in <module>
    from WF_SDK import device, scope, wavegen   # import instruments
  File "d:\localWS\XXX\Testing\xxx\Testjig_UI\WF_SDK\__init__.py", line 15, in <module>
    from WF_SDK import tools
  File "d:\localWS\XXX\Testing\xxx\Testjig_UI\WF_SDK\tools.py", line 29, in <module>
    class window:
  File "d:\localWS\XXX\Testing\xxx\Testjig_UI\WF_SDK\tools.py", line 31, in window
    rectangular = constants.DwfWindowRectangular
AttributeError: module 'dwfconstants' has no attribute 'DwfWindowRectangular'

Thanks in advance.

Link to comment
Share on other sites

  • 0

Hi @attila,

I verified this. The atached file is the dwfconstants.py from the location "C:\Program Files (x86)\Digilent\WaveFormsSDK\samples\py\". couldn't find the declarations for window types.

Also, How to find the frequency of the analog data on scope - channel 1 using python? There is only definitions to read voltage level of the data. Please help me on this query too.

 

Thanks in advance

dwfconstants.py

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...