qgis / QGIS

QGIS is a free, open source, cross platform (lin/win/mac) geographical information system (GIS)
https://qgis.org
GNU General Public License v2.0
10.34k stars 2.98k forks source link

Remove ALL references to plugin #56808

Open Bandit253 opened 6 months ago

Bandit253 commented 6 months ago

What is the bug or the crash?

Every time I start QGIS I get a python error saying that it cannot file a file, which was part of a plugin I wrote. I have un-installed it, changed the source directory name (added Broken), updated QGIS and still it fails.

I am unable to determine where the reference is coming from.

2024-03-12T06:05:06 WARNING Traceback (most recent call last): File "D:\PROGRA~1/QGIS33~1.0/apps/qgis/./python/plugins\processing\script\ScriptAlgorithmProvider.py", line 126, in loadAlgorithms alg = ScriptUtils.loadAlgorithm(moduleName, filePath) File "D:\PROGRA~1/QGIS33~1.0/apps/qgis/./python/plugins\processing\script\ScriptUtils.py", line 65, in loadAlgorithm spec.loader.exec_module(module) File "", line 850, in exec_module File "", line 228, in _call_with_frames_removed File "E:\_QGIS_projects\beyondtime_BROKEN\scratch_matplot.py", line 9, in files = sorted(os.listdir(image_folder)) FileNotFoundError: [WinError 3] The system cannot find the path specified: 'E:\\_QGIS_projects\\beyondtime\\data'

Steps to reproduce the issue

Start QGIS, either 3.34 or 3.36

Versions

QGIS version 3.36.0-Maidenhead QGIS code revision 09951dc0 Qt version 5.15.3 Python version 3.9.18 GDAL/OGR version 3.8.4 PROJ version 9.3.1 EPSG Registry database version v10.098 (2023-11-24) GEOS version 3.12.1-CAPI-1.18.1 SQLite version 3.41.1 PDAL version 2.6.0 PostgreSQL client version 16.1 SpatiaLite version 5.1.0 QWT version 6.1.6 QScintilla2 version 2.13.4 OS version Windows 10 Version 2009

Active Python plugins AnimateOsm 0.3.0 api_query 0.1 debug_vs 0.8 h3_toolkit 0.1.0 Importer2OSMbasemap 1.0 JSONEater-master 0.3 latlontools 3.6.19 MM_Changer 0.1 networks 2.7.16 ORStools 1.7.1 osm_matcher 0.1 pluginbuilder3 3.2.1 plugin_reloader 0.9.3 QChatGPT 0.7 qduckdb 0.4.1 qfieldsync v4.8.0 qgis2web 3.18.2 qgpt_agent_release 0.4 QNEAT3 1.0.5 QueryBench 0.1 quick-geojson 1.0 QuickOSM 2.2.3 QuickWKT 3.1 quick_map_services 0.19.34 db_manager 0.1.20 grassprovider 2.12.99 MetaSearch 0.3.6 processing 2.12.99

Supported QGIS version

New profile

Additional context

When I use a new profile 3.36 works fine. Now when I start 3.34 it produces the crash report...

I am able to restart but the processing toolbox is not available.

Report Details

Python Stack Trace

Windows fatal exception: access violation

Current thread 0x000068d4 (most recent call first):
  File "C:\OSGeo4W/apps/qgis/./python\qgis\utils.py", line 120 in showException
    bar.pushWidget(widget, Qgis.Warning)
  File "C:\OSGeo4W/apps/qgis/./python\qgis\utils.py", line 190 in qgis_excepthook
    showException(type, value, tb, None, messagebar=in_main_thread)
  File "C:\OSGeo4W/apps/qgis/./python/plugins\processing\script\ScriptAlgorithmProvider.py", line 72 in load
    self.refreshAlgorithms()
  File "C:\OSGeo4W/apps/qgis/./python/plugins\processing\core\Processing.py", line 112 in initialize
    if QgsApplication.processingRegistry().addProvider(p):
  File "C:\OSGeo4W/apps/qgis/./python/plugins\processing\ProcessingPlugin.py", line 203 in initProcessing
    Processing.initialize()
  File "C:\OSGeo4W/apps/qgis/./python/plugins\processing\ProcessingPlugin.py", line 198 in __init__
    self.initProcessing()
  File "C:\OSGeo4W/apps/qgis/./python/plugins\processing\__init__.py", line 49 in classFactory
    return ProcessingPlugin(iface)
  File "C:\OSGeo4W/apps/qgis/./python\qgis\utils.py", line 423 in _startPlugin
    plugins[packageName] = package.classFactory(iface)
  File "C:\OSGeo4W/apps/qgis/./python\qgis\utils.py", line 443 in startPlugin
    if not _startPlugin(packageName):

Stack Trace


QResource::fileName :
QResource::lastModified :
QResource::data :
QResource::fileName :
QResource::fileName :
QFileInfo::fileTime :
QFileInfo::absoluteFilePath :
qt_plugin_query_metadata :
QIcon::addFile :
QIcon::QIcon :
QCss::Declaration::iconValue :
QCss::ValueExtractor::extractImage :
QProxyStyle::unpolish :
QHeaderView::logicalIndexAt :
QHeaderView::setClickable :
QHeaderView::logicalIndexAt :
QMainWindow::tr :
QHeaderView::logicalIndexAt :
QWidget::setStyleSheet :
QgsMessageBar::resetCountdown :
QgsMessageBar::pushItem :
QgsMessageBar::pushWidget :
QgsPresetSchemeColorRamp::clone :
PyObject_Str :
PyEval_EvalFrameDefault :
PyFunction_Vectorcall :
PyFunction_Vectorcall :
PyEval_EvalFrameDefault :
PyFunction_Vectorcall :
PyUnicode_ReadChar :
PyErr_NormalizeException :
PyErr_PrintEx :
PyInit_QtCore :
pdal::PointContainer::freeTemp :
pdal::Option::getName :
QgsProcessingProvider::refreshAlgorithms :
pdal::Option::getName :
PyObject_Str :
PyEval_EvalFrameDefault :
PyFunction_Vectorcall :
PyObject_GC_Del :
PyVectorcall_Call :
PyObject_Call :
pdal::PointContainer::freeTemp :
pdal::Option::getName :
QgsProcessingRegistry::addProvider :
pdal::Option::getName :
PyObject_Str :
PyEval_EvalFrameDefault :
PyFunction_Vectorcall :
PyEval_EvalFrameDefault :
PyObject_GC_Del :
PyEval_EvalFrameDefault :
PyFunction_Vectorcall :
PyFunction_Vectorcall :
PyArg_ParseTuple_SizeT :
PyEval_EvalFrameDefault :
PyFunction_Vectorcall :
PyEval_EvalFrameDefault :
PyEval_EvalFrameDefault :
PyFunction_Vectorcall :
PyEval_EvalFrameDefault :
PyFunction_Vectorcall :
PyEval_EvalCodeWithName :
PyEval_EvalCodeEx :
PyEval_EvalCode :
PyCodec_DecodeText :
PyCodec_DecodeText :
PyRun_StringFlags :
instance :
instance :
QgsPluginRegistry::loadPythonPlugin :
QgsPluginRegistry::restoreSessionPlugins :
QgisApp::QgisApp :
main :
BaseThreadInitThunk :
RtlUserThreadStart :

QGIS Info QGIS Version: 3.34.3-Prizren QGIS code revision: 47373234ac Compiled against Qt: 5.15.3 Running against Qt: 5.15.3 Compiled against GDAL: 3.8.3 Running against GDAL: 3.8.3

System Info CPU Type: x86_64 Kernel Type: winnt Kernel Version: 10.0.22631

ismailsunni commented 6 months ago

Hi @Bandit253 It might be that the error comes from a broken processing model. Could you check if you have some custom processing algorithm in your QGIS? The location should be inside the profile directory something like profiles/default/processing/models. You might also want to check if there is a custom models folder. You can check under Options -> Processing -> Models -> Model folder

It seems also you have many plugins installed. Please try to disable one by one if the error persist.