添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
相关文章推荐
重感情的蛋挞  ·  Proteus KeyError - ...·  7 月前    · 
爱笑的葫芦  ·  Proteus ...·  7 月前    · 
俊秀的大葱  ·  Proteus ...·  7 月前    · 
着急的小马驹  ·  仿真软件Proteus8.11 ...·  7 月前    · 
失眠的荒野  ·  Magento Open ...·  6 月前    · 
没有腹肌的松鼠  ·  python input ...·  1 年前    · 
唠叨的领结  ·  Methods of Importing ...·  1 年前    · 
I can’t access the “analytic_account_account” table with proteus.

Code:

from proteus import Model
Analytic = Model.get('analytic_account.account')

Error:

Traceback (most recent call last):
  File "/.../env_tryton/reprise-donnees-jm/migration.py", line 41, in <module>
    Analytic.create_analytics()
  File "/.../env_tryton/reprise-donnees-jm/Controllers/analytic.py", line 23, in create_analytics
    Analytic = Model.get('analytic_account.account')
  File "/.../env_tryton/lib/python3.9/site-packages/proteus/__init__.py", line 760, in get
    class Spam(Model, metaclass=MetaModelFactory(name, config=config)()):
  File "/.../env_tryton/lib/python3.9/site-packages/proteus/__init__.py", line 481, in __new__
    proxy = self.config.get_proxy(self.model_name)
  File "/.../env_tryton/lib/python3.9/site-packages/proteus/config.py", line 299, in get_proxy
    return TrytondProxy(name, self, type=type)
  File "/.../env_tryton/lib/python3.9/site-packages/proteus/config.py", line 225, in __init__
    self._object = config.pool.get(name, type=type)
  File "/.../env_tryton/lib/python3.9/site-packages/trytond/pool.py", line 188, in get
    return self._pool[self.database_name][type][name]
KeyError: 'analytic_account.account'

The analytic account module is installed correctly, the table is present in the database.

I have no problem with other table like “account_account”, “product_template”, “party_party”…

What’s going on here ?

proteus version = 6.4
tryton version = 6.4