# pyupdi 1s timeout in readline

I just installed pyupdi and it works, but is very slow. I googled this and AVRfreaks says something about delay settings which seems irrelevant in my case (while the delay settings account for 30ms, I'm seeing something that accounts for 2s). In my case, what I see is that the readline() commands in physical.py are timing out. If I reduce the timeout value here:

self.ser = serial.Serial(port, baud, parity=serial.PARITY_EVEN, timeout=1, stopbits=serial.STOPBITS_TWO)


Then it speeds up dramatically and still seems to work. While it is much faster, timeouts are a symptom of some more serious problem. There should not be timeouts in normal operation. readline() should be used if the answer is newline terminated. Timeout is an error because there is no newline. (If there wasn't supposed to be a newline at the end, then a byte limit would be passed to read() so that it returns immediately when it has the expected amount of data.)

What have I not configured properly?