...some further investigations on this: Checking for 'sip' in the OSGeo4W installer I only found the lib sip-qt5 (v4.19.14-1) already installed.
Regarding the ModuleNotFoundError: No module named 'qgis' (the second one): Seems there is a misinterpretation of some of the Python Paths, e.g. 'D:\\gdi\\qgisServer\x07pps\\qgis/./python' IMHO should be like 'D:\\gdi\\qgisServer\\apps\\qgis/./python' This path origiantes from the environment variable PYTHONHOME "D:\gdi\qgisServer\apps\Python37" in %OSGEO4W%\httpd.d\httpd_qgis.conf Although the backslashes become escaped with '\' a misinterpretation of '\a' (at the beginning of 'apps') happens. Simply exchanging '\' with '/' in PYTHONHOME modifies the log displayed path to 'D:/gdi/qgisServer/apps/qgis/./python', but the python support is still disabled. The remaining ModuleNotFoundError[ is now]: No module named 'qgis.PyQt' How to find/set the valid python path? BTW, subsequent installation of lib pyqt5 did not fix the issue. Still no clue about python support for QGIS server, but now it's weekend! > Thomas Schüttenberg <[email protected]> hat am 10.12.2020 16:22 geschrieben: > > > Hi there! > > Just set up a new QGIS Server 3.16.1 and although it is working I receive the > following error log (see below). Installation was done with OSGeo4W selecting > only the package qgis-server and auto resolving the dependencies. > Because disabled Python support is of course not appreciated, maybe someone > knows how to fix this? > > Cheers! > > 15:22:57 WARNING [3020]: Adding API Landing Page > 15:22:57 WARNING [3020]: Adding API OGC WFS3 (Draft) > 15:22:57 WARNING Python error[3020]: An error occurred during execution of > following code: > os.environ['HOME']=os.environ['USERPROFILE'] > > > Traceback (most recent call last): > File "", line 1, in > File "D:/gdi/qgisServer/apps/Python37\lib\os.py", line 678, in __getitem__ > raise KeyError(key) from None > KeyError: 'USERPROFILE' > > Python version: > 3.7.0 (v3.7.0:1bf9cc5093, Jun 27 2018, 04:59:51) [MSC v.1914 64 bit (AMD64)] > > QGIS version: > 3.16.1-Hannover 'Hannover', b381a90dca > > Python path: > ['D:\\gdi\\qgisServer\\apps\\Python37', > 'D:\\gdi\\qgisServer\\apps\\Python37\\Scripts', > 'D:\\gdi\\qgisServer\\bin\\python37.zip', > 'D:\\gdi\\qgisServer\\apps\\Python37\\DLLs', > 'D:\\gdi\\qgisServer\\apps\\Python37\\lib', > 'D:\\gdi\\qgisServer\\apps\\qgis\\bin', > 'D:\\gdi\\qgisServer\\apps\\Python37\\lib\\site-packages'] > 15:22:57 WARNING Python error[3020]: Couldn't load SIP module. > Python support will be disabled. > > Traceback (most recent call last): > File "", line 1, in > ModuleNotFoundError: No module named 'qgis' > > Python version: > 3.7.0 (v3.7.0:1bf9cc5093, Jun 27 2018, 04:59:51) [MSC v.1914 64 bit (AMD64)] > > QGIS version: > 3.16.1-Hannover 'Hannover', b381a90dca > > Python path: > ['D:\\gdi\\qgisServer\x07pps\\qgis/./python', > 'D:\\gdi\\configurations\\profiles\\default/python', > 'D:/gdi/qgisServer/plugins', > 'D:\\gdi\\configurations\\profiles\\default/python/plugins', > 'D:\\gdi\\qgisServer\x07pps\\qgis/./python/plugins', > 'D:\\gdi\\qgisServer\\apps\\Python37', > 'D:\\gdi\\qgisServer\\apps\\Python37\\Scripts', > 'D:\\gdi\\qgisServer\\bin\\python37.zip', > 'D:\\gdi\\qgisServer\\apps\\Python37\\DLLs', > 'D:\\gdi\\qgisServer\\apps\\Python37\\lib', > 'D:\\gdi\\qgisServer\\apps\\qgis\\bin', > 'D:\\gdi\\qgisServer\\apps\\Python37\\lib\\site-packages'] > 15:22:57 WARNING Server[3020]: WMS capabilities document not found in cache > 15:22:57 WARNING Server[3020]: Set WMS capabilities document in cache _______________________________________________ Qgis-user mailing list [email protected] List info: https://lists.osgeo.org/mailman/listinfo/qgis-user Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
