gnumed-devel
[Top][All Lists]
Advanced

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

Re: profile GNUmed database at publicdb.gnumed.de (PUBLIC)


From: Karsten Hilbert
Subject: Re: profile GNUmed database at publicdb.gnumed.de (PUBLIC)
Date: Thu, 28 May 2020 11:53:31 +0200
User-agent: Mutt/1.10.1 (2018-07-13)

> From: Bunny via <gnumed-devel@gnu.org>
>
> ich glaube wir können auf deutsch schreiben:)

Stimmt. Empfehlenswert wäre auch die Einschreibung auf der
Mailingliste, die wir normalerweise für solche Austausche
verwenden:

        https://lists.gnu.org/mailman/listinfo/gnumed-devel

> Ich nutze MacOS mit Catalina 10.15.4

Das kann interessant werden.

> Ich habe die Log Datei dabei...

Das ist gut, die Logdatei zeigt hingegen ein bekanntes
ungelöstes Problem:

Irgendwas ist verquer mit Python3.8 / psycopg2 2.8. Die
Ursache habe ich noch nicht ausreichend suchen können.

        2020-05-28 10:50:28  INFO      gm.db         [4535135680 MainThread]  
(/Users/alex/gnumed/gnumed-client.1.8.1/Gnumed/pycommon/gmBackendListener.py::__start_thread()
 #172): starting listener thread
        2020-05-28 10:50:28  ERROR     gm.db         [4535135680 MainThread]  
(/Users/alex/gnumed/gnumed-client.1.8.1/Gnumed/pycommon/gmPG2.py::run_ro_queries()
 #1551): query failed in RO connection
        2020-05-28 10:50:28  DEBUG     gm.db_pool    [4535135680 MainThread]  
(/Users/alex/gnumed/gnumed-client.1.8.1/Gnumed/pycommon/gmConnectionPool.py::log_pg_exception_details()
 #685): exc.arg: extraneous data in "T" message
        2020-05-28 10:50:28  DEBUG     gm.db_pool    [4535135680 MainThread]  
(/Users/alex/gnumed/gnumed-client.1.8.1/Gnumed/pycommon/gmConnectionPool.py::log_pg_exception_details()
 #688): pgerror: [extraneous data in "T" message]
        2020-05-28 10:50:28  DEBUG     gm.db_pool    [4535135680 MainThread]  
(/Users/alex/gnumed/gnumed-client.1.8.1/Gnumed/pycommon/gmConnectionPool.py::log_pg_exception_details()
 #690): pgcode : None
        2020-05-28 10:50:28  DEBUG     gm.logging    [4535135680 MainThread]  
(/Users/alex/gnumed/gnumed-client.1.8.1/Gnumed/pycommon/gmLog2.py::log_multiline()
 #220): Link state:
        : Cursor
        :  identity: 4474213696; name: None
        :  closed: False; scrollable: None; with hold: False; arraysize: 1; 
itersize: 2000;
        :  last rowcount: -1; rownumber: 0; lastrowid (OID): 0;
        :  last description: None
        :  statusmessage: SELECT 1
        : Connection
        :  identity: 4473824976; backend pid: 18378; protocol version: 3;
        :  closed: 0; autocommit: True; isolation level: None; encoding: UTF8; 
async: 0; deferrable: None; readonly: True;
        :  TX status: TRANSACTION_STATUS_IDLE; CX status: STATUS_READY; 
executing async op: False;
        : Query
        :  SELECT * FROM dem.v_praxis_branches WHERE true
        2020-05-28 10:50:28  DEBUG     gm.gui        [4535135680 MainThread]  
(/Users/alex/gnumed/gnumed-client.1.8.1/Gnumed/wxpython/gmExceptionHandlingWidgets.py::handle_uncaught_exception_wx()
 #198): unhandled exception caught:
        Traceback (most recent call last):
          File 
"/Users/alex/gnumed/gnumed-client.1.8.1/Gnumed/wxpython/gmGuiMain.py", line 
3457, in OnInit
            if not self.__verify_praxis_branch():
          File 
"/Users/alex/gnumed/gnumed-client.1.8.1/Gnumed/wxpython/gmGuiMain.py", line 
3669, in __verify_praxis_branch
            if not gmPraxisWidgets.set_active_praxis_branch(no_parent = True):
          File 
"/Users/alex/gnumed/gnumed-client.1.8.1/Gnumed/wxpython/gmPraxisWidgets.py", 
line 412, in set_active_praxis_branch
            branches = gmPraxis.get_praxis_branches()
          File 
"/Users/alex/gnumed/gnumed-client.1.8.1/Gnumed/business/gmPraxis.py", line 255, 
in get_praxis_branches
            rows, idx = gmPG2.run_ro_queries(queries = [{'cmd': cmd}], 
get_col_idx = True)
          File 
"/Users/alex/gnumed/gnumed-client.1.8.1/Gnumed/pycommon/gmPG2.py", line 1547, 
in run_ro_queries
            curs.execute(query['cmd'], args)
          File 
"/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/psycopg2/extras.py",
 line 143, in execute
            return super(DictCursor, self).execute(query, vars)
        psycopg2.DatabaseError: extraneous data in "T" message

Es scheint mir, es könnte mit fehlerhafter Threadnutzung
zusammenhängen. Das schaue ich nochmal nach. Ich habe
denselben Report von zwei weiteren Nutzern (immer nur mit
psycopg2.8 auf python3.8)

> im Log steht:

Bzw in der Konsolenausgabe ?

> CRITICAL ERROR: Program halted.
>
> Please make sure you have:
>
>  1) the required third-party Python modules installed
>  2) the GNUmed Python modules linked or installed into site-packages/
>     (if you do not run from a CVS tree the installer should have taken care
> of that)
>  3) your PYTHONPATH environment variable set up correctly
>
> <sys.path> is currently set to:
>
>  %s

Interessanterweise findet gnumed.py (anhand des Logs) aber
dennoch die nötigen Module und führt den Startprozeß fort.

> Aus der check-prerequisites.sh sieht es so aus:
>
> sys.path (press <ENTER> key to show):
>
>   /Users/alex/gnumed/gnumed-client.1.8.1/external-tools
>   /Library/Frameworks/Python.framework/Versions/3.8/lib/python38.zip
>   /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8
>
>
> /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/lib-dynload
> /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages
>
>
> ${PATH} (press <ENTER> key to show):
>
> /Library/Frameworks/Python.framework/Versions/3.8/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin
>
> /Users/alex/gnumed/gnumed-client.1.8.1/external-tools

Das ist OK so.


> *alex@MacBook-Pro client % ./gm-from-vcs.sh  *
>
> -------------------------------------------------
>
> fatal: Kein Git-Repository (oder irgendeines der Elternverzeichnisse): .git

Das ist unproblematisch, ich habe es aber jetzt verschönert.

> 10:50:28: Debug:
> /Users/robind/projects/bb2/dist-osx-py38/build/ext/wxWidgets/src/osx/cocoa/
> utils.mm(561): assert ""gs_wxBusyCursorCount > 0"" failed in
> wxEndBusyCursor(): no matching wxBeginBusyCursor() for wxEndBusyCursor()
>
> Error in sys.excepthook:
>
> Traceback (most recent call last):
>
>   File
> "/Users/alex/gnumed/gnumed-client.1.8.1/Gnumed/wxpython/gmExceptionHandlingWidgets.py",
> line 235, in handle_uncaught_exception_wx
>
>     wx.EndBusyCursor()
>
> wx._core.wxAssertionError: C++ assertion ""gs_wxBusyCursorCount > 0""
> failed at
> /Users/robind/projects/bb2/dist-osx-py38/build/ext/wxWidgets/src/osx/cocoa/
> utils.mm(561) in wxEndBusyCursor(): no matching wxBeginBusyCursor() for
> wxEndBusyCursor()

Good to know this happens on MacOSX as well. There's already
code working around the issue on Windows:

        def setup_safe_wxEndBusyCursor():
                # monkey patch wxPython, needed on Windows ...
                if os.name != 'nt':
                        return
                print('GNUmed startup: Monkey patching wx.EndBusyCursor...')
                global _original_wxEndBusyCursor
                _original_wxEndBusyCursor = wx.EndBusyCursor
                wx.EndBusyCursor = _safe_wxEndBusyCursor
                _log.debug('monkey patched wx.EndBusyCursor:')
                _log.debug('[%s] -> [%s]', _original_wxEndBusyCursor, 
_safe_wxEndBusyCursor)

which I will activate for OSX as well now. If you want to
test that right now you can comment out the lines

                if os.name != 'nt':
                        return

to

                #if os.name != 'nt':
                #       return

in the function "setup_safe_wxEndBusyCursor()" inside

        /Users/alex/gnumed/gnumed-client.1.8.1/Gnumed/wxpython/gmGuiMain.py

That will, however, simply uncover the original exception:

> Original exception was:
>
> Traceback (most recent call last):
>
>   File
> "/Users/alex/gnumed/gnumed-client.1.8.1/Gnumed/wxpython/gmGuiMain.py", line
> 3457, in OnInit
>
>     if not self.__verify_praxis_branch():
>
>   File
> "/Users/alex/gnumed/gnumed-client.1.8.1/Gnumed/wxpython/gmGuiMain.py", line
> 3669, in __verify_praxis_branch
>
>     if not gmPraxisWidgets.set_active_praxis_branch(no_parent = True):
>
>   File
> "/Users/alex/gnumed/gnumed-client.1.8.1/Gnumed/wxpython/gmPraxisWidgets.py",
> line 412, in set_active_praxis_branch
>
>     branches = gmPraxis.get_praxis_branches()
>
>   File
> "/Users/alex/gnumed/gnumed-client.1.8.1/Gnumed/business/gmPraxis.py", line
> 255, in get_praxis_branches
>
>     rows, idx = gmPG2.run_ro_queries(queries = [{'cmd': cmd}], get_col_idx
> = True)
>
>   File "/Users/alex/gnumed/gnumed-client.1.8.1/Gnumed/pycommon/gmPG2.py",
> line 1547, in run_ro_queries
>
>     curs.execute(query['cmd'], args)
>
>   File
> "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/psycopg2/extras.py",
> line 143, in execute
>
>     return super(DictCursor, self).execute(query, vars)
>
> psycopg2.DatabaseError: extraneous data in "T" message

den ich noch nicht beheben konnte.

(Python 3.7 / psycopg2 2.7 funktionieren normal)


Karsten



reply via email to

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