urequests.post OSError: [Errno 5] EIO

All ESP8266 boards running MicroPython.
Official boards are the Adafruit Huzzah and Feather boards.
Target audience: MicroPython users with an ESP8266 board.
Post Reply
nishizu
Posts: 2
Joined: Wed Apr 05, 2017 8:42 am

urequests.post OSError: [Errno 5] EIO

Post by nishizu » Wed Apr 05, 2017 9:12 am

Hello!

I'm trying to "port" a simple script to send a notification using pushbullet from my esp8266.

Here is the original python code:

[code]
import requests
import json

body = "Corpo"
title = "Titolo"

data_send = {"type": "note", "title": title, "body": body}
API_KEY = "xxxxxxxxxxxxxxxxxxxxxxxx"

resp = requests.post('https://api.pushbullet.com/v2/pushes', data=json.dumps(data_send), headers={'Authorization': 'Bearer ' + API_KEY, 'Content-Type': 'application/json'})
[/code]

if i replace requests with urequests and i try this code on esp8266 i get this error:

[code]
ssl_handshake_status: -256
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "urequests.py", line 104, in post
File "urequests.py", line 56, in request
OSError: [Errno 5] EIO
[/code]

I'm kinda new to micropython, i hope someone could help me understand more (or just send me in the right direction) :)

Post Reply