[osgeo4w-dev] [osgeo4w] #804: Could not load qgis_app.dll - QGIS LTR 3.28.11 OSGeo4W Installer

OSGeo4W trac_osgeo4w at osgeo.org
Thu Sep 21 01:57:49 PDT 2023


#804: Could not load qgis_app.dll - QGIS LTR 3.28.11 OSGeo4W Installer
------------------------------------------------+--------------------------
Reporter:  ascottwwf                            |       Owner:  osgeo4w-
                                                |  dev@…
    Type:  defect                               |      Status:  new
Priority:  normal                               |   Component:  Installer
 Version:  1.0                                  |  Resolution:
Keywords:  QGIS LTR OSGeo4W scripted installer  |
------------------------------------------------+--------------------------
Comment (by ascottwwf):

 I have attached both log files to this issue, these are from my machine
 that is being upgraded.\\
 I will re-run the install on my Windows 10 sandbox (a fresh install) and
 get you the logs from there later.

 Although I don't know exactly what I'm looking for, there is the following
 'Fatal Python error' that occurs in the setup.log.full file
 "ModuleNotFoundError: No module named 'encodings'"\\

 Here is the snippet (from lines 1707 to 1741 of the setup.log.full file) -
 I fully accept this may (or may not) be a reason for the issue:

 {{{
 2023/09/19 10:47:50 Running preremove script for  python3-pillow
 2023/09/19 10:47:50 running: cmd.exe /c "C:\Program
 Files\OSGeo4W_v2\\etc\preremove\python3-pillow.bat"


 C:\Program Files\OSGeo4W_v2>python3 -B "\Scripts\preremove-cached.py"
 python3-pillow

 Python path configuration:
   PYTHONHOME = (not set)
   PYTHONPATH = (not set)
   program name = 'python3'
   isolated = 0
   environment = 1
   user site = 1
   import site = 1
   sys._base_executable = 'C:\\Program Files\\OSGeo4W_v2\\bin\\python3.exe'
   sys.base_prefix = ''
   sys.base_exec_prefix = ''
   sys.platlibdir = 'lib'
   sys.executable = 'C:\\Program Files\\OSGeo4W_v2\\bin\\python3.exe'
   sys.prefix = ''
   sys.exec_prefix = ''
   sys.path = [
     'C:\\Program Files\\OSGeo4W_v2\\bin\\python39.zip',
     '.\\DLLs',
     '.\\lib',
     'C:\\Program Files\\OSGeo4W_v2\\bin',
   ]
 Fatal Python error: init_fs_encoding: failed to get the Python codec of
 the filesystem encoding
 Python runtime state: core initialized
 ModuleNotFoundError: No module named 'encodings'

 Current thread 0x00003bb8 (most recent call first):
 <no Python frame>
 2023/09/19 10:47:50 abnormal exit: exit code=1
 2023/09/19 10:47:50 Uninstalling python3-pillow
 }}}

 Reviewing your suggestion, it does look like the
 %OSGEO4W_ROOT%\etc\postinstall\qgis-ltr.bat probably ran correctly as
 there is a copy of qgis-ltr.bat.done in the postinstall folder, (the
 modified date of the file is 15th Sept 2023 15:50 - I assume(?) this is
 the correct modified time I should expect to see for the file (I installed
 this on the 19th September so the modified time pre-dates the install date
 / time I would expect).\\
 The .env file(s) do not exist.
-- 
Ticket URL: <https://trac.osgeo.org/osgeo4w/ticket/804#comment:6>
OSGeo4W <http://trac.osgeo.org/osgeo4w>
OSGeo4W is the Windows installer and package environment for the OSGeo stack.


More information about the osgeo4w-dev mailing list