May-23-2019, 05:02 AM
Hi:
Fairly new to data science oriented Python environment making, and struggling for more than month to put together a collection of audio analysis tools on a Windows 64-bit machine. Let me tell you, I had a heck of time getting pyaudio and portaudio to work. I ended up using Anaconda3 to get to this stage. The microphone in and speaker out works. Most of the example codes out there that start with import pyaudio are working great.
Now, the trouble is that adding my Dataq 8-channel input module to the project, operating in serial mode, can't seem to connect with Dataq Python example code.
(using Dataq's example code):
https://github.com/dataq-instruments/Pyt...mm/DI-1110
(I understand..."The DI-1110 used with this program MUST be placed in its CDC communication mode"...):
https://www.dataq.com/blog/data-acquisit...ibusb-cdc/
(this works, I can see the device on COM3 in the device manager)
There imports are successful in Spyder from the example code Dataq provide in the link above.
import serial
import serial.tools.list_ports
import keyboard
import time
But, I get the following console error:
runfile('C:/Users/Owner/.spyder-py3/MY_DATAQ_D1110.py', wdir='C:/Users/Owner/.spyder-py3')
Traceback (most recent call last):
File "<ipython-input-15-d3312e691d28>", line 1, in <module>
runfile('C:/Users/Owner/.spyder-py3/MY_DATAQ_D1110.py', wdir='C:/Users/Owner/.spyder-py3')
File "C:\ProgramData\Anaconda3\lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 786, in runfile
execfile(filename, namespace)
File "C:\ProgramData\Anaconda3\lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 110, in execfile
exec(compile(f.read(), filename, 'exec'), namespace)
File "C:/Users/Owner/.spyder-py3/MY_DATAQ_D1110.py", line 53, in <module>
ser=serial.Serial()
AttributeError: module 'serial' has no attribute 'Serial'
I'm stumped.
Does anyone have success stories with Python for Windows64bit and DATAQ analog input modules? Or any other brand of 0-10V analog voltage input modules?
-Dan
Fairly new to data science oriented Python environment making, and struggling for more than month to put together a collection of audio analysis tools on a Windows 64-bit machine. Let me tell you, I had a heck of time getting pyaudio and portaudio to work. I ended up using Anaconda3 to get to this stage. The microphone in and speaker out works. Most of the example codes out there that start with import pyaudio are working great.
Now, the trouble is that adding my Dataq 8-channel input module to the project, operating in serial mode, can't seem to connect with Dataq Python example code.
(using Dataq's example code):
https://github.com/dataq-instruments/Pyt...mm/DI-1110
(I understand..."The DI-1110 used with this program MUST be placed in its CDC communication mode"...):
https://www.dataq.com/blog/data-acquisit...ibusb-cdc/
(this works, I can see the device on COM3 in the device manager)
There imports are successful in Spyder from the example code Dataq provide in the link above.
import serial
import serial.tools.list_ports
import keyboard
import time
But, I get the following console error:
runfile('C:/Users/Owner/.spyder-py3/MY_DATAQ_D1110.py', wdir='C:/Users/Owner/.spyder-py3')
Traceback (most recent call last):
File "<ipython-input-15-d3312e691d28>", line 1, in <module>
runfile('C:/Users/Owner/.spyder-py3/MY_DATAQ_D1110.py', wdir='C:/Users/Owner/.spyder-py3')
File "C:\ProgramData\Anaconda3\lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 786, in runfile
execfile(filename, namespace)
File "C:\ProgramData\Anaconda3\lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 110, in execfile
exec(compile(f.read(), filename, 'exec'), namespace)
File "C:/Users/Owner/.spyder-py3/MY_DATAQ_D1110.py", line 53, in <module>
ser=serial.Serial()
AttributeError: module 'serial' has no attribute 'Serial'
I'm stumped.
Does anyone have success stories with Python for Windows64bit and DATAQ analog input modules? Or any other brand of 0-10V analog voltage input modules?
-Dan