ppannuto / python-saleae

Python library to control a Saleae Logic Analyzer
Apache License 2.0
124 stars 55 forks source link

Problem with export_data2 #84

Open carmelalori opened 11 months ago

carmelalori commented 11 months ago

Hi, I am trying to export data with time span. For that purpose, I am using the export_data2. However, it constantly gives error that is given below. How can I cope with that error? Also, when I tried to run the demo, it also gave same error. I guess it is NAK error, however, I couldnot find any solution.

File "c:\Users\clori\test\main.py", line 49, in s.export_data2(file_path_on_target_machine=path, digital_channels=[0,3], time_span= [1.0,2.0]) File "C:\Users\New\Desktop\Saleae\venv\Lib\site-packages\saleae\saleae.py", line 1048, in export_data2 digital_active, analog_active = self.get_active_channels() ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "c:\Users\clori\test\venv\Lib\site-packages\saleae\saleae.py", line 651, in get_active_channels device = self.get_active_device() ^^^^^^^^^^^^^^^^^^^^^^^^ File "c:\Users\clori\test\venv\Lib\site-packages\saleae\saleae.py", line 619, in get_active_device self.get_connected_devices() File "c:\Users\clori\test\venv\Lib\site-packages\saleae\saleae.py", line 595, in get_connected_devices devices = self._cmd('GET_CONNECTED_DEVICES') ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "c:\Users\clori\test\venv\Lib\site-packages\saleae\saleae.py", line 275, in _cmd ret = self._recv(expect_nak=expect_nak) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "c:\Users\clori\test\venv\Lib\site-packages\saleae\saleae.py", line 259, in _recv self._rxbuf += self._s.recv(1024).decode('UTF-8')

ppannuto commented 10 months ago

have you tried Saleae's new official library: https://saleae.github.io/logic2-automation/getting_started.html ?

carmelalori commented 10 months ago

Thank you for yor response. I have tried the new library (logic2-automation) however, I want to export data with time span. New library has no option with exporting data with time span. Do you have any other advice on exporting data with time span?