Getting message: AttributeError: 'socket' object has not attribute 'readline'
johncblacker opened this issue · 5 comments
Running on uPy 1.13, specifically an openmv port running on a stm32 f765 (looks like a pyboard). Trying to connect to my normal email server (spectrum email) and am using port 587 and running the "simple" example. My guess is that the socket is not being created, but I really don't know. Here's how I have your code setup right now:
msg = sock.read(200)
print('msg: ', msg)
code = int(msg[:3])
print('code: ', code)
#sock.settimeout(DEFAULT_TIMEOUT)
sock.readline()
The print of msg shows:
msg: b'220 p-impout009.msg.pkvw.co.charter.net cmsmtp ESMTP server ready\r\n'
which seems to me that everything is OK? But if that were the case I wouldn't be getting the Attribute... message. I have tried your code on a esp32 board and it worked fine. This openmv board doesn't have internet, so I'm using a WINC1500 shield to connect to my wifi. My wifi connects fine and in fact I can run one of their examples that streams a shapshot from a camera via webserver code to my browser and it works fine - does use sockets, BTW. Both of these boards are using uPy 1.13, but obviously different ports. Do you have any ideas regarding what I can do to get around my problem?
What is the line number from which this error occurs?
I currently don't have a uPy-capable board. If you can make umail work under uPy, I will be happy to open a new branch for your code.
Closed to inactivity.