Skip to Content
Menu
This question has been flagged
2 Replies
1317 Views

I loaded with `python odoo-bin --addons-path=addons -c /etc/odoo.conf` for v13.0, and it works just fine

As my database is empty, added the param at the end like this for master
`python odoo-bin --addons-path=addons -c /etc/odoo.conf -i base`

I am hoping to find a way to resolve this without re-cloning..

2022-11-08 13:23:25,480 338303 ERROR __dbname__ odoo.modules.registry: Failed to load registry
2022-11-08 13:23:25,481 338303 ERROR __dbname__ odoo.http: Exception during request handling.
Traceback (most recent call last):
  File "/odoo_root/odoo_local/odoo/odoo/modules/registry.py", line 65, in __new__
    return cls.registries[db_name]
  File "", line 2, in __getitem__
  File "/odoo_root/odoo_local/odoo/odoo/tools/func.py", line 87, in locked
    return func(inst, *args, **kwargs)
  File "/odoo_root/odoo_local/odoo/odoo/tools/lru.py", line 34, in __getitem__
    a = self.d[obj]
KeyError: '__dbname__'
During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/odoo_root/odoo_local/odoo/odoo/tools/convert.py", line 547, in _tag_root
    f(rec)
  File "/odoo_root/odoo_local/odoo/odoo/tools/convert.py", line 448, in _tag_record
    record = model._load_records([data], self.mode == 'update')
  File "/odoo_root/odoo_local/odoo/odoo/models.py", line 4364, in _load_records
    records = self._load_records_create([data['values'] for data in to_create])
  File "/odoo_root/odoo_local/odoo/odoo/models.py", line 4286, in _load_records_create
    return self.create(values)
  File "", line 2, in create
  File "/odoo_root/odoo_local/odoo/odoo/api.py", line 410, in _model_create_multi
    return create(self, arg)
  File "/odoo_root/odoo_local/odoo/odoo/addons/base/models/ir_config_parameter.py", line 106, in create
    return super(IrConfigParameter, self).create(vals_list)
  File "", line 2, in create
  File "/odoo_root/odoo_local/odoo/odoo/api.py", line 410, in _model_create_multi
    return create(self, arg)
  File "/odoo_root/odoo_local/odoo/odoo/models.py", line 3921, in create
    records = self._create(data_list)
  File "/odoo_root/odoo_local/odoo/odoo/models.py", line 4124, in _create
    cr.execute(
  File "/odoo_root/odoo_local/odoo/odoo/sql_db.py", line 315, in execute
    res = self._obj.execute(query, params)
psycopg2.errors.UniqueViolation: duplicate key value violates unique constraint "ir_config_parameter_key_uniq"
DETAIL: Key (key)=(mail.catchall.alias) already exists.


Avatar
Discard
Best Answer

It’s because your database wasn’t empty based off the last line of the traceback. 

Key (key)=(mail.catchall.alias) already exists.

When switching between versions, make sure you start with a fresh database otherwise you will run into a lot of issues like this. 

Avatar
Discard
Author Best Answer

I resolved it by deleting the database and recreating

Avatar
Discard