python – File not discovered error : Unable to entry serial port (linked to webcam) in jupyter lab (browser) – in MacOS Monterey

0
11


import serial 
from serial.instruments import list_ports
from serial import Serial

port = record(list_ports.comports())
for p in port:
    print(p.gadget)

Output:

/dev/cu.wlan-debug

/dev/cu.OnePlusBudsZ

/dev/cu.Bluetooth-Incoming-Port

ser = serial.Serial(
    # Serial Port to learn the information from
    port="/dev/cu.usbserial-110",baudrate = 115200,
    #Making use of Parity Checking (none on this case)
    parity=serial.PARITY_NONE,
   # Sample of Bits to be learn
    stopbits=serial.STOPBITS_ONE,
    # Whole variety of bits to be learn
    bytesize=serial.EIGHTBITS,
    # Variety of serial instructions to simply accept earlier than timing out
    timeout=1)
# Pause this system for 1 second to keep away from overworking the serial port
whereas 1:
        x=ser.readline()
        print(x)

Hii. I needed to entry a webcamera by serial port utilizing python. Beforehand, I had completed this and the record of ports confirmed this ‘/dev/cu.usbserial-110 ‘ as one of many ports. Now, once I re-run this system after a month, I’m unable to search out this port and It reveals FileNotFoundError. I’m a newbie in python and want your assist.enter image description here

LEAVE A REPLY

Please enter your comment!
Please enter your name here