Open-MSS / MSS

A QT application, a OGC web map server, a collaboration server to plan atmospheric research flights.
https://open-mss.github.io
Apache License 2.0
56 stars 69 forks source link

expat XML error after installation of MSS 9.2.0 #2489

Open dhgkunkel opened 2 weeks ago

dhgkunkel commented 2 weeks ago

After installation of MSS 9.2.0 (using miniforge and mamba) and starting the server, I got an error related to expat. Version 2.6.2 was of expat was installed.

I downgraded to version 2.6.1 which solved the issue.

I found similar reports here: https://github.com/matplotlib/matplotlib/issues/28235

The error log when starting the server looked as follows:

[Wed Aug 28 16:54:07.192427 2024] [wsgi:info] [pid 1242726:tid 1242731] [remote 95.89.143.182:48816] mod_wsgi (pid=1242726, process='MSS', application=''): Loading Python script file '/home/mss/summer23/wsgi/wms.wsgi'. [Wed Aug 28 16:54:07.333530 2024] [wsgi:error] [pid 1242726:tid 1242731] [remote 95.89.143.182:48816] mod_wsgi (pid=1242726): Failed to exec Python script file '/home/mss/summer23/wsgi/wms.wsgi'. [Wed Aug 28 16:54:07.333583 2024] [wsgi:error] [pid 1242726:tid 1242731] [remote 95.89.143.182:48816] mod_wsgi (pid=1242726): Exception occurred processing WSGI script '/home/mss/summer23/wsgi/wms.wsgi'. [Wed Aug 28 16:54:07.346490 2024] [wsgi:error] [pid 1242726:tid 1242731] [remote 95.89.143.182:48816] Traceback (most recent call last): [Wed Aug 28 16:54:07.347016 2024] [wsgi:error] [pid 1242726:tid 1242731] [remote 95.89.143.182:48816] File "/home/mss/summer23/wsgi/wms.wsgi", line 24, i n <module> [Wed Aug 28 16:54:07.347029 2024] [wsgi:error] [pid 1242726:tid 1242731] [remote 95.89.143.182:48816] from mslib.mswms.wms import app as application [Wed Aug 28 16:54:07.347040 2024] [wsgi:error] [pid 1242726:tid 1242731] [remote 95.89.143.182:48816] File "/home/mss/miniforge3/envs/mssenv/lib/python3. 11/site-packages/mslib/mswms/wms.py", line 56, in <module> [Wed Aug 28 16:54:07.347056 2024] [wsgi:error] [pid 1242726:tid 1242731] [remote 95.89.143.182:48816] from chameleon import PageTemplateLoader [Wed Aug 28 16:54:07.347064 2024] [wsgi:error] [pid 1242726:tid 1242731] [remote 95.89.143.182:48816] File "/home/mss/miniforge3/envs/mssenv/lib/python3. 11/site-packages/chameleon/__init__.py", line 1, in <module> [Wed Aug 28 16:54:07.347069 2024] [wsgi:error] [pid 1242726:tid 1242731] [remote 95.89.143.182:48816] from .zpt.template import PageTemplate [Wed Aug 28 16:54:07.347078 2024] [wsgi:error] [pid 1242726:tid 1242731] [remote 95.89.143.182:48816] File "/home/mss/miniforge3/envs/mssenv/lib/python3. 11/site-packages/chameleon/zpt/template.py", line 17, in <module> [Wed Aug 28 16:54:07.347082 2024] [wsgi:error] [pid 1242726:tid 1242731] [remote 95.89.143.182:48816] from ..template import BaseTemplate [Wed Aug 28 16:54:07.347089 2024] [wsgi:error] [pid 1242726:tid 1242731] [remote 95.89.143.182:48816] File "/home/mss/miniforge3/envs/mssenv/lib/python3. 11/site-packages/chameleon/template.py", line 48, in <module> [Wed Aug 28 16:54:07.347094 2024] [wsgi:error] [pid 1242726:tid 1242731] [remote 95.89.143.182:48816] from .loader import ModuleLoader [Wed Aug 28 16:54:07.347100 2024] [wsgi:error] [pid 1242726:tid 1242731] [remote 95.89.143.182:48816] File "/home/mss/miniforge3/envs/mssenv/lib/python3. 11/site-packages/chameleon/loader.py", line 9, in <module> [Wed Aug 28 16:54:07.347105 2024] [wsgi:error] [pid 1242726:tid 1242731] [remote 95.89.143.182:48816] import pkg_resources [Wed Aug 28 16:54:07.347128 2024] [wsgi:error] [pid 1242726:tid 1242731] [remote 95.89.143.182:48816] File "/home/mss/miniforge3/envs/mssenv/lib/python3. 11/site-packages/pkg_resources/__init__.py", line 63, in <module> [Wed Aug 28 16:54:07.347132 2024] [wsgi:error] [pid 1242726:tid 1242731] [remote 95.89.143.182:48816] import plistlib [Wed Aug 28 16:54:07.347157 2024] [wsgi:error] [pid 1242726:tid 1242731] [remote 95.89.143.182:48816] File "/home/mss/miniforge3/envs/mssenv/lib/python3.11/plistlib.py", line 70, in <module> [Wed Aug 28 16:54:07.347162 2024] [wsgi:error] [pid 1242726:tid 1242731] [remote 95.89.143.182:48816] from xml.parsers.expat import ParserCreate [Wed Aug 28 16:54:07.347168 2024] [wsgi:error] [pid 1242726:tid 1242731] [remote 95.89.143.182:48816] File "/home/mss/miniforge3/envs/mssenv/lib/python3.11/xml/parsers/expat.py", line 4, in <module> [Wed Aug 28 16:54:07.347189 2024] [wsgi:error] [pid 1242726:tid 1242731] [remote 95.89.143.182:48816] from pyexpat import * [Wed Aug 28 16:54:07.347207 2024] [wsgi:error] [pid 1242726:tid 1242731] [remote 95.89.143.182:48816] ImportError: /home/mss/miniforge3/envs/mssenv/lib/python3.11/lib-dynload/pyexpat.cpython-311-x86_64-linux-gnu.so: undefined symbol: XML_SetReparseDeferralEnabled

ReimarBauer commented 2 weeks ago

related https://github.com/python/cpython/issues/115398

ReimarBauer commented 2 weeks ago

on my develop system it looks like this, mod_wsgi is used on an apache setup.

Can you show a similar output on yours?


(mssenvtest2) reimarb@infinity:~$ mamba repoquery whoneeds expat

Executing the query expat

 Name       Version Build        Depends              Channel     Subdir  
───────────────────────────────────────────────────────────────────────────
 dbus       1.13.6  h5008d03_3   expat >=2.4.2,<3.0a0 conda-forge linux-64
 fontconfig 2.14.2  h14ed4e7_0   conda-forge          linux-64   

libexpat comes with python

mamba repoquery whoneeds libexpat

Executing the query libexpat

 Name   Version Build                Depends                 Channel     Subdir  
──────────────────────────────────────────────────────────────────────────────────
 python 3.11.6  hab00c5b_0_cpython   libexpat >=2.5.0,<3.0a0 conda-forge linux-64
ReimarBauer commented 2 weeks ago

in python 3.10. we have not any expat with python

dhgkunkel commented 2 weeks ago
(mssenv) mss@forecast:~$ mamba repoquery whoneeds expat

Executing the query expat

 Name       Version Build        Depends              Channel     Subdir  
───────────────────────────────────────────────────────────────────────────
 dbus       1.13.6  h5008d03_3   expat >=2.4.2,<3.0a0 conda-forge linux-64
 fontconfig 2.14.2  h14ed4e7_0   conda-forge          linux-64   

(mssenv) mss@forecast:~$ mamba repoquery whoneeds libexpat

Executing the query libexpat

 Name             Version Build                Depends                   Channel     Subdir  
──────────────────────────────────────────────────────────────────────────────────────────────
 expat            2.6.1   h59595ed_0           libexpat 2.6.1 h59595ed_0 conda-forge linux-64
 git              2.44.0  pl5321h709897a_0     conda-forge               linux-64   
 gst-plugins-base 1.22.9  h8e1006c_0           conda-forge               linux-64   
 python           3.11.8  hab00c5b_0_cpython   conda-forge               linux-64   
 qt-main          5.15.8  h5810be5_19          conda-forge               linux-64   
 qt-webengine     5.15.8  h7517aa4_5           conda-forge               linux-64  

That is how it looks on my system.

ReimarBauer commented 2 weeks ago

Please can you verify when you update python to 3.11.9 (latest version) and latest version of expat that the problem exists

mamba install python==3.11.9 mamba install expat==2.6.2

ReimarBauer commented 2 weeks ago

and I need conda info for the report on the python-feedstock. https://github.com/conda-forge/python-feedstock/issues/701

ReimarBauer commented 2 weeks ago

This might be also related https://github.com/conda-forge/python-feedstock/issues/673

dhgkunkel commented 2 weeks ago

and I need conda info for the report on the python-feedstock. conda-forge/python-feedstock#701

(mssenv) mss@forecast:~$ conda info

     active environment : mssenv
    active env location : /home/mss/miniforge3/envs/mssenv
            shell level : 2
       user config file : /home/mss/.condarc
 populated config files : /home/mss/miniforge3/.condarc
                          /home/mss/.condarc
          conda version : 24.3.0
    conda-build version : not installed
         python version : 3.10.14.final.0
                 solver : libmamba (default)
       virtual packages : __archspec=1=broadwell
                          __conda=24.3.0=0
                          __glibc=2.31=0
                          __linux=5.10.0=0
                          __unix=0=0
       base environment : /home/mss/miniforge3  (writable)
      conda av data dir : /home/mss/miniforge3/etc/conda
  conda av metadata url : None
           channel URLs : https://conda.anaconda.org/conda-forge/linux-64
                          https://conda.anaconda.org/conda-forge/noarch
                          https://repo.anaconda.com/pkgs/main/linux-64
                          https://repo.anaconda.com/pkgs/main/noarch
                          https://repo.anaconda.com/pkgs/r/linux-64
                          https://repo.anaconda.com/pkgs/r/noarch
          package cache : /home/mss/miniforge3/pkgs
                          /home/mss/.conda/pkgs
       envs directories : /home/mss/miniforge3/envs
                          /home/mss/.conda/envs
               platform : linux-64
             user-agent : conda/24.3.0 requests/2.31.0 CPython/3.10.14 Linux/5.10.0-32-amd64 debian/11.10 glibc/2.31 solver/libmamba conda-libmamba-solver/24.1.0 libmambapy/1.5.8
                UID:GID : 1000:1000
             netrc file : None
           offline mode : False
dhgkunkel commented 2 weeks ago

mamba install python==3.11.9 mamba install expat==2.6.2

Yeah, problem is persistent, changed back to python 3.11.8 and expat 2.6.1 ...

ReimarBauer commented 2 weeks ago

somehow the conda info seems to have a python version : 3.10.14.final.0 Did you done that differently?

dhgkunkel commented 2 weeks ago

somehow the conda info seems to have a python version : 3.10.14.final.0 Did you done that differently?


(base) mss@forecast:~$ conda info
 active environment : base
active env location : /home/mss/miniforge3
        shell level : 1
   user config file : /home/mss/.condarc

populated config files : /home/mss/miniforge3/.condarc /home/mss/.condarc conda version : 24.3.0 conda-build version : not installed python version : 3.10.14.final.0 solver : libmamba (default) virtual packages : archspec=1=broadwell conda=24.3.0=0 glibc=2.31=0 linux=5.10.0=0 __unix=0=0 base environment : /home/mss/miniforge3 (writable) conda av data dir : /home/mss/miniforge3/etc/conda conda av metadata url : None channel URLs : https://conda.anaconda.org/conda-forge/linux-64 https://conda.anaconda.org/conda-forge/noarch https://repo.anaconda.com/pkgs/main/linux-64 https://repo.anaconda.com/pkgs/main/noarch https://repo.anaconda.com/pkgs/r/linux-64 https://repo.anaconda.com/pkgs/r/noarch package cache : /home/mss/miniforge3/pkgs /home/mss/.conda/pkgs envs directories : /home/mss/miniforge3/envs /home/mss/.conda/envs platform : linux-64 user-agent : conda/24.3.0 requests/2.31.0 CPython/3.10.14 Linux/5.10.0-32-amd64 debian/11.10 glibc/2.31 solver/libmamba conda-libmamba-solver/24.1.0 libmambapy/1.5.8 UID:GID : 1000:1000 netrc file : None offline mode : False

(base) mss@forecast:~$ python --version Python 3.10.14 (base) mss@forecast:~$ mamba activate mssenv (mssenv) mss@forecast:~$ python --version Python 3.11.8 (mssenv) mss@forecast:~$ conda info

 active environment : mssenv
active env location : /home/mss/miniforge3/envs/mssenv
        shell level : 2
   user config file : /home/mss/.condarc

populated config files : /home/mss/miniforge3/.condarc /home/mss/.condarc conda version : 24.3.0 conda-build version : not installed python version : 3.10.14.final.0 solver : libmamba (default) virtual packages : archspec=1=broadwell conda=24.3.0=0 glibc=2.31=0 linux=5.10.0=0 __unix=0=0 base environment : /home/mss/miniforge3 (writable) conda av data dir : /home/mss/miniforge3/etc/conda conda av metadata url : None channel URLs : https://conda.anaconda.org/conda-forge/linux-64 https://conda.anaconda.org/conda-forge/noarch https://repo.anaconda.com/pkgs/main/linux-64 https://repo.anaconda.com/pkgs/main/noarch https://repo.anaconda.com/pkgs/r/linux-64 https://repo.anaconda.com/pkgs/r/noarch package cache : /home/mss/miniforge3/pkgs /home/mss/.conda/pkgs envs directories : /home/mss/miniforge3/envs /home/mss/.conda/envs platform : linux-64 user-agent : conda/24.3.0 requests/2.31.0 CPython/3.10.14 Linux/5.10.0-32-amd64 debian/11.10 glibc/2.31 solver/libmamba conda-libmamba-solver/24.1.0 libmambapy/1.5.8 UID:GID : 1000:1000 netrc file : None offline mode : False



So it seems that `conda info` puts out the python version of the `base` installation, independent of the environment. But as you can see, in the environment `python --version` results in the correct version.
ReimarBauer commented 2 weeks ago

ok, thx for checking.