PyCharm : Issue with pydevd resolver : Traceback error instead of variables values. [Odoo/Openerp v8.0]

Hi,

i came accross this issue today when using PyCharm debug on an openerp v8.0 project :

OS : Ubuntu

Python version : 2.7

PyCharm version : 2019.2.6 community

 

Screenshots :

Error :

Inspection :

Configuration :

 

Code pointed by the error :

def __get__(self, record, owner):
""" return the value of field ``self`` on ``record`` """
if record is None:
return self # the field is accessed through the owner class

if not record:
# null record -> return the null value for this field
return self.null(record.env)

# only a single record may be accessed
record.ensure_one() # LINE 825 ############################### PYDEVD ERROR POINTS HERE ##########################

try:
return record._cache[self]
except KeyError:
pass

# cache miss, retrieve value
if record.id:
# normal record -> read or compute value for this field
self.determine_value(record)
else:
# draft record -> compute the value or let it be null
self.determine_draft_value(record)

# the result should be in cache now
return record._cache[self]

 

Other code pointed by the same error (other line):

@property
def ids(self):
""" List of actual record ids in this recordset (ignores placeholder
ids for records to create)
"""
return filter(None, list(self._ids))

# backward-compatibility with former browse records
_cr = property(lambda self: self.env.cr)
_uid = property(lambda self: self.env.uid)
_context = property(lambda self: self.env.context)

Python packages installed :

Package Version
--------------- -------
Babel 1.3
decorator 3.4.0
docutils 0.12
feedparser 5.1.3
gdata 2.0.18
gevent 1.0.2
greenlet 0.4.7
jcconv 0.2.3
Jinja2 2.7.3
lxml 3.3.5
Mako 1.0.0
MarkupSafe 0.23
mock 1.0.1
passlib 1.6.2
Pillow 2.5.1
pip 20.2.1
psutil 2.1.1
psycogreen 1.0
psycopg2 2.7.1
pydot 1.0.2
pyparsing 1.5.7
pyPdf 1.13
pyserial 2.7
Python-Chart 1.39
python-dateutil 1.5
python-ldap 2.4.15
python-openid 2.2.5
python-stdnum 1.14
pytz 2014.4
pyusb 1.0.0b1
PyYAML 3.11
qrcode 5.0.1
reportlab 3.1.44
requests 2.6.0
setuptools 44.1.1
simplejson 3.5.3
six 1.7.3
unittest2 0.5.1
vatnumber 1.2
vobject 0.6.6
Werkzeug 0.9.6
wheel 0.34.2
xlwt 0.7.5

NB :

- I haven't this issue with Odoo v11.0 / python3 in an other project.

- Odoo v8.0 runs just normal, so no issue related to it.

 

Thank you.

0
4 comments

Hi,

Please update to the latest PyCharm version (2020.2 at the moment) and try again.
If the problem remains, provide some steps for reproducing the problem.

0
Avatar
Permanently deleted user

Same problem on the last version (2020) :

Before the issue :

I just installed odoo v8.0 normally (runs without any problems) then loaded it into a PyCharm project.

if someone is willing to reproduce the problem, this is what you can do to get quickly there :

- start the server in debug mode from PyCharm

- open <odoo8_install_dir>/openerp/addons/base/module/wizard/base_update_translations.py

- put a breakpoint at line 44.

- go to http://localhost:8069 in your browser

- go to "Settings>Translations>Application Terms>Synchronize Terms", choose English or whatever then click "Update".

- Execution will stop at the breakpoint.

- Now in "Debugger" tab, unfold "self" in "Variables" sub-tab and you can (i hope) see the problem.

What i have already tried :

- Changing the working directory.

- Changing from global python to virtual environment.

- Checked if the same happens when stopping on an other breakpoint.

- Deleting/Re-creating the project in all my installed versions of PyCharm (2016, 2019 and after your comment 2020)

 

so any clue please ?

 

 

Thx

 
0
Avatar
Permanently deleted user

Any suggestion/clue will help me investigate the issue further. Thank you.

0
Avatar
Permanently deleted user

I finally came to the conclusion that this issue isn't related to PyCharm. It's related to some old vs new api adaptations in Odoo v8.0 core...

1

Please sign in to leave a comment.