Error configuring new database

I am running into an error when I try to activate my modules on a brand new database. The only difference to my usual setup is that I am running the server with uwsgi.

The traceback is below.
Traceback (most recent call last):
File “/usr/local/lib/python35/dist-packages/trytond/wsgipy”, line 71, in dispatch_request
return endpoint(request, **requestview_args)
File “/usr/local/lib/python35/dist-packages/trytond/protocols/dispatcherpy”, line 41, in rpc
request, database_name, *requestrpc_params)
File “/usr/local/lib/python35/dist-packages/trytond/wsgipy”, line 42, in auth_required
return wrapped(*args, **kwargs)
File “/usr/local/lib/python35/dist-packages/trytond/protocols/wrapperspy”, line 122, in wrapper
return func(request, pool, *args, **kwargs)
File “/usr/local/lib/python35/dist-packages/trytond/protocols/dispatcherpy”, line 140, in _dispatch
obj, method = get_object_method(request, pool)
File “/usr/local/lib/python35/dist-packages/trytond/protocols/dispatcherpy”, line 125, in get_object_method
return poolget(name, type=type), method
File “/usr/local/lib/python35/dist-packages/trytond/poolpy”, line 177, in get
return self_pool[selfdatabase_name][type][name]
KeyError: ‘companycompanyconfig’

It’s strange that my client does not print any “dots” or is that the server?

The trytond server autoreloads the Pool when installing new modules so new models are available on it.

But this is not the case for uwsgi and the server should be restarted in order to reload the pool for the database.

The traceback shows that the problem is that new models are not available on the pool, so restaring the uwsgi server should fix it

When you say installing do you mean “activating”? But if that is what you mean then how do you activate and stop the configuration half way?

Oh, you mean after trytond-admin … --all?

Yes, it was renamed on recent versions and I stil have to change my mind…

Yes, you have to restart the server before the configuration wizard is launched.

Another option is to use trytond-admin to activate the modules (and its dependencies), restar the server and follow the wizard on the gui (it will be launched automatically on frist admin login)

Thank you - I had missed that new option for 4.8. It is well documented on the setup data base page.

Do you think it is possible to fix that? Because for me, it is a problem for the Docker image which uses uwsgi.

The uwsgi documentation includes a topic about graceful reloading. Don’t know if this will fix the problem but I agree that will be best to have the same behaviour on the docker images.

I do not think it is the right feature. This feature is the pending of --dev option which is not required as long as any new module is installed (which is never the case for a Docker image).

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