Error: Exception message: invalid http version, 0x7fdaa227cd50"<html>"
Michal-Szczepaniak opened this issue · comments
Exception message: invalid http version, 0x7fdaa227cd50"<html>" Exception type: [ProtocolError]
i compiled example but can't run it it throws straight this error
did you slurp secket.key
file? if so, make sure no extra new line in your secket.key
file
Yes i did and no there is no extra new line. Same code and same secret.key file works on different machine with different os (older package)
I should add
OS that code works on:
openSUSE Leap (fixed release)
OS that code doesn't work on
openSUSE Tumbleweed (rolling release so latest packages)
use strip
from strutils
to remove extra characters from secret key
for ex:
from strutils import strip
const API_KEY = slurp("secret.key").strip()
i have no idea why this worked but this worked
some time extra \r
or \n
or both added to url will makes HTTP requerst malformed. I think its a httpclient's bug.
but i swear same file works on different pc lol
strange.. but Im glad it worked ❤️