# Error configuring new database

**URL:** https://discuss.tryton.org/t/error-configuring-new-database/727
**Category:** Developer
**Created:** [September 13, 2018, 4:56am UTC](https://discuss.tryton.org/t/error-configuring-new-database/727 "2018-09-13T04:56:38Z")
**Posts on this page:** 11
**Page:** 1

<div class="post-metadata">

### Author: ![vincent](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/vincent/32/29_2.png) [@vincent](https://discuss.tryton.org/u/vincent)
#### Post date: [September 13, 2018, 4:56am UTC](https://discuss.tryton.org/t/error-configuring-new-database/727/1 "2018-09-13T04:56:38Z")

</div>

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’

---

<div class="post-metadata">

### Author: ![vincent](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/vincent/32/29_2.png) [@vincent](https://discuss.tryton.org/u/vincent)
#### Post date: [September 13, 2018, 9:25am UTC](https://discuss.tryton.org/t/error-configuring-new-database/727/2 "2018-09-13T09:25:29Z")

</div>

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

---

<div class="post-metadata">

### Author: ![pokoli](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/pokoli/32/22_2.png) [@pokoli](https://discuss.tryton.org/u/pokoli)
#### Post date: [September 13, 2018, 10:58am UTC](https://discuss.tryton.org/t/error-configuring-new-database/727/3 "2018-09-13T10:58:31Z")

</div>

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

---

<div class="post-metadata">

### Author: ![vincent](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/vincent/32/29_2.png) [@vincent](https://discuss.tryton.org/u/vincent)
#### Post date: [September 13, 2018, 11:11am UTC](https://discuss.tryton.org/t/error-configuring-new-database/727/4 "2018-09-13T11:11:41Z")

</div>

> [@pokoli](#):
>
> The trytond server autoreloads the Pool when installing new modules so new models are available on 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?

---

<div class="post-metadata">

### Author: ![vincent](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/vincent/32/29_2.png) [@vincent](https://discuss.tryton.org/u/vincent)
#### Post date: [September 13, 2018, 11:16am UTC](https://discuss.tryton.org/t/error-configuring-new-database/727/5 "2018-09-13T11:16:18Z")

</div>

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

---

<div class="post-metadata">

### Author: ![pokoli](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/pokoli/32/22_2.png) [@pokoli](https://discuss.tryton.org/u/pokoli)
#### Post date: [September 13, 2018, 11:28am UTC](https://discuss.tryton.org/t/error-configuring-new-database/727/6 "2018-09-13T11:28:28Z")

</div>

> [@vincent](#):
>
> When you say installing do you mean “activating”?

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

> [@vincent](#):
>
> But if that is what you mean then how do you activate and stop the configuration half way?

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)

---

<div class="post-metadata">

### Author: ![vincent](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/vincent/32/29_2.png) [@vincent](https://discuss.tryton.org/u/vincent)
#### Post date: [September 13, 2018, 11:44am UTC](https://discuss.tryton.org/t/error-configuring-new-database/727/7 "2018-09-13T11:44:50Z")

</div>

> [@pokoli](#):
>
> 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](http://doc.tryton.org/4.8/trytond/doc/topics/setup_database.html#topics-setup-database).

---

<div class="post-metadata">

### Author: ![ced](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/ced/32/1237_2.png) [@ced](https://discuss.tryton.org/u/ced)
#### Post date: [September 13, 2018, 3:45pm UTC](https://discuss.tryton.org/t/error-configuring-new-database/727/8 "2018-09-13T15:45:08Z")

</div>

> [@pokoli](#):
>
> 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.

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

---

<div class="post-metadata">

### Author: ![pokoli](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/pokoli/32/22_2.png) [@pokoli](https://discuss.tryton.org/u/pokoli)
#### Post date: [September 17, 2018, 9:53am UTC](https://discuss.tryton.org/t/error-configuring-new-database/727/9 "2018-09-17T09:53:11Z")

</div>

> [@ced](#):
>
> 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](https://uwsgi-docs.readthedocs.io/en/latest/articles/TheArtOfGracefulReloading.html#standard-default-boring-graceful-reload-aka-sighup). 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.

---

<div class="post-metadata">

### Author: ![ced](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/ced/32/1237_2.png) [@ced](https://discuss.tryton.org/u/ced)
#### Post date: [September 17, 2018, 10:08am UTC](https://discuss.tryton.org/t/error-configuring-new-database/727/10 "2018-09-17T10:08:09Z")

</div>

> [@pokoli](#):
>
> The uwsgi documentation includes [a topic about graceful reloading](https://uwsgi-docs.readthedocs.io/en/latest/articles/TheArtOfGracefulReloading.html#standard-default-boring-graceful-reload-aka-sighup).

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).

---

<div class="post-metadata">

### Author: ![system](https://discuss-cdn.tryton.org/uploads/default/original/1X/c6f8ec0a40525cdcd50058c734283450a4b3d38b.png) [@system](https://discuss.tryton.org/u/system)
#### Post date: [October 17, 2018, 10:08am UTC](https://discuss.tryton.org/t/error-configuring-new-database/727/11 "2018-10-17T10:08:10Z")

</div>

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