Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fails with unexpected keyword argument 'session_id' in latest openerp (trunk, ~8.0) #2

Open
vaab opened this issue Jan 28, 2014 · 2 comments

Comments

@vaab
Copy link
Member

vaab commented Jan 28, 2014

Here's the full python (server side exception):

Traceback (most recent call last):
  File "/home/vaab/devel/python/0k-oe/openobject-server/openerp/http.py", line 321, in dispatch
    response["result"] = self._call_function(**self.params)
  File "/home/vaab/devel/python/0k-oe/openobject-server/openerp/http.py", line 195, in _call_function
    return self.func(*args, **kwargs)
TypeError: authenticate() got an unexpected keyword argument 'session_id'

Removing the session_id from authenticate params will produce then a second similar exception:

Traceback (most recent call last):
  File "/home/vaab/devel/python/0k-oe/openobject-server/openerp/http.py", line 321, in dispatch
    response["result"] = self._call_function(**self.params)
  File "/home/vaab/devel/python/0k-oe/openobject-server/openerp/http.py", line 194, in _call_function
    return checked_call(self.db, *args, **kwargs)
  File "/home/vaab/devel/python/0k-oe/openobject-server/openerp/service/model.py", line 111, in wrapper
   return f(dbname, *args, **kwargs)
  File "/home/vaab/devel/python/0k-oe/openobject-server/openerp/http.py", line 189, in checked_call
    return self.func(*a, **kw)
TypeError: search_read() got an unexpected keyword argument 'session_id'

So it seems the API changed in the ~8.0 series of OpenERP.

@dakermit
Copy link

Hello, I am stumbling upon the same error using the 8.0 series of OpenERP. Any leads towards a solution anyone?

many thanks

@vaab
Copy link
Member Author

vaab commented Apr 15, 2015

Ok, just bumped into the same issue with some python lib I'm working on.
On version 7.0, you had to provide a session_id which was used to identify the session, despite already having another 'Cookie' value that hold another session_id.

Simply removing the session_id from the arguments should suffice (but then you'll be incompatible with version 7.0, with a message stating that it can't find your database, as the database info are retrieved thanks to the session id.)

Do you need me to provide a patch ? I might not have any time soon. But a PR would be welcomed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants