Migrating 3.6 to 3.8

59 views
Skip to first unread message

Jonan

unread,
Oct 27, 2016, 1:00:11 PM10/27/16
to tryton
Hello,

   Currently running 3.6 and trying to upgrade to 3.8. Is there any upgrade guide like previous releases ?

So far I am running into the following two problems when updating with:   trytond --all. Any suggestions to fix ?

The first is a warning about constraint. This constraint already exists and dropping or recreating does not make any difference:
----------------------------------------

17535 140673640511232 [2016-10-27 16:15:42,473] INFO trytond.modules ir:register ir.module.module
17535 140673640511232 [2016-10-27 16:15:42,841] WARNING trytond.backend.postgresql.table unable to add 'unique (name)'
 constraint on table ir_module_module !
If you want to have it, you should update the records and execute manually:
ALTER table "ir_module_module" ADD CONSTRAINT "ir_module_module_name_uniq" unique (name)


The second is the following exception:
---------------------------------------------------

17535 140673640511232 [2016-10-27 16:15:44,354] INFO trytond.modules ir:register ir.module.module.config
Traceback (most recent call last):
  File "./trytond/bin/trytond", line 80, in <module>
    server.TrytonServer(options).run()
  File "/home/dev/tryton-hg/3.8/trytond/trytond/server.py", line 112, in run
    Pool(db_name).init(update=self.options.update, lang=lang)
  File "/home/dev/tryton-hg/3.8/trytond/trytond/pool.py", line 155, in init
    lang=lang)
  File "/home/dev/tryton-hg/3.8/trytond/trytond/modules/__init__.py", line 427, in load_modules
    _load_modules()
  File "/home/dev/tryton-hg/3.8/trytond/trytond/modules/__init__.py", line 394, in _load_modules
    load_module_graph(graph, pool, update, lang)
  File "/home/dev/tryton-hg/3.8/trytond/trytond/modules/__init__.py", line 241, in load_module_graph
    module_state=package_state)
  File "/home/dev/tryton-hg/3.8/trytond/trytond/convert.py", line 417, in __init__
    Module = pool.get('ir.module')
  File "/home/dev/tryton-hg/3.8/trytond/trytond/pool.py", line 172, in get
    return self._pool[self.database_name][type][name]
KeyError: 'ir.module'


-Jonan

Sergio Morillo

unread,
Oct 28, 2016, 3:35:03 AM10/28/16
to tryton
Seems there is some conflict with the versions you are working with. Model "ir.module.module" becomes "ir.module" in version 3.8.
Could be an old trytond installed on python path/virtualenv?
 

-Jonan

Cédric Krier

unread,
Oct 28, 2016, 4:05:03 AM10/28/16
to tryton
On 2016-10-27 09:44, Jonan wrote:
> Hello,
>
> Currently running 3.6 and trying to upgrade to 3.8. Is there any upgrade
> guide like previous releases ?
>
> So far I am running into the following two problems when updating with:
> trytond --all. Any suggestions to fix ?
>
> The first is a warning about constraint. This constraint already exists and
> dropping or recreating does not make any difference:
> ----------------------------------------
>
> 17535 140673640511232 [2016-10-27 16:15:42,473] INFO trytond.modules
> ir:register ir.module.module
> 17535 140673640511232 [2016-10-27 16:15:42,841] WARNING
> trytond.backend.postgresql.table unable to add 'unique (name)'
> constraint on table ir_module_module !
> If you want to have it, you should update the records and execute manually:
> ALTER table "ir_module_module" ADD CONSTRAINT "ir_module_module_name_uniq"
> unique (name)

I think you still have a directory trytond/ir/module with .pyc (one
reason to use a proper package manager :-)
You must remove this folder.

About the migration procedure if needed are published at:
https://discuss.tryton.org/c/migration

--
Cédric Krier - B2CK SPRL
Email/Jabber: cedric...@b2ck.com
Tel: +32 472 54 46 59
Website: http://www.b2ck.com/

Jonan

unread,
Oct 31, 2016, 5:45:04 AM10/31/16
to tryton
That was it. Need to remember and cleanup pyc when switching between branches. Thanks to you both !

-Jonan
Reply all
Reply to author
Forward
0 new messages