Error configparser.MissingSectionHeaderError:

Freebsd 13.2 Tryton 6.8 File contains no section headers. file: ‘/home/gmo/Tryton/trytond.conf’, line: 4 ‘sqlite:// /usr/local/lib/python3.9/sqlite3/init.py\n’

Could you share the contents of your trytond.conffile (remove all sensitive info).
It seems the file is not correctly defined which causes the error

Thank you for replying
I am sure I configured something wrong but could figure things out.
Postgresql15 works fine in a separate jail.

(.venv) [gmo@gmoslaptop ~/Tryton]$ env/bin/trytond-admin -c /home/gmo/Tryton/trytond.conf -d /home/gmo/Tryton/db/test_db --all

Traceback (most recent call last):
  File "/usr/home/gmo/Tryton/env/bin/trytond-admin", line 25, in <module>
    config.update_etc(options.configfile)
  File "/usr/home/gmo/Tryton/env/lib/python3.9/site-packages/trytond/config.py", line 127, in update_etc
    read_files = self.read(configfile)
  File "/usr/local/lib/python3.9/configparser.py", line 697, in read
    self._read(fp, filename)
  File "/usr/local/lib/python3.9/configparser.py", line 1085, in _read
    raise MissingSectionHeaderError(fpname, lineno, line)
configparser.MissingSectionHeaderError: File contains no section headers.
file: '/home/gmo/Tryton/trytond.conf', line: 4
'sqlite:// /usr/local/lib/python3.9/sqlite3/__init__.py\n'
#[database]
# connect to postgresql using a TCIP/IP port
#uri = postgresql://tryton:trydb@10.0.0.126:5432
sqlite:// /usr/local/lib/python3.9/sqlite3/__init__.py
path:// /home/gmo/Tryton/db

[web]
listen=0.0.0.0:8000

#[session]
#authentications = password

Thanks

You should not comment out the database section.

I guess you want to use SQLite so it should be like

[database]
uri=sqlite://
path=/home/gmo/Tryton/db

see Configuration file for Tryton — Tryton server for more information about the database configuration.

Thanks for the reading
I tried a lot of combinations.

[database]
# connect to postgresql using a TCIP/IP port
#uri = postgresql://tryton:trydb@10.0.0.126:5432
uri = sqlite:// /usr/local/lib/python3.9/sqlite3/__init__.py
path:// /home/gmo/Tryton/db

[web]
listen=0.0.0.0:8000

#[session]
#authentications = password
[gmo@gmoslaptop ~/Tryton]$ env/bin/trytond-admin -c /home/gmo/Tryton/trytond.conf -d /home/gmo/Tryton/db/test_db --all
Traceback (most recent call last):
  File "/usr/home/gmo/Tryton/env/bin/trytond-admin", line 31, in <module>
    admin.run(options)
  File "/usr/home/gmo/Tryton/env/lib/python3.9/site-packages/trytond/admin.py", line 31, in run
    database.connect()
  File "/usr/home/gmo/Tryton/env/lib/python3.9/site-packages/trytond/backend/sqlite/database.py", line 363, in connect
    self._make_uri(), uri=True,
  File "/usr/home/gmo/Tryton/env/lib/python3.9/site-packages/trytond/backend/sqlite/database.py", line 436, in _make_uri
    if not os.path.isfile(db_path):
  File "/usr/local/lib/python3.9/genericpath.py", line 30, in isfile
    st = os.stat(path)
TypeError: stat: path should be string, bytes, os.PathLike or integer, not NoneType
[gmo@gmoslaptop ~/Tryton]$ 

and

[database]
# connect to postgresql using a TCIP/IP port
#uri = postgresql://tryton:trydb@10.0.0.126:5432
uri = sqlite://
path:// /home/gmo/Tryton/db
[gmo@gmoslaptop ~/Tryton]$ env/bin/trytond-admin -c /home/gmo/Tryton/trytond.conf -d /home/gmo/Tryton/db/test_db --all
Traceback (most recent call last):
  File "/usr/home/gmo/Tryton/env/bin/trytond-admin", line 31, in <module>
    admin.run(options)
  File "/usr/home/gmo/Tryton/env/lib/python3.9/site-packages/trytond/admin.py", line 31, in run
    database.connect()
  File "/usr/home/gmo/Tryton/env/lib/python3.9/site-packages/trytond/backend/sqlite/database.py", line 363, in connect
    self._make_uri(), uri=True,
  File "/usr/home/gmo/Tryton/env/lib/python3.9/site-packages/trytond/backend/sqlite/database.py", line 436, in _make_uri
    if not os.path.isfile(db_path):
  File "/usr/local/lib/python3.9/genericpath.py", line 30, in isfile
    st = os.stat(path)
TypeError: stat: path should be string, bytes, os.PathLike or integer, not NoneType

Just curious
I keep having to ‘Skip the password; email me a login link’. New status or the tryton login does not like KeepassXC/Firefox

Thanks

With SQLite backend, the database name is the name of the file without .sqlite extension but you have to create the file prior to initialize trytond. This can be done just with touch /home/gmo/Tryton/db/test_db.sqlite.