Need help with configuration file

377 views
Skip to first unread message

Manipal Singh

unread,
Mar 9, 2016, 7:35:04 PM3/9/16
to tryton
Hey,

I'm new to Tryton and I'm having some problem setting my trytond.conf file.
I'm getting some errors:
Traceback (most recent call last):
  File "../trytond/bin/trytond", line 80, in <module>
    server.TrytonServer(options).run()
  File "/home/manipalsingh/Documents/github/tryton/trytond/trytond/server.py", line 81, in run
    Database = backend.get('Database')
  File "/home/manipalsingh/Documents/github/tryton/trytond/trytond/backend/__init__.py", line 30, in get
    ep, = pkg_resources.iter_entry_points('trytond.backend', db_type)
ValueError: need more than 0 values to unpack

I have created a database named "demo" having a table named "abc" which has a field "age" in it.
Here is what I have written in trytond.conf file:
[database]
uri = sqlite3://127.0.0.1:8008
path = /home/manipalsingh/Documents/github/tryton/tryton/demo

[session]
super_pwd = 9nvAIv9/qUUI6


I think I'm doing something wrong, don't know what, need help.....

Cédric Krier

unread,
Mar 9, 2016, 7:55:04 PM3/9/16
to tryton
On 2016-03-09 16:24, Manipal Singh wrote:
> Hey,
>
> I'm new to Tryton and I'm having some problem setting my trytond.conf file.
> I'm getting some errors:
> Traceback (most recent call last):
> File "../trytond/bin/trytond", line 80, in <module>
> server.TrytonServer(options).run()
> File
> "/home/manipalsingh/Documents/github/tryton/trytond/trytond/server.py",
> line 81, in run
> Database = backend.get('Database')
> File
> "/home/manipalsingh/Documents/github/tryton/trytond/trytond/backend/__init__.py",
> line 30, in get
> ep, = pkg_resources.iter_entry_points('trytond.backend', db_type)
> ValueError: need more than 0 values to unpack
>
> I have created a database named "demo" having a table named "abc" which has
> a field "age" in it.
> Here is what I have written in trytond.conf file:
> [database]
> uri = sqlite3://127.0.0.1:8008

The backend name is sqlite not sqlite3

> path = /home/manipalsingh/Documents/github/tryton/tryton/demo
>
> [session]
> super_pwd = 9nvAIv9/qUUI6

--
Cédric Krier - B2CK SPRL
Email/Jabber: cedric...@b2ck.com
Tel: +32 472 54 46 59
Website: http://www.b2ck.com/

Manipal Singh

unread,
Mar 10, 2016, 3:05:05 AM3/10/16
to tryton
I'm getting this error now:


Traceback (most recent call last):
  File "../trytond/bin/trytond", line 80, in <module>
    server.TrytonServer(options).run()
  File "/home/manipalsingh/Documents/github/tryton/trytond/trytond/server.py", line 79, in run
    self.start_servers()
  File "/home/manipalsingh/Documents/github/tryton/trytond/trytond/server.py", line 195, in start_servers
    self.jsonrpcd.append(JSONRPCDaemon(hostname, port, ssl))
  File "/home/manipalsingh/Documents/github/tryton/trytond/trytond/protocols/jsonrpc.py", line 395, in __init__
    self.server = server_class((interface, port), handler_class, 0)
  File "/home/manipalsingh/Documents/github/tryton/trytond/trytond/protocols/jsonrpc.py", line 330, in __init__
    bind_and_activate)
  File "/usr/lib/python2.7/SocketServer.py", line 419, in __init__
    self.server_bind()
  File "/home/manipalsingh/Documents/github/tryton/trytond/trytond/protocols/jsonrpc.py", line 359, in server_bind
    SimpleJSONRPCServer.server_bind(self)
  File "/usr/lib/python2.7/SocketServer.py", line 430, in server_bind
    self.socket.bind(self.server_address)
  File "/usr/lib/python2.7/socket.py", line 224, in meth
    return getattr(self._sock,name)(*args)
socket.error: [Errno 98] Address already in use

Sergi Almacellas Abellana

unread,
Mar 10, 2016, 3:16:19 AM3/10/16
to try...@googlegroups.com
El 10/03/16 a les 02:24, Manipal Singh ha escrit:
You have another server process listening on the same port. So stop one
of them or use a different port for the second one.

--
Sergi Almacellas Abellana
www.koolpi.com
Twitter: @pokoli_srk

Manipal Singh

unread,
Mar 11, 2016, 3:25:06 AM3/11/16
to tryton
Thanks got it.

One more thing, since I'm creating database using sqlite without using any username and password for the database, what should I enter as username and password when connecting to tryton.

Jesús Martín Jiménez

unread,
Mar 11, 2016, 3:43:07 AM3/11/16
to try...@googlegroups.com
2016-03-11 7:52 GMT+01:00 Manipal Singh <manipal...@gmail.com>:
Thanks got it.

One more thing, since I'm creating database using sqlite without using any username and password for the database, what should I enter as username and password when connecting to tryton.

I think you are confusing the (admin) tryton user (as PostgreSQL user) that is used to connect to the db, and the tryton user (as Tryton user) that is used to connect to the Tryton server.

--
You received this message because you are subscribed to the Google Groups "tryton" group.
To view this discussion on the web visit https://groups.google.com/d/msgid/tryton/49a4e230-3da1-46f1-9764-486d5c37c97a%40googlegroups.com.



--

Jesús Martín

Zikzakmedia SL
C/ de Sant Jaume, 9, baixos, 2ª
08720 Vilafranca del Penedès
☏ 93 890 21 08

Cédric Krier

unread,
Mar 11, 2016, 3:45:06 AM3/11/16
to tryton
The user name of the default user created is admin and the password is
the one you will give to trytond when setup the database:
http://doc.tryton.org/3.8/trytond/doc/topics/setup_database.html#topics-setup-database

Manipal Singh

unread,
Mar 11, 2016, 6:10:05 PM3/11/16
to tryton
when I try executing ./bin/trytond -c ../tryton/trytond.conf -d mydb --all
I'm getting this error:


Traceback (most recent call last):
  File "./bin/trytond", line 80, in <module>
    server.TrytonServer(options).run()
  File "/home/manipalsingh/Documents/github/tryton/trytond/trytond/server.py", line 85, in run
    with Transaction().start(db_name, 0) as transaction:
  File "/home/manipalsingh/Documents/github/tryton/trytond/trytond/transaction.py", line 84, in start
    database = Database(database_name).connect()
  File "/home/manipalsingh/Documents/github/tryton/trytond/trytond/backend/sqlite/database.py", line 220, in connect
    raise IOError('Database "%s" doesn\'t exist!' % db_filename)
IOError: Database "mydb.sqlite" doesn't exist!

Although I have a database named mydb created in path that I specified in trytond.conf file.(I'm using sqlite for creating database).
Any help....

Cédric Krier

unread,
Mar 11, 2016, 6:25:05 PM3/11/16
to tryton
I guess you did not create it in the right place.
Did you correctly used the extention '.sqlite'?

Manipal Singh

unread,
Mar 11, 2016, 7:00:46 PM3/11/16
to tryton
When I create use a database having .sqlite extension in its name I'm getting this error:

Traceback (most recent call last):
  File "./bin/trytond", line 80, in <module>
    server.TrytonServer(options).run()
  File "/home/manipalsingh/Documents/github/tryton/trytond/trytond/server.py", line 91, in run
    database.init()
  File "/home/manipalsingh/Documents/github/tryton/trytond/trytond/backend/sqlite/database.py", line 337, in init
    cursor.execute(line)
sqlite3.DatabaseError: file is encrypted or is not a database

How is it encrypted, because I just recreated database named mydb.sqlite
I have to create database in the path directory that I provided in [database] in configuration file?I'm creating it there...

Cédric Krier

unread,
Mar 11, 2016, 7:05:04 PM3/11/16
to tryton
How do you create the database? Normally, you should just do:

# touch mydb.sqlite

And of course the data path should be a directory with write access.

Manipal Singh

unread,
Mar 12, 2016, 3:40:04 AM3/12/16
to tryton
I was creating database by using
sqlite mydb.sqlite

creating it using touch command gives me these error:


Traceback (most recent call last):
  File "./bin/trytond", line 80, in <module>
    server.TrytonServer(options).run()
  File "/home/manipalsingh/Documents/github/tryton/trytond/trytond/server.py", line 115, in run
    Pool(db_name).init(update=self.options.update, lang=lang)
  File "/home/manipalsingh/Documents/github/tryton/trytond/trytond/pool.py", line 155, in init
    lang=lang)
  File "/home/manipalsingh/Documents/github/tryton/trytond/trytond/modules/__init__.py", line 419, in load_modules
    _load_modules()
  File "/home/manipalsingh/Documents/github/tryton/trytond/trytond/modules/__init__.py", line 415, in _load_modules
    Cache.resets(database_name)
  File "/home/manipalsingh/Documents/github/tryton/trytond/trytond/cache.py", line 114, in resets
    [[CurrentTimestamp(), name]]))
sqlite3.OperationalError: database is locked

Cédric Krier

unread,
Mar 12, 2016, 4:15:04 AM3/12/16
to tryton
On 2016-03-11 16:24, Manipal Singh wrote:
> I was creating database by using
> sqlite mydb.sqlite

It doesn't create a database if you don't alter the schema.

> creating it using *touch* command gives me these error:
Indeed it is a bug introduced recently in the trunk:
https://bugs.tryton.org/issue5388
You should probably use postgresql backend in the meantime.
Reply all
Reply to author
Forward
0 new messages