Hi all,
I followed the tutorial here - login
https://frappe.github.io/frappe/user/en/guides/integration/rest_api.html
No matter what I did, same issue.
Found out that I need to pass in application/json, but still same issue
Error when login with rest api [solved] (don’t think same error)
tried with basic auth too
my error
127.0.0.1 - - [10/May/2016 09:02:15] "GET /api/method/login HTTP/1.1" 500 -
Traceback (most recent call last):
File "/home/ericmachine/frappe-bench/apps/frappe/frappe/middlewares.py", line 15, in __call__
return super(StaticDataMiddleware, self).__call__(environ, start_response)
File "/home/ericmachine/frappe-bench/env/lib/python2.7/site-packages/werkzeug/wsgi.py", line 599, in __call__
return self.app(environ, start_response)
File "/home/ericmachine/frappe-bench/env/lib/python2.7/site-packages/werkzeug/wsgi.py", line 599, in __call__
return self.app(environ, start_response)
File "/home/ericmachine/frappe-bench/env/lib/python2.7/site-packages/werkzeug/local.py", line 228, in application
return ClosingIterator(app(environ, start_response), self.cleanup)
File "/home/ericmachine/frappe-bench/env/lib/python2.7/site-packages/werkzeug/wrappers.py", line 291, in application
return f(*args[:-2] + (request,))(*args[-2:])
File "/home/ericmachine/frappe-bench/apps/frappe/frappe/app.py", line 82, in application
response = handle_exception(e)
File "/home/ericmachine/frappe-bench/apps/frappe/frappe/app.py", line 146, in handle_exception
response = frappe.website.render.render("message", http_status_code=http_status_code)
File "/home/ericmachine/frappe-bench/apps/frappe/frappe/website/render.py", line 58, in render
data = add_csrf_token(data)
File "/home/ericmachine/frappe-bench/apps/frappe/frappe/website/render.py", line 230, in add_csrf_token
frappe.local.session.data.csrf_token))
AttributeError: 'NoneType' object has no attribute 'data'
any help? Thanks.