OCA / interface-github

Tools to interact with github from Odoo
GNU Affero General Public License v3.0
46 stars 77 forks source link

Sync object repo raise `AttributeError: 'Organization' object has no attribute 'owner'` #82

Closed simahawk closed 1 year ago

simahawk commented 2 years ago

I'm getting this on OCA instance:

Odoo Server Error
Traceback (most recent call last):
  File "/path/to/src/odoo/odoo/addons/base/models/ir_http.py", line 237, in _dispatch
    result = request.dispatch()
  File "/path/to/src/odoo/odoo/http.py", line 685, in dispatch
    result = self._call_function(**self.params)
  File "/path/to/src/odoo/odoo/http.py", line 361, in _call_function
    return checked_call(self.db, *args, **kwargs)
  File "/path/to/src/odoo/odoo/service/model.py", line 94, in wrapper
    return f(dbname, *args, **kwargs)
  File "/path/to/src/odoo/odoo/http.py", line 349, in checked_call
    result = self.endpoint(*a, **kw)
  File "/path/to/src/odoo/odoo/http.py", line 914, in __call__
    return self.method(*args, **kw)
  File "/path/to/src/odoo/odoo/http.py", line 533, in response_wrap
    response = f(*args, **kw)
  File "/path/to/src/odoo/addons/web/controllers/main.py", line 1398, in call_button
    action = self._call_kw(model, method, args, kwargs)
  File "/path/to/src/odoo/addons/web/controllers/main.py", line 1386, in _call_kw
    return call_kw(request.env[model], method, args, kwargs)
  File "/path/to/src/odoo/odoo/api.py", line 399, in call_kw
    result = _call_kw_multi(method, model, args, kwargs)
  File "/path/to/src/odoo/odoo/api.py", line 386, in _call_kw_multi
    result = method(recs, *args, **kwargs)
  File "/path/to/src/interface-github/github_connector/wizards/wizard_load_github_model.py", line 36, in button_create_from_github
    my_obj = github_model.create_from_name(wizard.name)
  File "/path/to/src/interface-github/github_connector/models/abstract_github_model.py", line 214, in create_from_name
    res = self.get_odoo_data_from_github(gh_obj)
  File "/path/to/src/interface-github/github_connector/models/github_repository.py", line 132, in get_odoo_data_from_github
    organization = organization_obj.get_from_id_or_create(gh_data=gh_data.owner)
Exception

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/path/to/src/odoo/odoo/http.py", line 641, in _handle_exception
    return super(JsonRequest, self)._handle_exception(exception)
  File "/path/to/src/odoo/odoo/http.py", line 317, in _handle_exception
    raise exception.with_traceback(None) from new_cause
AttributeError: 'Organization' object has no attribute 'owner'

No time to investigate now. Just tracking the problem. We should probably pin the right github lib version.

CC @sbidoul

github-actions[bot] commented 1 year ago

There hasn't been any activity on this issue in the past 6 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days. If you want this issue to never become stale, please ask a PSC member to apply the "no stale" label.