Help with tryton Windows 11 install

Hello and thanks in advance

I have installed:

  • postgress for database and created a blank database to store tryton info
  • desktop client x64
  • tryton and trytond python packages

Yet i do not know how can i connect client with database or what am i missing, please help!

You do not because the client is connecting to the server only. It is a 3-tier architecture.

I imagine that Windows 11 is not that much different from Windows 10, so take a look at How install Tryton in Windows 10? (Regular and Anaconda) and Is it possible to install tryton server on a windows desktop?. But read the whole threads to understand how Tryton is working and how it possible will work on Windows.

1 Like

Did you initialize the database after creating it in postgres? you can check the command to init the database here: How to setup a database — trytond latest documentation

Did you started the server process? You need to pass the config file path when you start it (How to start the server — trytond latest documentation), and the minimum viable configuration is just:

[database]
uri = postgresql://user:password@127.0.0.1/

But i suggest you read the documentation Configuration file for Tryton — trytond latest documentation to change the configuration based on your setup

If you still cannot see the database, is possible that your database user cannot access the template0/template1 db. Those are use for list all available initialized tryton dbs, so auto-discovery of tryton dbs will not work (at least in the past). But you can force manually the db name you want to access on the client.

Windows specific:
If you like the performace, and the database is in the same Windows machine… use “127.0.0.1” instead of “localhost”. Anywhay it will work wither way… but you will notice the difference :smiley:

1 Like

Thanks all. @ced @edbo @wifasoi i have read and tried some commands from the suggested threads and after i ran server and started the client this is what the desktop app gives me back. I believe it has to do with the database but it is currently running (i have pgadmin opened right now) logged with the same user/password i stated on the config file i am feeding to tryton. The user is the database’s owner on Properties.

Traceback (most recent call last):
File “C:/msys64/home/ced/tryton-6.4-64/tryton/jsonrpc.py”, line 277, in __request
File “C:/msys64/mingw64/lib/python3.10/xmlrpc/client.py”, line 1166, in request
File “C:/msys64/mingw64/lib/python3.10/xmlrpc/client.py”, line 1196, in single_request
xmlrpc.client.ProtocolError: <ProtocolError for localhost:8000/tryton_db_karel/: 404 NOT FOUND>

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “C:/msys64/home/ced/tryton-6.4-64/tryton/gui/main.py”, line 249, in do_activate
File “C:/msys64/home/ced/tryton-6.4-64/tryton/common/common.py”, line 1020, in init
File “C:/msys64/home/ced/tryton-6.4-64/tryton/rpc.py”, line 85, in login
File “C:/msys64/mingw64/lib/python3.10/xmlrpc/client.py”, line 1122, in call
File "C:/msys64/home/ced/tryton-6.4-64/tryton/json


After a few tries now the error is different, i actually see a connection to the database.

Traceback (most recent call last):
File “C:/msys64/home/ced/tryton-6.4-64/tryton/gui/main.py”, line 249, in do_activate
File “C:/msys64/home/ced/tryton-6.4-64/tryton/common/common.py”, line 1020, in init
File “C:/msys64/home/ced/tryton-6.4-64/tryton/rpc.py”, line 85, in login
File “C:/msys64/mingw64/lib/python3.10/xmlrpc/client.py”, line 1122, in call
File “C:/msys64/home/ced/tryton-6.4-64/tryton/jsonrpc.py”, line 304, in __request
tryton.jsonrpc.Fault: no existe la relación «ir_cache»
LINE 1: SELECT “a”.“timestamp”, “a”.“name” FROM “ir_cache” AS “a”
^

Fault: no existe la relación «ir_cache»
LINE 1: SELECT “a”.“timestamp”, “a”.“name” FROM “ir_cache” AS “a”

Here comes Wintendo specialist herrdeh… :joy: Actually, I succeeded in a Win$ install of Tryton this morning, so you may want to try this checklist:

## One-machine install on MS Windows

Install
+ postgresql from https://www.postgresql.org/download/windows/
+ python from https://www.python.org/downloads/

Call PgAdmin and create a user role with password and a database. Enter the appropriate environment variable for python if necessary.

In the terminal:
$ python -m venv --system-site-packages [name-of-new-environment] # for example "try-60-prod" for "version 6.0 productive".

Change to the environment and activate it:
cd [name-of-virtual-environment]/scripts
activate

Update pip:
$ python pip install --upgrade pip

Install Tryton.

To install a specific version, use two equal signs:

$ python pip install trytond==5.4.* # installs the latest Trytond version from the 5.4 series.

To install the latest version, use:

$ pip install trytond

Install psycopg2-binary:

$ pip install psycopg2-binary

In your virtual environment, create a file "trytond.conf" in the "Scripts" directory with the following content:

[database]
uri = postgresql://[name-of-database-user]:[database-password]@127.0.0.1:5432/
language = en

(You wrote down the data above - correct??)

Install the list of modules you want to use:
$ python pip install -r [list-of-modules.txt].

Individual modules can be installed like this:

$ python pip install trytond_%% # "%%%" means the name of the module you want to use.

Make sure you are in your virtual environment and it is activated. Register the database in your VENV, the database will now be populated with the basic tables and data:

$ python Scripts\trytond-admin -c trytond.conf -d [your-database] --all -vv

Start the Tryton daemon with:

$ (your-virtual-environment)/Scripts $ trytond -c trytond.conf -d [name-of-new-database].

In the Tryton client you can now connect to the database. There you use 127.0.1 as hostname and [name-of-new-database] as database.



Translated with www.DeepL.com/Translator (free version)

All credits for this concept go to Sir @edbo, all mistakes are mine.

1 Like

You did not initialize the database: How to setup a database — trytond latest documentation

1 Like

Thanks all. I tried the guide from scratch and already have a server up. I am looking forward to work with this app

Yes, that was one of my mistakes and then for some reason (something i missed) the activate DB step was not asking for admin password. I am a bit newbie. Anyway started all over and all is good now, thanks very much. :slight_smile:

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