Setup Troubles - Database, Server and Client on Windows 10

Okay! Lets see where I’ve gone wrong…

I’m on Windows 10 home, I’ve installed trytond with pip on python37. And Tryton 5.2 prebuilt desktop client.

I start with a directory ‘D:\Dropbox\Controller\TrytonDatabase’, which contains:
config.ini
logconf.ini
training.sqlite
trytond.log

config.ini:
[web]
listen = localhost:8000
num_proxies = 0
cache_timeout = 43200
[database]
uri = sqlite://
path = D:\Dropbox\Controller\TrytonDatabase
list = True
retry = 5
languagen = en
timeout = 1800
[request]
max_size = 2097152‬
max_size_authenticated = 2147483648
[cache]
model = 200
record = 2000
field = 100
clean_timeout = 300
[queue]
worker = False
[ssl]
[email]
uri = smtp://localhost:25
[session]
authentications = password
max_age = 2592000
timeout = 300
max_attempt = 5
max_attempt_ip_network = 300
ip_network_4 = 32
ip_network_6 = 56
[password]
length = 8
entropy = 0.75
reset_timeout = 56400
[bus]
allow_subscribe = False
long_polling_timeout = 300
cache_timeout = 5
select_timeout = 5
[html]
src = https://cloud.tinymce.com/stable/tinymce.min.js

logconf.ini:
[formatters]
keys=simple
[handlers]
keys=rotate,console
[loggers]
keys=root
[formatter_simple]
format=%(asctime)s] %(levelname)s:%(name)s:%(message)s
datefmt=%a %b %d %H:%M:%S %Y
[handler_rotate]
class=handlers.TimedRotatingFileHandler
args=(‘D:/Dropbox/Controller/TrytonDatabase/trytond.log’, ‘D’, 1, 30)
formatter=simple
[handler_console]
class=StreamHandler
formatter=simple
args=(sys.stdout,)
[logger_root]
level=INFO
handlers=rotate,console

training.sqlite:
just a blank file

trytond.log
just a blank file

Then I execute in an Admin PowerShell:
py -3 C:\Python37\Scripts\trytond-admin -c D:\Dropbox\Controller\TrytonDatabase\config.ini -d training --logconf D:\Dropbox\Controller\TrytonDatabase\logconf.ini --all -p

I get a bunch of warnings, and then enter nothing for admin email, and ‘admin’ for the password. Log file has this:

Fri Sep 13 13:08:38 2019] INFO:server:using D:\Dropbox\Controller\TrytonDatabase\logconf.ini as logging configuration file
Fri Sep 13 13:10:49 2019] INFO:server:using D:\Dropbox\Controller\TrytonDatabase\logconf.ini as logging configuration file
Fri Sep 13 13:11:24 2019] INFO:server:using D:\Dropbox\Controller\TrytonDatabase\logconf.ini as logging configuration file
Fri Sep 13 13:11:25 2019] WARNING:py.warnings:C:\Python37\lib\site-packages\trytond\backend\sqlite\table.py:309: UserWarning: Unable to remove not null with SQLite backend
  warnings.warn('Unable to remove not null with SQLite backend')
Fri Sep 13 13:11:25 2019] WARNING:py.warnings:C:\Python37\lib\site-packages\trytond\backend\sqlite\table.py:244: UserWarning: Unable to drop foreign key with SQLite backend
  warnings.warn('Unable to drop foreign key with SQLite backend')
Fri Sep 13 13:11:25 2019] WARNING:py.warnings:C:\Python37\lib\site-packages\trytond\backend\sqlite\table.py:314: UserWarning: Unable to add constraint with SQLite backend
  warnings.warn('Unable to add constraint with SQLite backend')
Fri Sep 13 13:11:25 2019] WARNING:py.warnings:C:\Python37\lib\site-packages\trytond\backend\sqlite\table.py:175: UserWarning: Unable to set default on column with SQLite backend
  warnings.warn('Unable to set default on column with SQLite backend')
Fri Sep 13 13:11:25 2019] WARNING:py.warnings:C:\Python37\lib\site-packages\trytond\backend\sqlite\table.py:307: UserWarning: Unable to set not null with SQLite backend
  warnings.warn('Unable to set not null with SQLite backend')
Fri Sep 13 13:11:25 2019] WARNING:py.warnings:C:\Python37\lib\site-packages\trytond\backend\sqlite\table.py:241: UserWarning: Unable to add foreign key with SQLite backend
  warnings.warn('Unable to add foreign key with SQLite backend')
Fri Sep 13 13:11:25 2019] WARNING:py.warnings:C:\Python37\lib\site-packages\trytond\backend\sqlite\table.py:317: UserWarning: Unable to drop constraint with SQLite backend
  warnings.warn('Unable to drop constraint with SQLite backend')
Fri Sep 13 13:11:25 2019] WARNING:py.warnings:C:\Python37\lib\site-packages\trytond\backend\sqlite\table.py:283: UserWarning: Unable to create index with parameters
  warnings.warn('Unable to create index with parameters')

Then I execute in and Admin PowerShell:
py -3 C:\Python37\Scripts\trytond -c D:\Dropbox\Controller\TrytonDatabase\config.ini --logconf D:\Dropbox\Controller\TrytonDatabase\logconf.ini

I get this warning:
“C:\Python37\lib\site-packages\trytond_init_.py:15: UserWarning: Timezone must be set to UTC instead of Eastern Standard Time
warnings.warn(‘Timezone must be set to UTC instead of %s’ % time.tzname[0])”

And the server appears to start with these new lines in the log:

Fri Sep 13 13:25:05 2019] INFO:server:using D:\Dropbox\Controller\TrytonDatabase\logconf.ini as logging configuration file
Fri Sep 13 13:25:06 2019] INFO:trytond.modules:ir:registering classes
Fri Sep 13 13:25:06 2019] INFO:trytond.modules:res:registering classes
Fri Sep 13 13:25:06 2019] INFO:trytond.modules:tests:registering classes
Fri Sep 13 13:25:06 2019] INFO:werkzeug: * Running on http://localhost:8000/ (Press CTRL+C to quit)

Then when I try to connect with tryton 5.2 client, I can’t:

And with the connection attempt there is this additional line in the log:

Fri Sep 13 13:32:18 2019] INFO:werkzeug:127.0.0.1 - - [13/Sep/2019 13:32:18] "POST / HTTP/1.1" 200 -

Is it the warnings?
Can I log the client somehow?
Why would there be a 200 response if no connection?

Thanks for any help that can be given,
Cheers,
Chris

This is because SQLite is for developer fast testing than real usage.

This is important to change otherwise datetime will have offsets.

This is the message when the server answers with no version or no databases. But as the first request seems to be answered with success, it may be due to a socket error on the client side.
You should have more information by activate -l DEBUG when starting the client.

Thanks for the quick reply Cédric,

Ok so maybe on the client side, actually I was having the same connection difficulty with postgresql, so thought I’d just use SQLite to remove the chance I had set the database up incorrectly.

I have the windows precompiled .exe version of the client, I can’t figure out how to run it with -l DEBUG option, possible?

Just launch: tryton.exe -l DEBUG

Thanks for the assistance Cédric.

I couldn’t figure out how to get a debug output from the tryton client on windows.

Sooooooo I ended up switching over to linux and so far everything has been working as per the documentation.