wt-io-it / odoo-pycharm-plugin

Plugin to Support Odoo in Pycharm
GNU Affero General Public License v3.0
19 stars 10 forks source link

Unknown string value class: class com.jetbrains.python.psi.impl.PyDictLiteralExpressionImpl #20

Closed omarouhari closed 2 years ago

omarouhari commented 2 years ago

Plugin Version: 0.5.11 IDEA Version: PyCharm 2021.2.2

java.lang.Throwable: Unknown string value class: class com.jetbrains.python.psi.impl.PyDictLiteralExpressionImpl ``` java.lang.Throwable: Unknown string value class: class com.jetbrains.python.psi.impl.PyDictLiteralExpressionImpl at com.intellij.openapi.diagnostic.Logger.error(Logger.java:182) at at.wtioit.intellij.plugins.odoo.models.OdooModelUtil.getStringValueForValueChild(OdooModelUtil.java:101) at at.wtioit.intellij.plugins.odoo.models.OdooModelUtil.detectName(OdooModelUtil.java:42) at at.wtioit.intellij.plugins.odoo.models.OdooModelUtil.detectName(OdooModelUtil.java:28) at at.wtioit.intellij.plugins.odoo.models.index.OdooModelDefinition.(OdooModelDefinition.java:17) at at.wtioit.intellij.plugins.odoo.models.index.OdooModelFileIndex$OdooModelFileIndexer.lambda$mapWatched$0(OdooModelFileIndex.java:114) at at.wtioit.intellij.plugins.odoo.PsiElementsUtil.walkTree(PsiElementsUtil.java:50) at at.wtioit.intellij.plugins.odoo.models.index.OdooModelFileIndex$OdooModelFileIndexer.mapWatched(OdooModelFileIndex.java:111) at at.wtioit.intellij.plugins.odoo.index.OdooDataIndexer.lambda$map$0(OdooDataIndexer.java:13) at at.wtioit.intellij.plugins.odoo.index.IndexWatcher.runIndexJob(IndexWatcher.java:14) at at.wtioit.intellij.plugins.odoo.index.OdooDataIndexer.map(OdooDataIndexer.java:13) at at.wtioit.intellij.plugins.odoo.index.OdooDataIndexer.map(OdooDataIndexer.java:9) at com.intellij.util.indexing.impl.MapReduceIndex.mapByIndexer(MapReduceIndex.java:328) ... at com.intellij.util.concurrency.BoundedTaskExecutor$1.run(BoundedTaskExecutor.java:184) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) ... at java.base/java.lang.Thread.run(Thread.java:829) ```
bigbear3001 commented 2 years ago

@omarouhari thanks for reporting this. When trying to reproduce this issue (with Odoo + OCA source code) i didn't really succeed. My best guess would be that there is some Odoo Model defined like this:

class MyModel(models.Model):
    ...
    _inherit = { ... }
    ...

Can you confirm this and could you send me an (reduced anonymized if not open source) extract of the model definition for the test cases?

ap-wtioit commented 2 years ago

version 0.5.13 was just approved, this should be fixed when the plugin is updated