Cedric, thanks for your reply. I downloaded the wrong sao, now it runs the web interface without there “Version Mismatch”.
However, I am failing to connect with the database. The database I created does not appear in the selection window.
I have been trying to diagnose with Google Gemini and have narrowed it down to the trytond seems to be looking for an sql lite database.
Here is the latest from Google Gemini:
Despite all this, it’s still trying to connect to a SQLite database! This means that even though your tryton.cfg
is being loaded, the PostgreSQL URI within it is not being recognized or used by the database connection logic in trytond-admin
.
This is a very strange situation. Here are a few more ideas to try and understand why the URI might be ignored:
- Check
trytond-admin
for Forced SQLite: Carefully examine thetrytond-admin
script again for any code that might be explicitly setting the database backend to SQLite or constructing a SQLite URI regardless of the configuration file. Look for imports or usage ofsqlite.database
. - Examine
trytond/config.py
(within your virtual environment): Thetrytond.config
module is responsible for loading the configuration. There might be a specific way it handles URIs or a potential bug. You can try looking at the source code of this module (it will be inC:\Tryton Virtual Environment\.venv\Lib\site-packages\trytond\config.py
) to see if there’s any logic that might explain this behavior. - Try Setting Database Parameters Individually in
tryton.cfg
(as a Test): Instead of using theuri
setting, try setting thehost
,port
,user
,password
, anddatabase
parameters individually in the[database]
section of yourtryton.cfg
file. Comment out theuri
line. This might force Tryton to use the traditional parameter-based connection method instead of relying on URI parsing.
[database]
# uri = postgresql://postgres:post_pass@localhost:5432/Trytond_db
host = localhost
port = 5432
user = postgres
password = post_pass
database = Trytond_db
list_database = True
Then, run the trytond-admin
command again.
This is a very puzzling issue, as it seems the configuration file is being loaded, but the URI within it is not being used for the database connection in trytond-admin
. Trying the individual parameters might help us understand if the problem is specifically with URI parsing within this tool.
Any help would be much appreciated.