Odoo Help


How to get value of qr code on terminal ?

Manish Bohra
on 12/2/17, 3:53 AM 385 views

Hello Everyone , 

I have to try to get value of qr code into my terminal.

My code below :

url = 'https://api.qrd.by/qrcodes?key=4dc8620e9a198dc9b6a636dc1325a81f'
self.test_1 = url
print "URL:::", self.test_1
payload = {}
print "Payload::::", payload
r = requests.get(url)
self.test_2 = r
print "TEST::::::::::::", self.test_2
# GET with params in URL
p = requests.get(url, params=payload)
self.test_2 = p
print "Payload::::", self.test_2
# POST with form-encoded data
s = requests.post(url, data=payload)
# POST with JSON
t = requests.post(url, data=json.dumps(payload))
# Response, status etc
data = json.loads(t.text)
#self.test_2 = data
#print "DATA::::", self.test_2
# print json.dumps(data, indent=4, sort_keys=True)
print"QR CODE RESULT:::::", data['result']['geotags'][0]['qr']

and its show error on terminal :

  r = adapter.send(request, **kwargs)
  File "/usr/lib/python2.7/dist-packages/requests/adapters.py", line 385, in send
    raise SSLError(e)
SSLError: hostname 'api.qrd.by' doesn't match 'app.qrc.es'

so any solution.

Thanks in Advanced.

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


Asked: 12/2/17, 3:53 AM
Seen: 385 times
Last updated: 12/2/17, 11:10 AM