health-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Health-dev] GNU Health/FHIR REST server - help needed


From: Chris
Subject: Re: [Health-dev] GNU Health/FHIR REST server - help needed
Date: Tue, 7 Jun 2016 09:59:13 -0700

On 06/03/16, Adrian Hodson wrote:
> Hi all.
> 
> For those following the SAO issue I raised yesterday, our dear leader
> Luis solved it with this comment:
> 
> "Looks like you're using SAO v 4.x . You need 3.8 for GNU Health 3.0.x"
> 
> Now I am trying to run fhir/run_server.py. There are a few
> errors, one to do with logging which I fixed. "pip install -r
> requirements.txt" goes well. (see below)
> 
> When I execute the server I get a database error:
> object has no attribute 'database_name' 
> (see the full message below). 
> 
> The config file is also below.
> 
> I intend to do the nginx+tornado+flask config but for now I am just
> following the Wiki.

Probably overkill at this point. Hehe.

> Please, do you have any advice?
> 
> Thank you and best wishes.
> 
> 
> 
> ## Database Error ##
> address@hidden:~
> $ /usr/bin/python2 /opt/gnuhealth/tryton/fhir/run_server.py
> /opt/gnuhealth/.local/lib/python2.7/site-packages/flask/exthook.py:71:ExtDeprecationWarning:
> Importing flask.ext.login is deprecated, use flask_login
> instead.  .format(x=modname),
> ExtDeprecationWarning 
> /opt/gnuhealth/.local/lib/python2.7/site-packages/flask/exthook.py:71:ExtDeprecationWarning:Importing
> flask.ext.tryton is deprecated, use flask_tryton
> instead.  .format(x=modname),
> ExtDeprecationWarning 
> /opt/gnuhealth/.local/lib/python2.7/site-packages/flask/exthook.py:71:ExtDeprecationWarning:Importing
> flask.ext.restful is deprecated, use flask_restful
> instead.  .format(x=modname), ExtDeprecationWarning Traceback (most
> recent call last): File "/opt/gnuhealth/tryton/fhir/run_server.py",
> line 12, in <module> app = create_app() #DebugConfig File
> "/opt/gnuhealth/tryton/fhir/server/app.py", line 24, in create_app
> tryton.init_app(app) File
> "/opt/gnuhealth/.local/lib/python2.7/site-packages/flask_tryton.py",
> line 54, in init_app self.pool = Pool(database) File
> "/opt/gnuhealth/tryton/server/trytond-3.8.5/trytond/pool.py", line 58,
> in __new__ database_name = Transaction().cursor.database_name
> AttributeError: 'NoneType' object has no attribute 'database_name'

I've tried to recreate this issue, but I can't. The error seems to
suggest that you are outside of a Transaction. I don't know all of the
edge cases... but I'm wondering if all the DB parameters are correct,
etc...?

-C

> 
> 
> ## Python  ##
> address@hidden:~/tryton/server/config $ pip2 freeze --user
> aniso8601==1.1.0
> backports.ssl-match-hostname==3.5.0.1
> caldav==0.4.0
> certifi==2016.2.28
> click==6.6
> coverage==4.0.3
> cracklib==2.9.3
> defusedxml==0.4.1
> Flask==0.11
> Flask-Login==0.2.11
> Flask-RESTful==0.3.5
> flask-tryton==0.5
> Flask-WTF==0.12
> Genshi==0.7
> itsdangerous==0.24
> lxml==3.6.0
> nose==1.3.7
> Pillow==3.0.0
> polib==1.0.7
> psycopg2==2.6.1
> python-dateutil==2.5.3
> python-ldap==2.4.20
> python-sql==0.8
> python-stdnum==1.2
> pytz==2016.4
> PyWebDAV==0.9.8
> qrcode==5.3
> relatorio==0.6.2
> requests==2.10.0
> simpleeval==0.8.7
> six==1.10.0
> tornado==4.3
> vobject==0.9.2
> Werkzeug==0.11.10
> wrapt==1.10.8
> WTForms==2.1
> 
> 
> ## CONFIG ## 
> address@hidden:~ $ head tryton/fhir/config.py
> ==> tryton/fhir/config.py <==
> class ProductionConfig(object):
>     """A basic production config
>     """
>     TRYTON_DATABASE = 'gnuhealth'
>     SECRET_KEY = 'fqU1nHlFiDt4UgdjAKfQypt0X3OOgRNxrzX6BYSM'
>     SERVER_NAME = 'localhost'
>     TRYTON_CONFIG = '/opt/gnuhealth/tryton/server/config/trytond.conf'
>       
> 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]