Hello!
I am starting with tryton and would like to have a simple sqlite-database for the very beginning. Unfortunately, I don’t seem to be able to get up and running.
I have installed tryton 4.6.5 from the Ubuntu repos on Ubuntu 18.04.
From what I can read in the manual, sqlite should be the default option for the data-backend, so no more configuration needed, right?
trytond is running in the background, so I start tryton. This gives me the possibility to connect to demo.4.6.tryton.org, which works just fine.
However, I cannot create a new database, neither from the login manager nor do I find an option to do so from the command line.
Please help: how can I ‘connect’ to a local, empty sqlite database?
SQLite is there only to support the development for quick testing.
So I suggest you to start directly by using postgresql.
Here is the documentation to setup the database.
Remarks to create the database:
with SQLite, you must create an empty file in the database path,
with PostgreSQL, you must run the command createdb.
Regarding the path: I tried that. I set the path property to my own home directory and created both ‘tryton.db’ and ‘tryton.sqlite’ (both empty). Then in the login manager, I set host to ‘localhost’, database to ‘tryton’ and leave the user name empty. When I try to connect I get a python traceback claiming that ‘tryton.sqlite’ is missing?!
You must initialize the database with trytond-admin as describe in the documentation.
The user name created by the initialization is admin and the password will be asked by trytond-admin.
I think we should consider giving appropriate error messages. If the configuration file is not found or readable I think trytond should not start, instead of starting with some default values.
In my case trytond didn’t notify me of failing to access the configuration file, I think. At least, I haven’t found any notice, even after enabling verbose output.
Maybe it would be a good idea to print any such message to stderr ? It would have helped me greatly!
While I do get some output, the only message related to trytond.conf is:
20715 140622628394816 [2018-08-28 09:41:16,693] INFO trytond.config using as configuration files
This output is obtained regardless if trytond.conf is available or not. Of course it’s possible I overlook something here, but I don’t see any message I would interpret as ‘no configuration file found’…