lancejenkinza / singletouch Goto Github PK
View Code? Open in Web Editor NEWExample code to upload test data to SingleTouch
Example code to upload test data to SingleTouch
Hi,
I have been trying to get this python code to work but it end with keyerror: client_id
the error output is
`
127.0.0.1 - - [22/Sep/2020 23:24:09] "POST /authorize HTTP/1.1" 302 -
127.0.0.1 - - [22/Sep/2020 23:24:32] "GET /B2C_1_singletouch-callback?state=VqnA2HYfqTg273fkcngb8XdUvOW1sD&code=eyJraWQiOiJjcGltY29yZV8wOTI1MjAxNSIsInZlciI6IjEuMCIsInppcCI6IkRlZmxhdGUiLCJzZXIiOiIxLjAifQ..nOUsbmot7KHxGcGa.I0kI7Ppoku4Q5qllJYn2uxEDP3pd6MdlQoqLJq-UKdX6TaZDHz9792X3Z_kSCIxNq33sH0U6B1ncEXvOLJi_0EvbjyYroB_3FCcz4XNS0EE3vzh-ZaZkDTSzy4ZkYxfEdskGIlZpGSQ6aVLaLowVLUCP5ix9VokQDIM1OmPp_OFIwCz0UB0zvOKZLhDsSaCzBqZUiU5PiODZUytnWnyZgy2qZrD_PLgfrRf__FhfxGvV3UmIea1Doe5CKma8wHGjcOtTUrJOGYdTrlqmV7ujLM130sVCERdLD80zM-_34L3sId87j-VgwXwAWJAoV5RuNVHeFIaTy8_EgWx-Y9g3A1fnZIZR88RFfr2N9-ewPfoWji9aX-3CTmXET2YN9bnE47UvZ6L91euovDCYNf7rvJA2RC6eEcX3ICp8vVVgZ6ofwAjp9qf5Gbeohs_kCNUB8hrQdrwr_RjskufgNJnSlVx0hOR_xsV05GUW7cPbO_RKZSUyqWb6lGwueHZCgzshyrZB1qU9n9AwzuPAwRd2DxvD49CZdNImdebq8mcLMIeCkXX2OcGlgsGhOvWdU8LDiSfL4XNmakHVWYcBFFnj97Kv.-zyMR5RrQBNIRoorFE-ofg HTTP/1.1" 500 -
Traceback (most recent call last):
File "/home/peter/.local/lib/python3.6/site-packages/flask/app.py", line 2463, in call
return self.wsgi_app(environ, start_response)
File "/home/peter/.local/lib/python3.6/site-packages/flask/app.py", line 2449, in wsgi_app
response = self.handle_exception(e)
File "/home/peter/.local/lib/python3.6/site-packages/flask/app.py", line 1866, in handle_exception
reraise(exc_type, exc_value, tb)
File "/home/peter/.local/lib/python3.6/site-packages/flask/_compat.py", line 39, in reraise
raise value
File "/home/peter/.local/lib/python3.6/site-packages/flask/app.py", line 2446, in wsgi_app
response = self.full_dispatch_request()
File "/home/peter/.local/lib/python3.6/site-packages/flask/app.py", line 1951, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/home/peter/.local/lib/python3.6/site-packages/flask/app.py", line 1820, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/home/peter/.local/lib/python3.6/site-packages/flask/_compat.py", line 39, in reraise
raise value
File "/home/peter/.local/lib/python3.6/site-packages/flask/app.py", line 1949, in full_dispatch_request
rv = self.dispatch_request()
File "/home/peter/.local/lib/python3.6/site-packages/flask/app.py", line 1935, in dispatch_request
return self.view_functionsrule.endpoint
File "/mnt/d/workspace/singletouch/singletouch.py", line 64, in auth_callback
client_id = session.pop("client_id")
File "/home/peter/.local/lib/python3.6/site-packages/werkzeug/datastructures.py", line 269, in pop
rv = super(UpdateDictMixin, self).pop(key)
KeyError: 'client_id'
127.0.0.1 - - [22/Sep/2020 23:24:32] "GET /B2C_1_singletouch-callback?debugger=yes&cmd=resource&f=style.css HTTP/1.1" 200 -
127.0.0.1 - - [22/Sep/2020 23:24:33] "GET /B2C_1_singletouch-callback?debugger=yes&cmd=resource&f=jquery.js HTTP/1.1" 200 -
127.0.0.1 - - [22/Sep/2020 23:24:33] "GET /B2C_1_singletouch-callback?debugger=yes&cmd=resource&f=debugger.js HTTP/1.1" 200 -
127.0.0.1 - - [22/Sep/2020 23:24:33] "GET /B2C_1_singletouch-callback?debugger=yes&cmd=resource&f=ubuntu.ttf HTTP/1.1" 200 -
127.0.0.1 - - [22/Sep/2020 23:24:33] "GET /B2C_1_singletouch-callback?debugger=yes&cmd=resource&f=console.png HTTP/1.1" 200 -
127.0.0.1 - - [22/Sep/2020 23:24:34] "GET /B2C_1_singletouch-callback?debugger=yes&cmd=resource&f=console.png HTTP/1.1" 200 -
`
I get this error after entering the client_id and client_secret.
What am I doing wrong?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.