Trytond-admin error

Was trying to initialize my database and this thing happen, yaay.

Traceback (most recent call last):
  File "/home/project/.local/bin/trytond-admin", line 7, in <module>
    exec(compile(f.read(), __file__, 'exec'))
  File "/home/project/name/trytond/bin/trytond-admin", line 23, in <module>
    admin.run(options)
  File "/home/project/name/trytond/trytond/admin.py", line 53, in run
    pool.init(update=options.update, lang=list(lang),
  File "/home/project/name/trytond/trytond/pool.py", line 164, in init
    restart = not load_modules(
                  ^^^^^^^^^^^^^
  File "/home/project/name/trytond/trytond/modules/__init__.py", line 441, in load_modules
    _load_modules(update)
  File "/home/project/artikularsalus/trytond/trytond/modules/__init__.py", line 411, in _load_modules
    load_module_graph(graph, pool, update, lang)
  File "/home/project/name/trytond/trytond/modules/__init__.py", line 238, in load_module_graph
    cls.__register__(module)
  File "/home/project/name/trytond/trytond/modules/party/party.py", line 85, in __register__
    super(Party, cls).__register__(module_name)
  File "/home/project/name/trytond/trytond/model/modelsql.py", line 217, in __register__
    super(ModelSQL, cls).__register__(module_name)
  File "/home/project/name/trytond/trytond/model/model.py", line 129, in __register__
    Translation.register_fields(cls, module_name)
  File "/home/project/name/trytond/trytond/ir/translation.py", line 181, in register_fields
    insert(field, 'field', name, field.string)
  File "/home/project/name/trytond/trytond/ir/translation.py", line 175, in insert
    cursor.execute(
  File "/home/project/name/trytond/trytond/backend/postgresql/database.py", line 74, in execute
    cursor.execute(self, sql, args)
psycopg2.errors.UniqueViolation: duplicate key value violates unique constraint "ir_translation_pkey"
DETAIL:  Key (id)=(1) already exists.

Which version are you using? (looks like a version <7.0)
It looks like your database has already records in the table ir_translation but the table sequence has not been incremented.

I am using trytond 6.0.51 , i’ve been deleting my database and re-initialized, but it keeps happening.

You must drop the database to be sure.
Also ensure that the template1 (the default template) is not filled with tables etc.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.