On Sunday, October 15, 2017 at 10:40:06 AM UTC-4, PMan wrote:
> On Saturday, October 14, 2017 at 11:17:20 PM UTC-4, Mark Shane Hayden wrote:
> > On Oct 14, 2017 01:55, "PMan" <[email protected]> wrote:
> > Greetings!
> > 
> > 
> > 
> > I'm trying to install 4.4.4 from source on Cloud Linux 7 with cagefs.
> > 
> > 
> > 
> > My environment:
> > 
> > 
> > 
> > Postgres 9.6, which I know is working, because it is the backend for 
> > another app on that server that has been running for months.
> > 
> > 
> > 
> > Virtual environment (VE): Python 3.6
> > 
> > 
> > 
> > I try to test install from the command line Inside active VE:
> > 
> > 
> > 
> > ./bin/trytond -c /opt/Tryton/etc/trytond.conf
> > 
> > 
> > 
> > This gives me this error:
> > 
> > 
> > 
> > 'trytond.backend', db_type)
> > 
> > ValueError: not enough values to unpack (expected 1, got 0)
> > 
> > 
> > 
> > 
> > 
> > 
> > This looks like an incorrectly specified database URI. The error message 
> > you sent later seems to show it knows it's a postgresql type database but 
> > the connection info was not supplied. See below...
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > Here are the relevant parts of trytond.conf:
> > 
> > 
> > 
> > [web]
> > 
> > # Settings for the web interface
> > 
> > 
> > 
> > # The IP/host and port number of the interface
> > 
> > # (Internal default: localhost:8000)
> > 
> > #
> > 
> > # Listen on all interfaces (IPv4)
> > 
> > listen = localhost:8000
> > 
> > #
> > 
> > # Listen on all interfaces (IPv4 and IPv6)
> > 
> > #listen = [::]:8000
> > 
> > 
> > 
> > # The hostname for this interface
> > 
> > #hostname =
> > 
> > 
> > 
> > # The root path to retrieve data for GET requests
> > 
> > root = /path/to/sao-4.4.4
> > 
> > 
> > 
> > 
> > 
> > [database]
> > 
> > # Database related settings
> > 
> > 
> > 
> > # The URI to connect to the SQL database (following RFC-3986)
> > 
> > # uri = database://username:password@host:port/
> > 
> > # (Internal default: sqlite:// (i.e. a local SQLite database))
> > 
> > #
> > 
> > # PostgreSQL via Unix domain sockets
> > 
> > # (e.g. PostgreSQL database running on the same machine (localhost))
> > 
> > #uri = postgresql://tryton:tryton@/
> > 
> > #
> > 
> > # PostgreSQL via TCP/IP
> > 
> > # (e.g. connecting to a PostgreSQL database running on a remote machine or
> > 
> > # by means of md5 authentication. Needs PostgreSQL to be configured to 
> > accept
> > 
> > # those connections (pg_hba.conf).)
> > 
> > uri = postgresql://username:passwordlocalhost:5432/
> > 
> > 
> > ^^^HERE^^^
> > 
> > 
> > Is this exactly how it is in your config file? The @ sign as missing so the 
> > parser can't unpack (separate) the credentials and the host:port
> > 
> > 
> > 
> > Should be username:password@localhost:5432
> > 
> > 
> > 
> > 
> > 
> > 
> > # The path to the directory where the Tryton Server stores files.
> > 
> > # The server must have write permissions to this directory.
> > 
> > # (Internal default: /var/lib/trytond)
> > 
> > path = /var/lib/trytond
> > 
> > 
> > 
> > # Shall available databases be listed in the client?
> > 
> > #list = True
> > 
> > 
> > 
> > # The number of retries of the Tryton Server when there are errors
> > 
> > # in a request to the database
> > 
> > #retry = 5
> > 
> > 
> > 
> > # The primary language, that is used to store entries in translatable
> > 
> > # fields into the database.
> > 
> > language = en_US
> > 
> > 
> > 
> > 
> > 
> > Is there a way to set db type in the config file?
> > 
> > 
> > 
> > Thanks in advance!
> > 
> > 
> > 
> > --
> > 
> > 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/8c640812-3206-4681-a353-71eece762f64%40googlegroups.com.
> 
> My mistake! When I replaced the real credentials with the generic 
> username:password I left out the "@". In the config, it is 
> db_name:username:password@localhost:5432   (I removed the trailing slash).
> 
> After removing the trailing slash, I still get the same error.

Thank you!

I did "pip3 install psycopg2" (If I did a "yum install" it would use the system 
python 2.7). Now I get a different error:

./bin/trytond -c /opt/Tryton/etc/trytond.conf
Traceback (most recent call last):
  File 
"/opt/Tryton/lib/python3.6/site-packages/trytond-4.4.4-py3.6.egg/trytond/backend/__init__.py",
 line 32, in get
    'trytond.backend', db_type)
ValueError: not enough values to unpack (expected 1, got 0)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "./bin/trytond", line 4, in <module>
    __import__('pkg_resources').run_script('trytond==4.4.4', 'trytond')
  File "/opt/Tryton/lib/python3.6/site-packages/pkg_resources/__init__.py", 
line 743, in run_script
    self.require(requires)[0].run_script(script_name, ns)
  File "/opt/Tryton/lib/python3.6/site-packages/pkg_resources/__init__.py", 
line 1498, in run_script
    exec(code, namespace, namespace)
  File 
"/opt/Tryton/lib/python3.6/site-packages/trytond-4.4.4-py3.6.egg/EGG-INFO/scripts/trytond",
 line 24, in <module>
    from trytond.application import app
  File 
"/opt/Tryton/lib/python3.6/site-packages/trytond-4.4.4-py3.6.egg/trytond/application.py",
 line 8, in <module>
    Pool.start()
  File 
"/opt/Tryton/lib/python3.6/site-packages/trytond-4.4.4-py3.6.egg/trytond/pool.py",
 line 95, in start
    register_classes()
  File 
"/opt/Tryton/lib/python3.6/site-packages/trytond-4.4.4-py3.6.egg/trytond/modules/__init__.py",
 line 336, in register_classes
    import trytond.ir
  File 
"/opt/Tryton/lib/python3.6/site-packages/trytond-4.4.4-py3.6.egg/trytond/ir/__init__.py",
 line 4, in <module>
    from .configuration import *
  File 
"/opt/Tryton/lib/python3.6/site-packages/trytond-4.4.4-py3.6.egg/trytond/ir/configuration.py",
 line 3, in <module>
    from ..model import ModelSQL, ModelSingleton, fields
  File 
"/opt/Tryton/lib/python3.6/site-packages/trytond-4.4.4-py3.6.egg/trytond/model/__init__.py",
 line 3, in <module>
    from .model import Model
  File 
"/opt/Tryton/lib/python3.6/site-packages/trytond-4.4.4-py3.6.egg/trytond/model/model.py",
 line 8, in <module>
    from trytond.model import fields
  File 
"/opt/Tryton/lib/python3.6/site-packages/trytond-4.4.4-py3.6.egg/trytond/model/fields/__init__.py",
 line 4, in <module>
    from .field import *
  File 
"/opt/Tryton/lib/python3.6/site-packages/trytond-4.4.4-py3.6.egg/trytond/model/fields/field.py",
 line 20, in <module>
    Database = backend.get('Database')
  File 
"/opt/Tryton/lib/python3.6/site-packages/trytond-4.4.4-py3.6.egg/trytond/backend/__init__.py",
 line 34, in get
    raise exception
  File 
"/opt/Tryton/lib/python3.6/site-packages/trytond-4.4.4-py3.6.egg/trytond/backend/__init__.py",
 line 26, in get
    __import__(modname)
ModuleNotFoundError: No module named 'trytond.backend.'

Thanks in advance,
Paul

-- 
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/ad6d1871-24fe-4ec4-a192-a551a1eac567%40googlegroups.com.

Reply via email to