[Errno 0] Error when trying to open asy00 on python

I’m trying to write a script to process serial port input. When running the script on a WR31 the above error appears

Full Code:
import sys, select, socket

fr = open(“asy/00”, “r”)
fw = socket.socket( socket.AF_INET, socket.SOCK_STREAM)
fw.connect((‘104.152.164.20’,1999));
input = [fr]
while 1:
inputready,outputready,exceptready = select.select(input,[],[], 1.1)

for d in inputready:
        if d == fr:
         data = d.read()
        if data:
         fw.write(data) #Echo the data that was read
         fw.flush() #Send the data to the serial port

print("tick")

Hi i tried this on my wr31 here

the script is a bit wrong as i think you had FW,write / flush was for the serial interface and not the socket.

this worked for me do you have something else locking the serial or the socket you are using.

regards

James