Hello,
I am trying to access /web/session/authenticate using python as:
>>> import requests
>>> import json
>>> url = "http://localhost:8089/web/session/authenticate"
>>> headers = {'Content-Type':'application/json'}
>>> data = json.dumps({"params":{"db":"test","login":"admin","password":"admin"}})
>>> r = requests.post(url=url,data=data,headers=headers)
but it gives me following error:
@page { margin: 2cm } p { margin-bottom: 0.25cm; line-height: 115% }
b'{"jsonrpc":
"2.0", "id": null, "error": {"code":
404, "message": "404: Not Found", "data":
{"name": "werkzeug.exceptions.NotFound", "debug":
"Traceback (most recent call last):\\n File
\\"/usr/local/sampada/eclipse-workspace/odoo12/odoo/http.py\\",
line 656, in _handle_exception\\n return super(JsonRequest,
self)._handle_exception(exception)\\n File
\\"/usr/local/sampada/eclipse-workspace/odoo12/odoo/http.py\\",
line 314, in _handle_exception\\n raise
pycompat.reraise(type(exception), exception, sys.exc_info()[2])\\n
File
\\"/usr/local/sampada/eclipse-workspace/odoo12/odoo/tools/pycompat.py\\",
line 87, in reraise\\n raise value\\n File
\\"/usr/local/sampada/eclipse-workspace/odoo12/odoo/http.py\\",
line 1460, in _dispatch_nodb\\n func, arguments =
self.nodb_routing_map.bind_to_environ(request.httprequest.environ).match()\\n
File
\\"/usr/local/lib/python3.6/dist-packages/werkzeug/routing.py\\",
line 1563, in match\\n raise
NotFound()\\nwerkzeug.exceptions.NotFound: 404: Not Found\\n",
"message": "404: Not Found", "arguments":
[], "exception_type": "internal_error"},
"http_status": 404}}
After changing config file as dbfilter = test gives me following error:
b'{"jsonrpc": "2.0", "id": null, "error": {"code": 100, "message": "Odoo Session Expired", "data": {"name": "odoo.http.SessionExpiredException", "debug": "Traceback (most recent call last):\\n File \\"/usr/local/sampada/eclipse-workspace/odoo12/odoo/http.py\\", line 656, in _handle_exception\\n return super(JsonRequest, self)._handle_exception(exception)\\n File \\"/usr/local/sampada/eclipse-workspace/odoo12/odoo/http.py\\", line 314, in _handle_exception\\n raise pycompat.reraise(type(exception), exception, sys.exc_info()[2])\\n File \\"/usr/local/sampada/eclipse-workspace/odoo12/odoo/tools/pycompat.py\\", line 87, in reraise\\n raise value\\n File \\"/usr/local/sampada/eclipse-workspace/odoo12/addons/http_routing/models/ir_http.py\\", line 346, in _dispatch\\n cls._authenticate(func.routing[\'auth\'])\\n File \\"/usr/local/sampada/eclipse-workspace/odoo12/odoo/addons/base/models/ir_http.py\\", line 118, in _authenticate\\n getattr(cls, \\"_auth_method_%s\\" % auth_method)()\\n File \\"/usr/local/sampada/eclipse-workspace/odoo12/odoo/addons/base/models/ir_http.py\\", line 91, in _auth_method_user\\n raise http.SessionExpiredException(\\"Session expired\\")\\nodoo.http.SessionExpiredException: Session expired\\n", "message": "Session expired", "arguments": ["Session expired"], "exception_type": "internal_error"}}}
after clearing history, cookies and destroying sessions of user still same error occur