Bug in picosdk-python-wrappers/picosdk/device.py

Having problems ? let us know the details here
Post Reply
Posts: 1
Joined: Tue Jan 24, 2023 2:50 pm

Bug in picosdk-python-wrappers/picosdk/device.py

Post by Q-RGr »

Hi folks,

I am just getting started with automating PicoScope measurements with Python. I have opted to use the functionalities provided in picosdk-python-wrappers/picosdk/device.py for now, but it seems I found a bug.

When calling capture_block(timebase, channel_config), the software will call set_channels(*channel_configs). This in turn will call set_channel(channel_config) for every channel_config in channel_configs.

The problem I get is that I only pass one channel config to capture_block, as I only use one channel. I have observed that instead of passing the whole config to set_channel, it will pass the elements of my config to set_channel one after the other, so it will call set_channel(channel_config.name, and then crash, because it just passed a string instead of a ChannelConfig and doesn't know how to proceed.

I can adapt the code for my own use because for the foreseeable I will be working with just one channel, but lack the python proficiency to solve the problem for all use cases (single channel config and multiple configs). So I thought I'd let somebody know, in case I am not simply doing something wrong.

Post Reply