Discussion:
[tryton] Proteus
Cato Nano
2018-01-10 16:59:20 UTC
Permalink
This

$ python
Python 2.7.14 (default, Sep 17 2017, 18:50:44)
[GCC 7.2.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
from proteus import config, Model
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named proteus
Of course Proteus is installed with apt-get

This is more of a Debian/Python question than Tryton
Please bear with me

I'd like to use Proteus to debug one of my calculated fields, that's not working

Currently I have to reload the whole client and log in again every time I change something

Thanks
--
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/386f8265-ab17-4499-a136-440f81404843%40googlegroups.com.
FREDY RAMIREZ
2018-01-10 17:09:24 UTC
Permalink
Hi,

You can download Proteus from tryton download page and set PYTHONPATH with your proteus path.

Hope this help.
--
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/fc672a4a-a273-4612-bbc0-0827827d19f1%40googlegroups.com.
Cédric Krier
2018-01-10 18:29:48 UTC
Permalink
Post by Cato Nano
This
$ python
Python 2.7.14 (default, Sep 17 2017, 18:50:44)
[GCC 7.2.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
from proteus import config, Model
File "<stdin>", line 1, in <module>
ImportError: No module named proteus
Of course Proteus is installed with apt-get
I guess you are not using the right Python for which proteus was
installed.
Maybe you are under a virtualenv, in this case you should install
proteus using `$ pip install proteus`.
--
Cédric Krier - B2CK SPRL
Email/Jabber: ***@b2ck.com
Tel: +32 472 54 46 59
Website: http://www.b2ck.com/
--
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/20180110182948.GC3972%40kei.
Cato Nano
2018-01-10 19:52:08 UTC
Permalink
Post by Cédric Krier
Post by Cato Nano
This
$ python
Python 2.7.14 (default, Sep 17 2017, 18:50:44)
[GCC 7.2.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
from proteus import config, Model
File "<stdin>", line 1, in <module>
ImportError: No module named proteus
Of course Proteus is installed with apt-get
I guess you are not using the right Python for which proteus was
installed.
Maybe you are under a virtualenv, in this case you should install
proteus using `$ pip install proteus`.
--
Thank you people

No, I' m not using virtualenv.

But I found a couple of facts.

When called from within a python3 prompt, Proteus gets found

But this time xmlrpclib is missing

Also, xmlrpclib is not declared as a dependency in the Proteus setup.py file

I think I' ll take Fredy's suggestion, I'll build Proteus on my own and try to use that

Only, not right now.
Tomorrow
Thanks for your suggestions
Good night
--
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/f5e19135-03d9-4e13-aa0a-b8bef0c826d8%40googlegroups.com.
Cédric Krier
2018-01-11 00:07:32 UTC
Permalink
Post by Cato Nano
When called from within a python3 prompt, Proteus gets found
But this time xmlrpclib is missing
Also, xmlrpclib is not declared as a dependency in the Proteus setup.py file
xmlrpclib is a standard library of Python so it should not be declared
as dependency.
But indeed xmlrpclib is the name for Python2, in Python3 it should be
xmlrpc.
Normally, when installing proteus with Python3, the code is transformed
and xmlrpclib is changed for xmlrpc. So it seems the installation is
wrong. I guess it should be reported to the distribution you are using.
--
Cédric Krier - B2CK SPRL
Email/Jabber: ***@b2ck.com
Tel: +32 472 54 46 59
Website: http://www.b2ck.com/
--
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/20180111000732.GE3972%40kei.
Cato Nano
2018-01-11 07:04:43 UTC
Permalink
Post by Cédric Krier
Post by Cato Nano
When called from within a python3 prompt, Proteus gets found
But this time xmlrpclib is missing
Also, xmlrpclib is not declared as a dependency in the Proteus setup.py file
xmlrpclib is a standard library of Python so it should not be declared
as dependency.
But indeed xmlrpclib is the name for Python2, in Python3 it should be
xmlrpc.
Normally, when installing proteus with Python3, the code is transformed
and xmlrpclib is changed for xmlrpc. So it seems the installation is
wrong. I guess it should be reported to the distribution you are using.
--
Cédric Krier - B2CK SPRL
Tel: +32 472 54 46 59
Website: http://www.b2ck.com/
Thank you Cedric

I already opened a thread with the Debian Tryton mantainers

I'll report to them your observation
--
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/dd5aa4e1-8248-4b9a-af16-2673d9c9d36d%40googlegroups.com.
Mathias Behrle
2018-01-11 12:38:47 UTC
Permalink
Post by Cédric Krier
Post by Cato Nano
When called from within a python3 prompt, Proteus gets found
But this time xmlrpclib is missing
Also, xmlrpclib is not declared as a dependency in the Proteus setup.py file
xmlrpclib is a standard library of Python so it should not be declared
as dependency.
But indeed xmlrpclib is the name for Python2, in Python3 it should be
xmlrpc.
Normally, when installing proteus with Python3, the code is transformed
and xmlrpclib is changed for xmlrpc. So it seems the installation is
wrong. I guess it should be reported to the distribution you are using.
Wrong guess.

JFTR: It was explained on the Debian mailing list to Cato Nano that he has to
take care himself for 2to3 conversion when not using distribution packages and
running instead from a downloaded package.
--
Mathias Behrle
MBSolutions
Gilgenmatten 10 A
D-79114 Freiburg

Tel: +49(761)471023
Fax: +49(761)4770816
http://www.m9s.biz
UStIdNr: DE 142009020
PGP/GnuPG key availabable from any keyserver, ID: 0xD6D09BE48405BBF6
AC29 7E5C 46B9 D0B6 1C71 7681 D6D0 9BE4 8405 BBF6
--
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/20180111133847.19cfc542%40monsterix.mbehrle.de.
Cédric Krier
2018-01-11 13:57:17 UTC
Permalink
Post by Mathias Behrle
Post by Cédric Krier
Post by Cato Nano
When called from within a python3 prompt, Proteus gets found
But this time xmlrpclib is missing
Also, xmlrpclib is not declared as a dependency in the Proteus setup.py file
xmlrpclib is a standard library of Python so it should not be declared
as dependency.
But indeed xmlrpclib is the name for Python2, in Python3 it should be
xmlrpc.
Normally, when installing proteus with Python3, the code is transformed
and xmlrpclib is changed for xmlrpc. So it seems the installation is
wrong. I guess it should be reported to the distribution you are using.
Wrong guess.
JFTR: It was explained on the Debian mailing list to Cato Nano that he has to
take care himself for 2to3 conversion when not using distribution packages and
running instead from a downloaded package.
I do not see where it is a wrong guess. In previous email, Cato Nano
said: "Of course Proteus is installed with apt-get".
--
Cédric Krier - B2CK SPRL
Email/Jabber: ***@b2ck.com
Tel: +32 472 54 46 59
Website: http://www.b2ck.com/
--
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/20180111135717.GN3972%40kei.
Cato Nano
2018-01-11 15:23:49 UTC
Permalink
Post by Cédric Krier
Post by Mathias Behrle
Post by Cédric Krier
Post by Cato Nano
When called from within a python3 prompt, Proteus gets found
But this time xmlrpclib is missing
Also, xmlrpclib is not declared as a dependency in the Proteus setup.py file
xmlrpclib is a standard library of Python so it should not be declared
as dependency.
But indeed xmlrpclib is the name for Python2, in Python3 it should be
xmlrpc.
Normally, when installing proteus with Python3, the code is transformed
and xmlrpclib is changed for xmlrpc. So it seems the installation is
wrong. I guess it should be reported to the distribution you are using.
Wrong guess.
JFTR: It was explained on the Debian mailing list to Cato Nano that he has to
take care himself for 2to3 conversion when not using distribution packages and
running instead from a downloaded package.
I do not see where it is a wrong guess. In previous email, Cato Nano
said: "Of course Proteus is installed with apt-get".
--
I think Mathis is referring to my own Tryton module

He saw the path to my module in the stacktrace

Now I' m not sure I understand

Can't the Debian provided Proteus be used for developing your own Tryton modules?

Does it only work with Debian provided modules ?
--
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/e97f4fab-6e8f-4163-ac1f-d30312924016%40googlegroups.com.
Sergi Almacellas Abellana
2018-01-11 15:41:34 UTC
Permalink
Post by Cato Nano
I think Mathis is referring to my own Tryton module
He saw the path to my module in the stacktrace
Now I' m not sure I understand
Can't the Debian provided Proteus be used for developing your own Tryton modules?
Does it only work with Debian provided modules ?
As far as your module is importable from the debian python interpreter
it will work without problems.

How do you installed your module?
--
Sergi Almacellas Abellana
www.koolpi.com
Twitter: @pokoli_srk
--
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/79744f7b-9c0f-485a-bd0f-d7104a4e539a%40koolpi.com.
Cato Nano
2018-01-11 19:30:35 UTC
Permalink
Post by Sergi Almacellas Abellana
Post by Cato Nano
I think Mathis is referring to my own Tryton module
He saw the path to my module in the stacktrace
Now I' m not sure I understand
Can't the Debian provided Proteus be used for developing your own Tryton modules?
Does it only work with Debian provided modules ?
As far as your module is importable from the debian python interpreter
it will work without problems.
How do you installed your module?
--
Sergi Almacellas Abellana
www.koolpi.com
Sergi

thank you so much for your concern

I changed solution

I installed all with viertualenv and pip

For the server pip3, python3 and for the client pip2, python2 and a virtualenv that can access the pygtk provided by the local operating system (pygtk doesn' t install plainly so the one provided by the system is preferable)

I opened a python console and imported proteus a second ago and it works like a charm

I had stuck to the apt provided packages because I had assumed that they were reliable

I was wrong (to say at least)

Starting tomorrow I' ll try to debug my calculated field

Ugh !

Thank you so much to all of you for your help
Starting tomorrow I' ll try
--
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/e0f69a21-83f5-42c8-9916-81716b4eba3e%40googlegroups.com.
Cato Nano
2018-01-12 17:35:21 UTC
Permalink
Ok, now I' m at this (The database ":memory:" does not exist)

This is the pip3 based setup. Which component is missing ?
config = config.set_trytond('sqlite:///:memory:')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/catonano/tributi/env/lib/python3.6/site-packages/proteus/config.py", line 274, in set_trytond
_CONFIG.current = TrytondConfig(database, user, config_file=config_file)
File "/home/catonano/tributi/env/lib/python3.6/site-packages/proteus/config.py", line 230, in __init__
with Transaction().start(self.database_name, 0) as transaction:
File "/home/catonano/tributi/env/lib/python3.6/site-packages/trytond/transaction.py", line 88, in start
database = Database(database_name).connect()
File "/home/catonano/tributi/env/lib/python3.6/site-packages/trytond/backend/postgresql/database.py", line 96, in __new__
cursor_factory=LoggingCursor)
File "/home/catonano/tributi/env/lib/python3.6/site-packages/psycopg2/pool.py", line 161, in __init__
self, minconn, maxconn, *args, **kwargs)
File "/home/catonano/tributi/env/lib/python3.6/site-packages/psycopg2/pool.py", line 58, in __init__
self._connect()
File "/home/catonano/tributi/env/lib/python3.6/site-packages/psycopg2/pool.py", line 62, in _connect
conn = psycopg2.connect(*self._args, **self._kwargs)
File "/home/catonano/tributi/env/lib/python3.6/site-packages/psycopg2/__init__.py", line 130, in connect
conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
psycopg2.OperationalError: FATALE: il database ":memory:" non esiste
--
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/5802d634-f588-48c1-bbaa-f99035636acd%40googlegroups.com.
Axel Braun
2018-01-12 17:39:54 UTC
Permalink
Post by Cato Nano
Ok, now I' m at this (The database ":memory:" does not exist)
What does
psql -l
say?
--
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/3041652.SjNJPvJL6K%40southpole.
Cédric Krier
2018-01-12 18:07:47 UTC
Permalink
Post by Cato Nano
Ok, now I' m at this (The database ":memory:" does not exist)
This is the pip3 based setup. Which component is missing ?
config = config.set_trytond('sqlite:///:memory:')
File "<stdin>", line 1, in <module>
File "/home/catonano/tributi/env/lib/python3.6/site-packages/proteus/config.py", line 274, in set_trytond
_CONFIG.current = TrytondConfig(database, user, config_file=config_file)
File "/home/catonano/tributi/env/lib/python3.6/site-packages/proteus/config.py", line 230, in __init__
File "/home/catonano/tributi/env/lib/python3.6/site-packages/trytond/transaction.py", line 88, in start
database = Database(database_name).connect()
File "/home/catonano/tributi/env/lib/python3.6/site-packages/trytond/backend/postgresql/database.py", line 96, in __new__
cursor_factory=LoggingCursor)
File "/home/catonano/tributi/env/lib/python3.6/site-packages/psycopg2/pool.py", line 161, in __init__
self, minconn, maxconn, *args, **kwargs)
File "/home/catonano/tributi/env/lib/python3.6/site-packages/psycopg2/pool.py", line 58, in __init__
self._connect()
File "/home/catonano/tributi/env/lib/python3.6/site-packages/psycopg2/pool.py", line 62, in _connect
conn = psycopg2.connect(*self._args, **self._kwargs)
File "/home/catonano/tributi/env/lib/python3.6/site-packages/psycopg2/__init__.py", line 130, in connect
conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
psycopg2.OperationalError: FATALE: il database ":memory:" non esiste
You seem to have already imported trytond before running the
'set_trytond' so the previous import setup PostgreSQL as database
backend which does not have ':memory:' database.
Tryton can not change the backend during the run time, so it must be
set once at the beginning and not change during the execution.
--
Cédric Krier - B2CK SPRL
Email/Jabber: ***@b2ck.com
Tel: +32 472 54 46 59
Website: http://www.b2ck.com/
--
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/20180112180747.GA4227%40kei.
Cato Nano
2018-01-12 19:28:01 UTC
Permalink
Post by Cédric Krier
Post by Cato Nano
Ok, now I' m at this (The database ":memory:" does not exist)
This is the pip3 based setup. Which component is missing ?
config = config.set_trytond('sqlite:///:memory:')
File "<stdin>", line 1, in <module>
File "/home/catonano/tributi/env/lib/python3.6/site-packages/proteus/config.py", line 274, in set_trytond
_CONFIG.current = TrytondConfig(database, user, config_file=config_file)
File "/home/catonano/tributi/env/lib/python3.6/site-packages/proteus/config.py", line 230, in __init__
File "/home/catonano/tributi/env/lib/python3.6/site-packages/trytond/transaction.py", line 88, in start
database = Database(database_name).connect()
File "/home/catonano/tributi/env/lib/python3.6/site-packages/trytond/backend/postgresql/database.py", line 96, in __new__
cursor_factory=LoggingCursor)
File "/home/catonano/tributi/env/lib/python3.6/site-packages/psycopg2/pool.py", line 161, in __init__
self, minconn, maxconn, *args, **kwargs)
File "/home/catonano/tributi/env/lib/python3.6/site-packages/psycopg2/pool.py", line 58, in __init__
self._connect()
File "/home/catonano/tributi/env/lib/python3.6/site-packages/psycopg2/pool.py", line 62, in _connect
conn = psycopg2.connect(*self._args, **self._kwargs)
File "/home/catonano/tributi/env/lib/python3.6/site-packages/psycopg2/__init__.py", line 130, in connect
conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
psycopg2.OperationalError: FATALE: il database ":memory:" non esiste
You seem to have already imported trytond before running the
'set_trytond' so the previous import setup PostgreSQL as database
backend which does not have ':memory:' database.
Tryton can not change the backend during the run time, so it must be
set once at the beginning and not change during the execution.
Thank you Cédric, I'll try tomorrow.

I tried these lines, in this order
Post by Cédric Krier
Post by Cato Nano
from proteus import config, Model, Wizard, Report
config = config.set_trytond('sqlite:///:memory:')
because this is what I saw here

https://github.com/tryton/proteus

So I understand that I should run
Post by Cédric Krier
Post by Cato Nano
config = config.set_trytond('sqlite:///:memory:')
as a first step ?
I'll try
--
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/042f2fd3-fdfe-40a9-9ade-5ed837fcfa68%40googlegroups.com.
Cédric Krier
2018-01-12 22:11:25 UTC
Permalink
Post by Cédric Krier
Post by Cato Nano
Ok, now I' m at this (The database ":memory:" does not exist)
This is the pip3 based setup. Which component is missing ?
config = config.set_trytond('sqlite:///:memory:')
File "<stdin>", line 1, in <module>
File "/home/catonano/tributi/env/lib/python3.6/site-packages/proteus/config.py", line 274, in set_trytond
_CONFIG.current = TrytondConfig(database, user, config_file=config_file)
File "/home/catonano/tributi/env/lib/python3.6/site-packages/proteus/config.py", line 230, in __init__
File "/home/catonano/tributi/env/lib/python3.6/site-packages/trytond/transaction.py", line 88, in start
database = Database(database_name).connect()
File "/home/catonano/tributi/env/lib/python3.6/site-packages/trytond/backend/postgresql/database.py", line 96, in __new__
cursor_factory=LoggingCursor)
File "/home/catonano/tributi/env/lib/python3.6/site-packages/psycopg2/pool.py", line 161, in __init__
self, minconn, maxconn, *args, **kwargs)
File "/home/catonano/tributi/env/lib/python3.6/site-packages/psycopg2/pool.py", line 58, in __init__
self._connect()
File "/home/catonano/tributi/env/lib/python3.6/site-packages/psycopg2/pool.py", line 62, in _connect
conn = psycopg2.connect(*self._args, **self._kwargs)
File "/home/catonano/tributi/env/lib/python3.6/site-packages/psycopg2/__init__.py", line 130, in connect
conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
psycopg2.OperationalError: FATALE: il database ":memory:" non esiste
You seem to have already imported trytond before running the
'set_trytond' so the previous import setup PostgreSQL as database
backend which does not have ':memory:' database.
Tryton can not change the backend during the run time, so it must be
set once at the beginning and not change during the execution.
Thank you Cédric, I'll try tomorrow.
I tried these lines, in this order
Post by Cédric Krier
Post by Cato Nano
from proteus import config, Model, Wizard, Report
config = config.set_trytond('sqlite:///:memory:')
because this is what I saw here
https://github.com/tryton/proteus
So I understand that I should run
Post by Cédric Krier
Post by Cato Nano
config = config.set_trytond('sqlite:///:memory:')
as a first step ?
No this is correct. So maybe you have TRYTOND_CONFIG environment
variable set to a configuration file that configure postgresql as
backend.
--
Cédric Krier - B2CK SPRL
Email/Jabber: ***@b2ck.com
Tel: +32 472 54 46 59
Website: http://www.b2ck.com/
--
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/20180112221125.GC4227%40kei.
Cato Nano
2018-01-13 07:16:12 UTC
Permalink
Post by Cédric Krier
Post by Cato Nano
Post by Cédric Krier
Post by Cato Nano
Ok, now I' m at this (The database ":memory:" does not exist)
This is the pip3 based setup. Which component is missing ?
config = config.set_trytond('sqlite:///:memory:')
File "<stdin>", line 1, in <module>
File "/home/catonano/tributi/env/lib/python3.6/site-packages/proteus/config.py", line 274, in set_trytond
_CONFIG.current = TrytondConfig(database, user, config_file=config_file)
File "/home/catonano/tributi/env/lib/python3.6/site-packages/proteus/config.py", line 230, in __init__
File "/home/catonano/tributi/env/lib/python3.6/site-packages/trytond/transaction.py", line 88, in start
database = Database(database_name).connect()
File "/home/catonano/tributi/env/lib/python3.6/site-packages/trytond/backend/postgresql/database.py", line 96, in __new__
cursor_factory=LoggingCursor)
File "/home/catonano/tributi/env/lib/python3.6/site-packages/psycopg2/pool.py", line 161, in __init__
self, minconn, maxconn, *args, **kwargs)
File "/home/catonano/tributi/env/lib/python3.6/site-packages/psycopg2/pool.py", line 58, in __init__
self._connect()
File "/home/catonano/tributi/env/lib/python3.6/site-packages/psycopg2/pool.py", line 62, in _connect
conn = psycopg2.connect(*self._args, **self._kwargs)
File "/home/catonano/tributi/env/lib/python3.6/site-packages/psycopg2/__init__.py", line 130, in connect
conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
psycopg2.OperationalError: FATALE: il database ":memory:" non esiste
You seem to have already imported trytond before running the
'set_trytond' so the previous import setup PostgreSQL as database
backend which does not have ':memory:' database.
Tryton can not change the backend during the run time, so it must be
set once at the beginning and not change during the execution.
Thank you Cédric, I'll try tomorrow.
I tried these lines, in this order
Post by Cédric Krier
Post by Cato Nano
from proteus import config, Model, Wizard, Report
config = config.set_trytond('sqlite:///:memory:')
because this is what I saw here
https://github.com/tryton/proteus
So I understand that I should run
Post by Cédric Krier
Post by Cato Nano
config = config.set_trytond('sqlite:///:memory:')
as a first step ?
No this is correct. So maybe you have TRYTOND_CONFIG environment
variable set to a configuration file that configure postgresql as
backend.
--
Cédric Krier - B2CK SPRL
Tel: +32 472 54 46 59
Website: http://www.b2ck.com/
Good morning

Today the error message is different. Yesterday I probably messed up because I was tired, it happens

So here I am now
Post by Cédric Krier
Post by Cato Nano
Post by Cédric Krier
from proteus import config, Model, Wizard, Report
config = config.set_trytond('sqlite:///:memory:')
/home/catonano/tributi/env/lib/python3.6/site-packages/trytond/modules/__init__.py:143: DeprecationWarning: This method will be removed in future versions. Use 'parser.read_file()' instead.
module_config.readfp(fp)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/catonano/tributi/env/lib/python3.6/site-packages/proteus/config.py", line 274, in set_trytond
_CONFIG.current = TrytondConfig(database, user, config_file=config_file)
File "/home/catonano/tributi/env/lib/python3.6/site-packages/proteus/config.py", line 228, in __init__
self.pool.init()
File "/home/catonano/tributi/env/lib/python3.6/site-packages/trytond/pool.py", line 153, in init
lang=lang, installdeps=installdeps)
File "/home/catonano/tributi/env/lib/python3.6/site-packages/trytond/modules/__init__.py", line 461, in load_modules
with Transaction().start(database_name, 0):
File "/home/catonano/tributi/env/lib/python3.6/site-packages/trytond/transaction.py", line 106, in start
Cache.clean(database.name)
File "/home/catonano/tributi/env/lib/python3.6/site-packages/trytond/cache.py", line 111, in clean
cursor.execute(*table.select(table.timestamp, table.name))
sqlite3.OperationalError: no such table: ir_cache
--
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/1d89afac-b2e9-4ae0-8b85-1b3ed0f7969f%40googlegroups.com.
Cédric Krier
2018-01-13 08:59:00 UTC
Permalink
Post by Cato Nano
Today the error message is different. Yesterday I probably messed up because I was tired, it happens
So here I am now
from proteus import config, Model, Wizard, Report
config = config.set_trytond('sqlite:///:memory:')
/home/catonano/tributi/env/lib/python3.6/site-packages/trytond/modules/__init__.py:143: DeprecationWarning: This method will be removed in future versions. Use 'parser.read_file()' instead.
module_config.readfp(fp)
File "<stdin>", line 1, in <module>
File "/home/catonano/tributi/env/lib/python3.6/site-packages/proteus/config.py", line 274, in set_trytond
_CONFIG.current = TrytondConfig(database, user, config_file=config_file)
File "/home/catonano/tributi/env/lib/python3.6/site-packages/proteus/config.py", line 228, in __init__
self.pool.init()
File "/home/catonano/tributi/env/lib/python3.6/site-packages/trytond/pool.py", line 153, in init
lang=lang, installdeps=installdeps)
File "/home/catonano/tributi/env/lib/python3.6/site-packages/trytond/modules/__init__.py", line 461, in load_modules
File "/home/catonano/tributi/env/lib/python3.6/site-packages/trytond/transaction.py", line 106, in start
Cache.clean(database.name)
File "/home/catonano/tributi/env/lib/python3.6/site-packages/trytond/cache.py", line 111, in clean
cursor.execute(*table.select(table.timestamp, table.name))
sqlite3.OperationalError: no such table: ir_cache
Now you are connecting to a database that was not setup:
http://doc.tryton.org/4.6/trytond/doc/topics/setup_database.html#topics-setup-database

For memory database, you can use create_db from
trytond.tests.test_tryton like it is done for the test.
Indeed the README is not useful: https://bugs.tryton.org/issue7056
--
Cédric Krier - B2CK SPRL
Email/Jabber: ***@b2ck.com
Tel: +32 472 54 46 59
Website: http://www.b2ck.com/
--
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/20180113085900.GF4227%40kei.
Cato Nano
2018-01-18 08:51:51 UTC
Permalink
Post by Cédric Krier
Post by Cato Nano
Today the error message is different. Yesterday I probably messed up because I was tired, it happens
So here I am now
from proteus import config, Model, Wizard, Report
config = config.set_trytond('sqlite:///:memory:')
/home/catonano/tributi/env/lib/python3.6/site-packages/trytond/modules/__init__.py:143: DeprecationWarning: This method will be removed in future versions. Use 'parser.read_file()' instead.
module_config.readfp(fp)
File "<stdin>", line 1, in <module>
File "/home/catonano/tributi/env/lib/python3.6/site-packages/proteus/config.py", line 274, in set_trytond
_CONFIG.current = TrytondConfig(database, user, config_file=config_file)
File "/home/catonano/tributi/env/lib/python3.6/site-packages/proteus/config.py", line 228, in __init__
self.pool.init()
File "/home/catonano/tributi/env/lib/python3.6/site-packages/trytond/pool.py", line 153, in init
lang=lang, installdeps=installdeps)
File "/home/catonano/tributi/env/lib/python3.6/site-packages/trytond/modules/__init__.py", line 461, in load_modules
File "/home/catonano/tributi/env/lib/python3.6/site-packages/trytond/transaction.py", line 106, in start
Cache.clean(database.name)
File "/home/catonano/tributi/env/lib/python3.6/site-packages/trytond/cache.py", line 111, in clean
cursor.execute(*table.select(table.timestamp, table.name))
sqlite3.OperationalError: no such table: ir_cache
http://doc.tryton.org/4.6/trytond/doc/topics/setup_database.html#topics-setup-database
For memory database, you can use create_db from
trytond.tests.test_tryton like it is done for the test.
Indeed the README is not useful: https://bugs.tryton.org/issue7056
--
Cédric Krier - B2CK SPRL
Tel: +32 472 54 46 59
Website: http://www.b2ck.com/
I copied the test_tryton file in my project root, erased some stuff and left the create_db function

I get this

~/tributi/bridgehead2.py in create_db(name, lang)
51 None, 0, close=True, autocommit=True, _nocache=True) \
52 as transaction:
---> 53 transaction.database.create(transaction.connection, name)
54
55 with Transaction().start(name, 0, _nocache=True) as transaction,\

~/tributi/env/lib/python3.6/site-packages/trytond/backend/sqlite/database.py in create(cls, connection, database_name)
300 path = os.path.join(config.get('database', 'path'),
301 database_name + '.sqlite')
--> 302 with sqlite.connect(path) as conn:
303 cursor = conn.cursor()
304 cursor.close()

OperationalError: unable to open database file


I could use soem help about how to setup this db

Thanks
--
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/0bcdcd5a-11dd-4b60-a1a6-c618265cbec5%40googlegroups.com.
Cato Nano
2018-01-21 09:27:31 UTC
Permalink
Post by Cato Nano
Post by Cédric Krier
Post by Cato Nano
Today the error message is different. Yesterday I probably messed up because I was tired, it happens
So here I am now
from proteus import config, Model, Wizard, Report
config = config.set_trytond('sqlite:///:memory:')
/home/catonano/tributi/env/lib/python3.6/site-packages/trytond/modules/__init__.py:143: DeprecationWarning: This method will be removed in future versions. Use 'parser.read_file()' instead.
module_config.readfp(fp)
File "<stdin>", line 1, in <module>
File "/home/catonano/tributi/env/lib/python3.6/site-packages/proteus/config.py", line 274, in set_trytond
_CONFIG.current = TrytondConfig(database, user, config_file=config_file)
File "/home/catonano/tributi/env/lib/python3.6/site-packages/proteus/config.py", line 228, in __init__
self.pool.init()
File "/home/catonano/tributi/env/lib/python3.6/site-packages/trytond/pool.py", line 153, in init
lang=lang, installdeps=installdeps)
File "/home/catonano/tributi/env/lib/python3.6/site-packages/trytond/modules/__init__.py", line 461, in load_modules
File "/home/catonano/tributi/env/lib/python3.6/site-packages/trytond/transaction.py", line 106, in start
Cache.clean(database.name)
File "/home/catonano/tributi/env/lib/python3.6/site-packages/trytond/cache.py", line 111, in clean
cursor.execute(*table.select(table.timestamp, table.name))
sqlite3.OperationalError: no such table: ir_cache
http://doc.tryton.org/4.6/trytond/doc/topics/setup_database.html#topics-setup-database
For memory database, you can use create_db from
trytond.tests.test_tryton like it is done for the test.
Indeed the README is not useful: https://bugs.tryton.org/issue7056
--
Cédric Krier - B2CK SPRL
Tel: +32 472 54 46 59
Website: http://www.b2ck.com/
I copied the test_tryton file in my project root, erased some stuff and left the create_db function
I get this
~/tributi/bridgehead2.py in create_db(name, lang)
51 None, 0, close=True, autocommit=True, _nocache=True) \
---> 53 transaction.database.create(transaction.connection, name)
54
55 with Transaction().start(name, 0, _nocache=True) as transaction,\
~/tributi/env/lib/python3.6/site-packages/trytond/backend/sqlite/database.py in create(cls, connection, database_name)
300 path = os.path.join(config.get('database', 'path'),
301 database_name + '.sqlite')
303 cursor = conn.cursor()
304 cursor.close()
OperationalError: unable to open database file
I could use soem help about how to setup this db
Thanks
ok I managed to get Proteus working

I figured out the passages of configuring and creating the database finally

Proteus is helping me less than I thought, though

Probably because I' d need more data to test properly

I' ll open a new thread
--
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/b83a340c-da00-4cf4-88f1-c798ff2fb9f6%40googlegroups.com.
Cato Nano
2018-01-12 17:29:26 UTC
Permalink
Post by Cédric Krier
Post by Mathias Behrle
Post by Cédric Krier
Post by Cato Nano
When called from within a python3 prompt, Proteus gets found
But this time xmlrpclib is missing
Also, xmlrpclib is not declared as a dependency in the Proteus setup.py file
xmlrpclib is a standard library of Python so it should not be declared
as dependency.
But indeed xmlrpclib is the name for Python2, in Python3 it should be
xmlrpc.
Normally, when installing proteus with Python3, the code is transformed
and xmlrpclib is changed for xmlrpc. So it seems the installation is
wrong. I guess it should be reported to the distribution you are using.
Wrong guess.
JFTR: It was explained on the Debian mailing list to Cato Nano that he has to
take care himself for 2to3 conversion when not using distribution packages and
running instead from a downloaded package.
I do not see where it is a wrong guess. In previous email, Cato Nano
said: "Of course Proteus is installed with apt-get".
There was a local Proteus interfering with the Debian one

Sorry
--
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/56d26ba8-1a28-4c24-aff6-72191ede1513%40googlegroups.com.
Axel Braun
2018-01-12 17:34:17 UTC
Permalink
Post by Cato Nano
Post by Cédric Krier
* Cédric Krier: " Re: [tryton] Proteus" (Thu, 11 Jan 2018 01:07:32
Post by Cédric Krier
Post by Cato Nano
When called from within a python3 prompt, Proteus gets found
But this time xmlrpclib is missing
Also, xmlrpclib is not declared as a dependency in the Proteus
setup.py
file
xmlrpclib is a standard library of Python so it should not be declared
as dependency.
But indeed xmlrpclib is the name for Python2, in Python3 it should be
xmlrpc.
Normally, when installing proteus with Python3, the code is transformed
and xmlrpclib is changed for xmlrpc. So it seems the installation is
wrong. I guess it should be reported to the distribution you are using.
Wrong guess.
JFTR: It was explained on the Debian mailing list to Cato Nano that he
has to take care himself for 2to3 conversion when not using
distribution packages and running instead from a downloaded package.
I do not see where it is a wrong guess. In previous email, Cato Nano
said: "Of course Proteus is installed with apt-get".
There was a local Proteus interfering with the Debian one
Another good example why you should never mess up an installation from
distribution with an installation from source.
--
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/11149449.qS13lCX2e4%40southpole.
Cato Nano
2018-01-12 19:23:19 UTC
Permalink
Post by Axel Braun
Another good example why you should never mess up an installation from
distribution with an installation from source.
Right

I had downloaded Proteus because I was _consideing_ to try to build and install it myself
But I never embarked in such a process. I never began

I just decomprrressed the tar.gz file there

I didn't expect that to interfere with the Debian supplied Proteus.

Rather, I'd say, because I was torred I overlooked the error message that was explicitly pointing to that decompressed folder, instead of a system provided one

So I bothered Mathias

Oh well :-/
--
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/ed7fe6d8-ce47-4688-acba-a9f1e6ed9d66%40googlegroups.com.
Mathias Behrle
2018-01-13 00:12:52 UTC
Permalink
Post by Cato Nano
So I bothered Mathias
Oh well :-/
Not a problem, be welcome.

Have fun,
Mathias
--
Mathias Behrle
MBSolutions
Gilgenmatten 10 A
D-79114 Freiburg

Tel: +49(761)471023
Fax: +49(761)4770816
http://www.m9s.biz
UStIdNr: DE 142009020
PGP/GnuPG key availabable from any keyserver, ID: 0xD6D09BE48405BBF6
AC29 7E5C 46B9 D0B6 1C71 7681 D6D0 9BE4 8405 BBF6
--
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/20180113011252.4bf0d7d7%40privatix.mbehrle.de.
Loading...