Il giorno venerdì 12 gennaio 2018 23:15:07 UTC+1, Cédric Krier ha scritto:
> On 2018-01-12 11:28, Cato Nano wrote:
> > Il giorno venerdì 12 gennaio 2018 19:10:06 UTC+1, Cédric Krier ha scritto:
> > > On 2018-01-12 09:35, Cato Nano wrote:
> > > > 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 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
> > 
> > >>> 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 
> > 
> > >>> 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: [email protected]
> 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

>>> 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.

Reply via email to