-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Python error on startup #57996
Comments
@eflaten, thanks for reporting. Does the issue occur also using a new QGIS user profile? |
Yes. Same error when starting up with a new profile. |
The QGIS project highly values your report and would love to see it addressed. However, this issue has been left in feedback mode for the last 14 days and is being automatically marked as "stale". |
While we hate to see this happen, this issue has been automatically closed because it has not had any activity in the last 42 days despite being marked as feedback. If this issue should be reconsidered, please follow the guidelines in the previous comment and reopen this issue. |
Same issue here with Windows as OS (QGIS 3.38, installed with the OSGEO Network installer). Seems like a timing problem, that the module qgis is not yet available when the If QGIS is started, I can also import qgis in the console without getting this error. |
@thbaumann, thanks for reporting. May you please indicated the exact QGIS version installed? |
@agiudiceandrea : I have QGIS-Version: and QGIS-Version: The Problem exists in both versions. |
I suspect that there is used a different search path for python for module I was hesitant about logging using I think about a few possible fixes: |
@ostr00000 : The path of
The content of this script is a md5 check and a shutil copy to distribute the current startup.py to all users:
|
The above startup script has no I was able to reproduce this error, but only on QGIS version installed by I investigated path listed on error dialog
path listed using QGIS python console (`pprint(sys.path)`)
Path where >>> qgis.__path__
['C:\\OSGeo4W/apps/qgis-dev/./python\\qgis'] The difference clearly shows that path for QGIS/src/python/qgspythonutilsimpl.cpp Lines 103 to 144 in da1f55b
According to docs, this is intentional, so we cannot change the order of these lines. I am going to prepare a pull request in next days (probably tomorrow, max 3 days) |
What is the bug or the crash?
There is Python Error displayes during startup. Here it is:
An error occurred during execution of following code:
is_startup_script_executed = run_startup_script(pyqgstart)
Traceback (most recent call last):
File "", line 1, in
File "QgsPythonUtilsImpl::checkSystemImports [run_startup_script]", line 7, in run_startup_script
ModuleNotFoundError: No module named 'qgis'
Python version:
3.11.9 | packaged by conda-forge | (main, Apr 19 2024, 19:00:53) [Clang 16.0.6 ]
QGIS version:
3.38.0-Grenoble 'Grenoble', exported
Python path:
['/Applications/QGIS-3.38.app/Contents/lib/python311.zip', '/Applications/QGIS-3.38.app/Contents/lib/python3.11', '/Applications/QGIS-3.38.app/Contents/lib/python3.11/lib-dynload', '/Applications/QGIS-3.38.app/Contents/lib/python3.11/site-packages']
Steps to reproduce the issue
Doubleclick the qgis icon and wait
Versions
QGIS version
3.38.0-Grenoble
QGIS code branch
Release 3.38
Qt version
5.15.8
Python version
3.11.9
Compiled against GDAL/OGR
3.9.0
Running against GDAL/OGR
3.9.1
PROJ version
9.4.1
EPSG Registry database version
v11.006 (2024-03-13)
GEOS version
3.12.1-CAPI-1.18.1
SQLite version
3.46.0
Compiled against PDAL
2.7.1
Running against PDAL
2.7.2
PostgreSQL client version
unknown
SpatiaLite version
5.1.0
QWT version
6.3.0
QScintilla2 version
2.14.1
OS version
macOS 10.16
Active Python plugins
beePen
0.2.5
batch_gps_importer
version 1.0.1
wfsclient
0.9.11
qgis2web
3.21.0
processing
2.12.99
grassprovider
2.12.99
db_manager
0.1.20
MetaSearch
0.3.6
Supported QGIS version
New profile
Additional context
Its the new macos installer:
https://github.com/opengisch/qgis-conda-builder/releases
No response
The text was updated successfully, but these errors were encountered: