Skip to content
This repository was archived by the owner on Nov 26, 2025. It is now read-only.
This repository was archived by the owner on Nov 26, 2025. It is now read-only.

RUNTIMEERROR: READING FROM SERIAL DEVICE FAILED - Sweeppy #133

@ennemoser

Description

@ennemoser

Dear Scanse Community,

I am using the scanse sweep lidar on Windows with python. When I start the example python code it runs fine for a while and then stops and throws me the error below. It seems it can't retrieve sweep.getscan() from the init__.py and makes the scan stop. Does anyone know how to avoid this exception and to continue the scan?

quick start example code:

from sweeppy import Sweep

with Swee p('/dev/ttyUSB0') as sweep:
sweep.start_scanning()

for scan in sweep.get_scans():
    print('{}\n'.format(scan))

this is the error and that stops the loop:

Traceback (most recent call last):
File "C:/Users/benja/PycharmProjects/LidarUDP/LIDAR_UDP_Unity.py", line 9, in
for scan in sweep.get_scans():
File "C:\Users\benja\AppData\Roaming\Python\Python36\site-packages\sweeppy-1.3.0-py3.6.egg\sweeppy_init__.py", line 207, in getscans
RuntimeError: reading from serial device failed
-->

sweep firmware version

libsweep version + affected bindings

operating system

Windows with Python

Platform/Hardware Setup

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions