Code Monkey home page Code Monkey logo

logic2-automation's Introduction

Logic2 Automation API

Starting with 2.3.56, Logic 2 supports a gRPC API for remote automation.

Please note that the current relase is in beta and will likely to have breaking changes before it is officially released.

This repository contains the gRPC .proto definition file for the API, and a Python library for using the API. You can generate gRPC bindings for other languages using the .proto file.

You can read more about the Python API at https://saleae.github.io/logic2-automation/

Contents

  • python/ contains the Python library around the gRPC API. We recommend reading the docs (linked above) if you would like to use the Python library.
  • proto/ contains the gRPC .proto definition file.

logic2-automation's People

Contributors

huffman avatar johncolanduoni avatar marcus10110 avatar alexhrao avatar nbanerje avatar

Stargazers

 avatar William avatar Davi Muniz avatar David Kincaid avatar  avatar Jonathan  avatar zhenyu avatar Christoph Wolf avatar Alex Klein avatar Jonathan Huft avatar Daehyeon Bae avatar Edwin avatar  avatar  avatar Brendan Haines avatar  avatar Jimmy Pedersen avatar  avatar Zain Ahmed avatar

Watchers

 avatar  avatar  avatar Clark Willison avatar Joe Garrison avatar  avatar  avatar  avatar  avatar

logic2-automation's Issues

Requirements too strict

Hi everyone

Thanks for the great package. Its working really good. One thing that's blocking me are the strict requirements (all versions set by == and not >). Could you fix this? I assume the versions could be quite flexible. The requirement thats hurting me the most is protobuf==3.20.1 as this is conflicting with my Tensorflow requirements (obviously, these could be installed in separate venvs, but its making my workflow much more complicated).

Thanks for your help!

`pip install logic2-automation` is failing

pip install logic2-automation
Collecting logic2-automation
  Using cached logic2_automation-1.0.6.tar.gz (16 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Installing backend dependencies ... done
  Preparing metadata (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Preparing metadata (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [26 lines of output]
      Building logic2-automation protobuf files
      Traceback (most recent call last):
        File "C:\Users\huffman\dev\test-logic2-automation\venv\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 144, in prepare_metadata_for_build_wheel
          hook = backend.prepare_metadata_for_build_wheel
      AttributeError: module 'hatchling.build' has no attribute 'prepare_metadata_for_build_wheel'

      During handling of the above exception, another exception occurred:

      Traceback (most recent call last):
        File "C:\Users\huffman\dev\test-logic2-automation\venv\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 351, in <module>
          main()
        File "C:\Users\huffman\dev\test-logic2-automation\venv\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 333, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
        File "C:\Users\huffman\dev\test-logic2-automation\venv\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 148, in prepare_metadata_for_build_wheel
          whl_basename = backend.build_wheel(metadata_directory, config_settings)
        File "C:\Users\huffman\AppData\Local\Temp\pip-build-env-no8xozzi\overlay\Lib\site-packages\hatchling\build.py", line 58, in build_wheel
          return os.path.basename(next(builder.build(directory=wheel_directory, versions=['standard'])))
        File "C:\Users\huffman\AppData\Local\Temp\pip-build-env-no8xozzi\overlay\Lib\site-packages\hatchling\builders\plugin\interface.py", line 155, in build
          artifact = version_api[version](directory, **build_data)
        File "C:\Users\huffman\AppData\Local\Temp\pip-build-env-no8xozzi\overlay\Lib\site-packages\hatchling\builders\wheel.py", line 405, in build_standard
          for included_file in self.recurse_included_files():
        File "C:\Users\huffman\AppData\Local\Temp\pip-build-env-no8xozzi\overlay\Lib\site-packages\hatchling\builders\plugin\interface.py", line 177, in recurse_included_files
          yield from self.recurse_forced_files(self.config.get_force_include())
        File "C:\Users\huffman\AppData\Local\Temp\pip-build-env-no8xozzi\overlay\Lib\site-packages\hatchling\builders\plugin\interface.py", line 231, in recurse_forced_files
          raise FileNotFoundError(msg)
      FileNotFoundError: Forced include not found: C:\Users\huffman\AppData\Local\Temp\pip-install-9b1nuh82\proto\saleae\grpc\saleae.proto
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

[Request] Add ability to explore existing channel & device configurations

Right now, based on the docs, I don't see an easy way to query channel metadata from an existing capture (or a new capture, for that matter). For example, consider the following screenshots:
Screen Shot 2022-10-28 at 1 41 45 PM
Screen Shot 2022-10-28 at 1 45 48 PM

There isn't a clean way ask Logic "what's the name of channel D0?", "what channels are enabled?", or "what is the sample rate/voltage level?" (at least as far as I can tell).

The reason this would be nice is that in our use case, we accept SPI captures from a variety of sources, and then would like to automatically export the SPI analyzer results to a CSV. However, we don't control these input SPI captures, so we can't always know that CLK will be the first signal (for example); we'd like to be able to dynamically pick which signals based on their name.

Right now, I have a workaround, which basically involves unzipping the .sal file, parsing the meta.json file inside, and getting this data from there... but I know this isn't guaranteed to be stable between releases, so a way to do this cleanly would be very helpful.

Reset Saleae when frozen

I do automated measurements using the Saleae Logic Pro 8 and the logic2-automation lib. I have an external trigger to start 10 s of analog measurement. It works quite well, but from time to time, the measurement does not stop properly. I don't get the expected results and the LED of the Saleae Logic Pro 8 stays in this cyan-ish color (instead of switching back to green after the measurement). After such an event, I have to unplug the Saleae to reset it and plug it in to use it again. I haven't found a way to connect to it or reset it after it freezes like that via software. It's a bit cumbersome when I want to do measurements over night and after only a couple of measurements, the Saleae freezes like this.
Is this a known problem? Is there a way to reset the Saleae by software? Would be great to have something like that, so that I could detect the freeze, reset the device and continue my measurements automatically.

[Request] Channel order and channel naming

Logic version: Logic2 v2.3.58 MacOS 12.5 Apple Silicon
API version: logic2_automation-0.0.1-py3

Hi there. It would be great if channel_order: List[int] and channel_names: List[str] lists were added as final parameters of LogicDeviceConfiguration. Currently, channels are sorted in a descending order and first digital then analog, but for industrial automated reporting this feature is crucial. Right now it's possible to add analysers but it's restricted to the ones available (or locally developed), so a naming system would easily solve this.

When `export_raw_data_csv` or `export_raw_data_binary` is called with non-existent direcroy, no Python exception and wrong Logic GUI error message

from saleae import automation
with automation.Manager.connect() as manager:
    device_configuration = automation.LogicDeviceConfiguration(
        enabled_digital_channels=[0, 1, 2, 3],
        digital_sample_rate=10_000_000
    )
    capture_configuration = automation.CaptureConfiguration(
        capture_mode=automation.TimedCaptureMode(duration_seconds=1.0)
    )
    with manager.start_capture(
            device_id='F4241',
            device_configuration=device_configuration,
            capture_configuration=capture_configuration) as capture:
        capture.wait()
        spi_analyzer = capture.add_analyzer('SPI', label=f'Test Analyzer', settings={
            'MISO': 0,
            'Clock': 1,
            'Enable': 2,
            'Bits per Transfer': '8 Bits per Transfer (Standard)'
        })
        capture.export_raw_data_csv(directory="non_existent_directory", digital_channels=[0, 1, 2, 3])
        # the same behavior happens if you call capture.export_raw_data_binary("non_existent_directory")

The Logic GUI shows a popup message which says "failed to create directory":

"failed to create directory" message

but I think the error message should say "directory not found" because in capture.py it says:

Note, the directory parameter is a specific folder that must already exist, and should not include a filename.

Also, the Python program does not throw an exception.

Logic version information:

{"Environment":"production","Branch":"master","Commit":"a59be960fd362c11b73b4cb5105f39676631e868","Version":"2.4.14","AutomationVersion":"1.0.0","MachineID":"19aa4ba2-11aa-4b08-86cc-ecac4ec55058","PID":3572,"LaunchId":"1dd197ae-82fd-4a00-b21f-a8744627229e","Architecture":"x64"}

Package fails to install on M1 Macbook

I'm unable to install the logic2 pip package on my M1 Macbook, log is shown below. My setup is a fresh conda environment with python3.9. I have seen very similar issues around the web related to installing the grpcio package on an M1 mac, but I have no issues installing grpcio and grpcio-tools on their own.

❯ pip install logic2-automation
Looking in indexes: https://pypi.org/simple
Collecting logic2-automation
  Using cached logic2_automation-1.0.6.tar.gz (16 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Installing backend dependencies ... done
  Preparing metadata (pyproject.toml) ... error
  error: subprocess-exited-with-error
  
  × Preparing metadata (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [18 lines of output]
      Traceback (most recent call last):
        File "/opt/homebrew/Caskroom/miniconda/base/envs/test/lib/python3.9/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
          main()
        File "/opt/homebrew/Caskroom/miniconda/base/envs/test/lib/python3.9/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
        File "/opt/homebrew/Caskroom/miniconda/base/envs/test/lib/python3.9/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 152, in prepare_metadata_for_build_wheel
          whl_basename = backend.build_wheel(metadata_directory, config_settings)
        File "/private/var/folders/wl/qfb1dl254zs1hzh9fy09tj_h0000gq/T/pip-build-env-v_rqs5y7/overlay/lib/python3.9/site-packages/hatchling/build.py", line 56, in build_wheel
          return os.path.basename(next(builder.build(wheel_directory, ['standard'])))
        File "/private/var/folders/wl/qfb1dl254zs1hzh9fy09tj_h0000gq/T/pip-build-env-v_rqs5y7/overlay/lib/python3.9/site-packages/hatchling/builders/plugin/interface.py", line 150, in build
          build_hook.initialize(version, build_data)
        File "/private/var/folders/wl/qfb1dl254zs1hzh9fy09tj_h0000gq/T/pip-install-0w5kxo1j/logic2-automation_43bb1a8a38844bc8aab39144467b6387/grpc_build_hook.py", line 22, in initialize
          build_protobufs('./proto')
        File "/private/var/folders/wl/qfb1dl254zs1hzh9fy09tj_h0000gq/T/pip-install-0w5kxo1j/logic2-automation_43bb1a8a38844bc8aab39144467b6387/grpc_build_hook.py", line 2, in build_protobufs
          import grpc_tools.protoc
        File "/private/var/folders/wl/qfb1dl254zs1hzh9fy09tj_h0000gq/T/pip-build-env-v_rqs5y7/normal/lib/python3.9/site-packages/grpc_tools/protoc.py", line 20, in <module>
          from grpc_tools import _protoc_compiler
      ImportError: dlopen(/private/var/folders/wl/qfb1dl254zs1hzh9fy09tj_h0000gq/T/pip-build-env-v_rqs5y7/normal/lib/python3.9/site-packages/grpc_tools/_protoc_compiler.cpython-39-darwin.so, 0x0002): symbol not found in flat namespace '_CFRelease'
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

[Feature request] Capture status and wait timeout

The requests

  1. Add a facultative max_wait_seconds argument to the wait() function to set a max wait time, after which the capture would be stopped
  2. Add a method to query for the capture status (is it still running or has it completed)

The context

I want to use the logic2-automation in a regression testing rack running a github self-hosted runner
In case of firmware bug, the trigger for which the capture is waiting may never occur.

My Current approach

My current approach is to

  1. Setup the capture as timed capture
  2. Trigger the event I am capturing for
  3. Sleep for the max wait time of the event
  4. Call the wait method to forcefully stop the capture.
  5. Parse the csv to see if the trigger occurred
  6. Clean-up the analog capture to remove entry before the trigger

Although my current approach is operational, a max wait time would

  • Accelerate the result acquisition when the trigger occurred before timeout
  • Remove the need for extra processing to get the analog reading starting at trigger

Thanks you and nice job !

Jonathan

No GUI error or Python exception when `legacy_export_analyzer` called with non-existant directory

I hope submitting separate issues for these is helpful to keep track, and not annoying!!!

from saleae import automation

with automation.Manager.connect() as manager:
    device_configuration = automation.LogicDeviceConfiguration(
        enabled_digital_channels=[0, 1, 2, 3],
        digital_sample_rate=10_000_000
    )
    capture_configuration = automation.CaptureConfiguration(
        capture_mode=automation.TimedCaptureMode(duration_seconds=1.0)
    )
    with manager.start_capture(
            device_id='F4241',
            device_configuration=device_configuration,
            capture_configuration=capture_configuration) as capture:
        capture.wait()
        spi_analyzer = capture.add_analyzer('SPI', label=f'Test Analyzer', settings={
            'MISO': 0,
            'Clock': 1,
            'Enable': 2,
            'Bits per Transfer': '8 Bits per Transfer (Standard)'
        })
        capture.legacy_export_analyzer("non_existent_directory/file.csv", spi_analyzer,
                                       automation.RadixType.HEXADECIMAL)

The Logic GUI shows a popup message which says "export complete":

"analyzer export completed" message

And no Python exception is thrown.

As far as I can tell, nothing was actually exported.

Logic version information:

{"Environment":"production","Branch":"master","Commit":"a59be960fd362c11b73b4cb5105f39676631e868","Version":"2.4.14","AutomationVersion":"1.0.0","MachineID":"19aa4ba2-11aa-4b08-86cc-ecac4ec55058","PID":3572,"LaunchId":"1dd197ae-82fd-4a00-b21f-a8744627229e","Architecture":"x64"}

analogSampleRate invalid supplied less than 781250

loginc2 version: 2.4.7
enable automation server
set analogSampleRate = 312500, error happen.
------------error message---------------
path: '/saleae.automation.Manager/StartCapture',
code: 10,
details: '10: Invalid supplied sample rate. Allowed sample rates with channel configuration: {"analog":12500000}, {"analog":6250000}, {"analog":3125000}, {"analog":1562500}, {"analog":781250}, {"analog":3125000}, {"analog":3125000}, {"analog":3125000}, {"analog":3125000}, {"analog":3125000}'

Is there any way to set a lower sampling rate ?

[Request] Automation: Continous capturing

I have the use case that i want to continuously observe 2 UART channels, RX and TX, to be able to process the data with further scripts.

I'm using the "Async Serial" protocol analyzer for this. There is the non-automated terminal view for this, that is quite good for human parsing, but doesn't work flawlessly with more than one UART (Async Serial), as the ordering is not strict and line endings may not be as expected by the plugin.

I wrote a script that runs a task to continuously capture x-second fragments to export them to a file or named pipe and it runs a task that reads from that file for further processing. Between each end and restart of a recapturing there is a small delay that may lead to data loss that are of course unwanted.

It is clear that a "real-time" output is not doable, but at least a way to have a periodically updated stream without data loss would be fine.

Also it would be a good to have a "start" function for a Capture that resets the data, but reuses the capture mode, device configuration and the analyzers and doesn't create new capture tabs in the GUI.

[Feature request] Close running capture on connect or list/stop running capture

The context

On automation.Manager.connect(),
if a previous capture resulted in a crash or if the python script was halted before the close() method was called, the following capture will result in an
saleae.automation.errors.InternalServerError: Cannot switch sessions while recording

The requests

  1. Add a method to check if there is a running capture or conversion
  2. Add a method to stop a capture or conversion started by another thread / process
  3. Add the option to clean_start on the connect() method to automatically stop running capture and have the logic instance ready for capture

Thanks you and nice job !

Jonathan

Manager connect is stuck

From time to time, this call is stuck (at least for 2 min).

with errors._error_handler():
reply: saleae_pb2.GetAppInfoReply = self.stub.GetAppInfo(saleae_pb2.GetAppInfoRequest())

Unfortunately, I can't really reproduce it. I propose to add a timeout to the function call. E.g. a fixed value like

with errors._error_handler():
    reply: saleae_pb2.GetAppInfoReply = self.stub.GetAppInfo(saleae_pb2.GetAppInfoRequest(), timeout=20)

[Feature Request] C++ Wrapper Library

Hi! I need a C++ library and have started implementing one. I've forked the repo and am currently working on the library there.

This is only tested with the demo device (as that's what I have access to at the moment). All code is Apache licensed.

Documentation is pretty sporadic at the moment, but you can get started by doing:

git clone https://github.com/markovejnovic/logic2-automation.git
cd logic2-automation/cpp
mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=Debug .. # Highly recommend debug mode for now...
make

You do need a system install of grpcpp, absl_synchronization and protobuf as well as protoc, but those should be the only dependencies at the moment.

Opening this as an issue so we can have a discussion what your needs and design ideas are. I am mostly aiming at making this conceptually compatible with the Python API with the difference of those context managers becoming RAII objects. I was aiming at mimicking the Python API for the sake of developer familiarity and didn't see too many reasons to deviate. Let me know if you have any better ideas regarding the API :)

I should disclose that this particular piece of code is necessary for my day job, but in order to give this wrapper as big of a chance at being an open source library as possible, I decided to be forwards with this from my own personal resources (hence why this is only tested from the demo device ;)

I'll avoid opening a PR until the C++ API is more feature-complete.

Same import path as logic1 automation

Both logic 2 automation and the legacy logic 1 python-saleae automation can be installed in the same project.

It seems a little short sighted to give both python libraries the same import path, but maybe I am missing something. If the legacy logic 1 automation is used in a large repo, you cannot install both while you incrementally upgrade to logic2 without special installation.

export functions should accept pathlib.Path as a parameter

Hello,

First, congrats for this new automation library, I've been looking at it for quite some times, and now I'have had the opportunity to play a bit with, and it's really cool.

I have a minor issue (more of an inconvenience, really).

I think capture.save_capture(), capture.export_.....() functions should accept pathlib.Path object as parameter, since it is part of the standard library.

my_path = pathlib.Path(os.getcwd()).parent.absolute() # handy
capture = manager.start_capture( ..... )
capture.wait()
capture.save_capture(my_path)

This gives a TypeError: bad argument type for built-in operation (which by the way is not the most clear error ever. . .)

Obviously, the fix could be straightforward :

    def save_capture(self, filepath: str|pathlib.Path):
        """
        Saves the capture to a .sal file, which can be loaded later either through the UI or with the load_capture() function.

        :param filepath: path to the .sal file. Can be absolute, or relative to the Logic 2 software current working directory.
        """
        request = saleae_pb2.SaveCaptureRequest(
            capture_id=self.capture_id, filepath=str(filepath)
        )

Best regards.

Unhandled error in Logic GUI when `save_capture` called with non-existent directory

from saleae import automation

with automation.Manager.connect() as manager:
    device_configuration = automation.LogicDeviceConfiguration(
        enabled_digital_channels=[0, 1, 2, 3],
        digital_sample_rate=10_000_000
    )
    capture_configuration = automation.CaptureConfiguration(
        capture_mode=automation.TimedCaptureMode(duration_seconds=1.0)
    )
    with manager.start_capture(
            device_id='F4241',
            device_configuration=device_configuration,
            capture_configuration=capture_configuration) as capture:
        capture.wait()
        spi_analyzer = capture.add_analyzer('SPI', label=f'Test Analyzer', settings={
            'MISO': 0,
            'Clock': 1,
            'Enable': 2,
            'Bits per Transfer': '8 Bits per Transfer (Standard)'
        })
        capture.save_capture("non_existent_directory/file.sal")

In the Logic 2 GUI, this error message pops up:

"A JavaScript error occurred in the main process" error

When I click the OK button, in the Logic GUI, the popup which says "Compressing save" stays open:

"compressing save" message

Logic version information:

{"Environment":"production","Branch":"master","Commit":"a59be960fd362c11b73b4cb5105f39676631e868","Version":"2.4.14","AutomationVersion":"1.0.0","MachineID":"19aa4ba2-11aa-4b08-86cc-ecac4ec55058","PID":3572,"LaunchId":"1dd197ae-82fd-4a00-b21f-a8744627229e","Architecture":"x64"}

Logic GUI says "export completed" when `export_data_table` called with non-existant directory (Python exception is thrown correctly)

from saleae import automation
with automation.Manager.connect() as manager:
    device_configuration = automation.LogicDeviceConfiguration(
        enabled_digital_channels=[0, 1, 2, 3],
        digital_sample_rate=10_000_000
    )
    capture_configuration = automation.CaptureConfiguration(
        capture_mode=automation.TimedCaptureMode(duration_seconds=1.0)
    )
    with manager.start_capture(
            device_id='F4241',
            device_configuration=device_configuration,
            capture_configuration=capture_configuration) as capture:
        capture.wait()
        spi_analyzer = capture.add_analyzer('SPI', label=f'Test Analyzer', settings={
            'MISO': 0,
            'Clock': 1,
            'Enable': 2,
            'Bits per Transfer': '8 Bits per Transfer (Standard)'
        })
        capture.export_data_table(
            filepath="non_existent_directory/file.csv",
            analyzers=[spi_analyzer]
        )

The Logic GUI shows a popup message which says "export completed":

"export completed" message

but the Python program throws an exception:

saleae.automation.errors.ExportError: Export failed: ios_base::failbit set: iostream stream error

Logic version information:

{"Environment":"production","Branch":"master","Commit":"a59be960fd362c11b73b4cb5105f39676631e868","Version":"2.4.14","AutomationVersion":"1.0.0","MachineID":"19aa4ba2-11aa-4b08-86cc-ecac4ec55058","PID":3572,"LaunchId":"1dd197ae-82fd-4a00-b21f-a8744627229e","Architecture":"x64"}

Breaking on macOS Monterey between v1.0.3 and v1.0.4

The automation API fails to load in version 1.0.4:

$ pip install logic2-automation==1.0.4 --force-reinstall
...
Successfully installed grpcio-1.50.0 grpcio-tools-1.50.0 logic2-automation-1.0.4 protobuf-4.21.9 setuptools-65.5.0 six-1.16.0
$ python3 saleae_example.py
There was an error that occurred while importing grpc/pb modules.
This can be caused by pb files that were generated using an incompatible version of protobuf.
You can regenerate these files by reinstalling logic2-automaation:

     pip --force-reinstall logic2-automation

 Traceback (most recent call last):
  File "/Users/alerao/Documents/ms1-analyzer/saleae_example.py", line 1, in <module>
    from saleae import automation
  File "/Users/alerao/Documents/ms1-analyzer/venv/lib/python3.10/site-packages/saleae/automation/__init__.py", line 12, in <module>
    raise exc from None
  File "/Users/alerao/Documents/ms1-analyzer/venv/lib/python3.10/site-packages/saleae/automation/__init__.py", line 2, in <module>
    from saleae.grpc import saleae_pb2, saleae_pb2_grpc
ModuleNotFoundError: No module named 'saleae.grpc'
$ python saleae_example.py
There was an error that occurred while importing grpc/pb modules.
This can be caused by pb files that were generated using an incompatible version of protobuf.
You can regenerate these files by reinstalling logic2-automaation:

     pip --force-reinstall logic2-automation

 Traceback (most recent call last):
  File "/Users/alerao/Documents/ms1-analyzer/saleae_example.py", line 1, in <module>
    from saleae import automation
  File "/Users/alerao/Documents/ms1-analyzer/venv/lib/python3.10/site-packages/saleae/automation/__init__.py", line 12, in <module>
    raise exc from None
  File "/Users/alerao/Documents/ms1-analyzer/venv/lib/python3.10/site-packages/saleae/automation/__init__.py", line 2, in <module>
    from saleae.grpc import saleae_pb2, saleae_pb2_grpc
ModuleNotFoundError: No module named 'saleae.grpc'

Reinstallation doesn't help, but downgrading to version 1.0.3 makes it work. I haven't had a chance to figure out why, but I thought I'd let you know!

$ pip install logic2-automation==1.0.3 --force-reinstall
...
Successfully installed grpcio-1.50.0 grpcio-tools-1.50.0 logic2-automation-1.0.3 protobuf-4.21.9 setuptools-65.5.0 six-1.16.0
$ python3 saleae_example.py
$ python saleae_example.py

This creates the folders as expected

[Request] Add ability to name the channels

In Logic2 software one can rename the channel to something more meaningful (e.g. UART Tx, GPIO31, 3V3,...) than just channel number. This is later exported and makes work easier.

The API does not provide this option.
I'd propose to extend the LogicDeviceConfiguration with additional list of channel names. That would make life easier.

Thanks

[Request] logic2_automation added to pypi

At this moment it is only possible way to get and work with your automation is by downloading wheel and installing it.
Did you consider adding it to PyPI? It will be easier to get it to the end user :)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.