Closed kannes closed 1 month ago
Same here:
PS D:\_QGIS\PLUGINS\isl_box> python .\scripts\pyqt5_to_pyqt6.py .\isl_box\core\
Could not find platform independent libraries <prefix>
Traceback (most recent call last):
File "D:\_QGIS\PLUGINS\isl_box\scripts\pyqt5_to_pyqt6.py", line 710, in get_class_enums
get_class_enums(value)
File "D:\_QGIS\PLUGINS\isl_box\scripts\pyqt5_to_pyqt6.py", line 710, in get_class_enums
get_class_enums(value)
File "D:\_QGIS\PLUGINS\isl_box\scripts\pyqt5_to_pyqt6.py", line 710, in get_class_enums
get_class_enums(value)
[Previous line repeated 995 more times]
File "D:\_QGIS\PLUGINS\isl_box\scripts\pyqt5_to_pyqt6.py", line 674, in get_class_enums
matched_classes = {item}.union(all_subclasses(item))
^^^^^^^^^^^^^^^^^^^^
File "D:\_QGIS\PLUGINS\isl_box\scripts\pyqt5_to_pyqt6.py", line 672, in all_subclasses
return {cls}.union(s for c in cls.__subclasses__() for s in all_subclasses(c))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
RecursionError: maximum recursion depth exceeded
(my editor might have fucked up the format so lines differs)
I added a print juste before the recursive call and here is the output:
What is the bug or the crash?
The script for conversion of Qt5 Python code to Qt6 always fails for me with
Steps to reproduce the issue
foo
python pyqt5_to_pyqt6.py foo
This happens the same, if a proper directory full of Python files is specified or an empty directory.
Versions
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
QGIS version | 3.38.1-Grenoble | QGIS code branch | Release 3.38 -- | -- | -- | -- Qt version | 5.15.14 Compiled against Python | 3.12.4 | Running against Python | 3.12.5 GDAL/OGR version | 3.9.1 PROJ version | 9.4.1 EPSG Registry database version | v11.006 (2024-03-13) GEOS version | 3.12.2-CAPI-1.18.2 Compiled against SQLite | 3.46.0 | Running against SQLite | 3.46.1 PDAL version | 2.7.2 PostgreSQL client version | 16.3 SpatiaLite version | 5.1.0 QWT version | 6.3.0 QScintilla2 version | 2.14.1 OS version | Manjaro Linux | | | Active Python plugins plugin_reloader | 0.11 spatial_filter_qt6 | 1.6 MetaSearch | 0.3.6 db_manager | 0.1.20 grassprovider | 2.12.99 processing | 2.12.99 QGIS version 3.38.1-Grenoble QGIS code branch [Release 3.38](https://github.com/qgis/QGIS/tree/release-3_38) Qt version 5.15.14 Compiled against Python 3.12.4 Running against Python 3.12.5 GDAL/OGR version 3.9.1 PROJ version 9.4.1 EPSG Registry database version v11.006 (2024-03-13) GEOS version 3.12.2-CAPI-1.18.2 Compiled against SQLite 3.46.0 Running against SQLite 3.46.1 PDAL version 2.7.2 PostgreSQL client version 16.3 SpatiaLite version 5.1.0 QWT version 6.3.0 QScintilla2 version 2.14.1 OS version Manjaro Linux Active Python plugins plugin_reloader 0.11 spatial_filter_qt6 1.6 MetaSearch 0.3.6 db_manager 0.1.20 grassprovider 2.12.99 processing 2.12.99 ### Supported QGIS version - [X] I'm running a supported QGIS version according to [the roadmap](https://www.qgis.org/en/site/getinvolved/development/roadmap.html#release-schedule). ### New profile - [X] I tried with a new [QGIS profile](https://docs.qgis.org/latest/en/docs/user_manual/introduction/qgis_configuration.html#working-with-user-profiles) ### Additional context I made the recursive call to `get_class_enums()` halt if it went to a depth of more than 2-3, and collect the items on which it went this far, I get: ``` qgis_analysis.QgsGeometryCheck.Change qgis_analysis.QgsGeometryCheck.ChangeType qgis_analysis.QgsGeometryCheck.ChangeWhat qgis_analysis.QgsGeometryCheck.CheckType qgis_analysis.QgsGeometryCheck.Flag qgis_analysis.QgsGeometryCheck.Flags qgis_analysis.QgsGeometryCheck.LayerFeatureIds qgis_core.Qgis qgis_core.Qgis.AnnotationItemFlags qgis_core.Qgis.AnnotationItemGuiFlags qgis_core.Qgis.BabelCommandFlags qgis_core.Qgis.BabelFormatCapabilities qgis_core.Qgis.BrowserItemCapabilities qgis_core.Qgis.CoordinateTransformationFlags qgis_core.Qgis.DataItemProviderCapabilities qgis_core.Qgis.DataProviderFlags qgis_core.Qgis.DatabaseProviderConnectionCapabilities2 qgis_core.Qgis.DateTimeStatistics qgis_core.Qgis.FeatureRequestFlags qgis_core.Qgis.FieldConfigurationFlags qgis_core.Qgis.FileOperationFlags qgis_core.Qgis.GeometryValidityFlags qgis_core.Qgis.GpsInformationComponents qgis_core.Qgis.HistoryProviderBackends qgis_core.Qgis.LabelLinePlacementFlags qgis_core.Qgis.LabelPolygonPlacementFlags qgis_core.Qgis.LabelingFlags qgis_core.Qgis.LayerFilters qgis_core.Qgis.LayerTreeFilterFlags qgis_core.Qgis.LegendJsonRenderFlags qgis_core.Qgis.LoadStyleFlags qgis_core.Qgis.MapLayerActionFlags qgis_core.Qgis.MapLayerActionTargets qgis_core.Qgis.MapLayerProperties qgis_core.Qgis.MapLayerRendererFlags qgis_core.Qgis.MapSettingsFlags qgis_core.Qgis.MarkerLinePlacements qgis_core.Qgis.MessageLevel qgis_core.Qgis.PlotToolFlags qgis_core.Qgis.ProcessingAlgorithmFlags qgis_core.Qgis.ProcessingFeatureSourceDefinitionFlags qgis_core.Qgis.ProcessingFeatureSourceFlags qgis_core.Qgis.ProcessingParameterFlags qgis_core.Qgis.ProcessingParameterTypeFlags qgis_core.Qgis.ProcessingProviderFlags qgis_core.Qgis.ProfileGeneratorFlags qgis_core.Qgis.ProjectCapabilities qgis_core.Qgis.ProjectFlags qgis_core.Qgis.ProjectReadFlags qgis_core.Qgis.ProviderStyleStorageCapabilities qgis_core.Qgis.RasterBandStatistics qgis_core.Qgis.RasterInterfaceCapabilities qgis_core.Qgis.RasterProviderCapabilities qgis_core.Qgis.RasterRendererCapabilities qgis_core.Qgis.RasterRendererFlags qgis_core.Qgis.RasterTemporalCapabilityFlags qgis_core.Qgis.RelationshipCapabilities qgis_core.Qgis.RenderContextFlags qgis_core.Qgis.ScriptLanguageCapabilities qgis_core.Qgis.SelectionFlags qgis_core.Qgis.SettingsOptions qgis_core.Qgis.SettingsTreeNodeOptions qgis_core.Qgis.SldExportOptions qgis_core.Qgis.SnappingTypes qgis_core.Qgis.SqlLayerDefinitionCapabilities qgis_core.Qgis.Statistics qgis_core.Qgis.StringStatistics qgis_core.Qgis.SublayerFlags qgis_core.Qgis.SublayerQueryFlags qgis_core.Qgis.SymbolFlags qgis_core.Qgis.SymbolLayerFlags qgis_core.Qgis.SymbolLayerUserFlags qgis_core.Qgis.SymbolPreviewFlags qgis_core.Qgis.SymbolRenderHints qgis_core.Qgis.TextRendererFlags qgis_core.Qgis.TiledSceneProviderCapabilities qgis_core.Qgis.TiledSceneRendererFlags qgis_core.Qgis.TiledSceneRequestFlags qgis_core.Qgis.VectorDataProviderAttributeEditCapabilities qgis_core.Qgis.VectorFileWriterCapabilities qgis_core.Qgis.VectorLayerTypeFlags qgis_core.Qgis.VectorRenderingSimplificationFlags qgis_core.Qgis.VectorTileProviderCapabilities qgis_core.Qgis.VectorTileProviderFlags qgis_core.Qgis.ViewSyncModeFlags qgis_core.Qgis.ZonalStatistics qgis_core.QgsAbstractDatabaseProviderConnection.Capabilities qgis_core.QgsAbstractDatabaseProviderConnection.Capability qgis_core.QgsAbstractDatabaseProviderConnection.GeometryColumnCapabilities qgis_core.QgsAbstractDatabaseProviderConnection.GeometryColumnCapability qgis_core.QgsAbstractDatabaseProviderConnection.QueryResult qgis_core.QgsAbstractDatabaseProviderConnection.SpatialIndexOptions qgis_core.QgsAbstractDatabaseProviderConnection.SqlVectorLayerOptions qgis_core.QgsAbstractDatabaseProviderConnection.TableFlags qgis_core.QgsAbstractDatabaseProviderConnection.TableProperty qgis_core.QgsAbstractGeometry.AxisOrder qgis_core.QgsAbstractGeometry.SegmentationToleranceType qgis_core.QgsAbstractGeometry.WkbFlag qgis_core.QgsAbstractGeometry.WkbFlags qgis_core.QgsArcGisRestUtils.FeatureToJsonFlags qgis_core.QgsAttributeEditorRelation.Button qgis_core.QgsAttributeEditorRelation.Buttons qgis_core.QgsAuthManager.MessageLevel qgis_core.QgsDataSourceUri.SslMode qgis_core.QgsFieldProxyModel.Filter qgis_core.QgsFieldProxyModel.Filters qgis_core.QgsLayoutManagerProxyModel.Filter qgis_core.QgsLayoutManagerProxyModel.Filters qgis_core.QgsLocatorFilter.Flag qgis_core.QgsLocatorFilter.Flags qgis_core.QgsLocatorFilter.Priority qgis_core.QgsMapLayer.LayerFlag qgis_core.QgsMapLayer.LayerFlags qgis_core.QgsMapLayer.PropertyType qgis_core.QgsMapLayer.ReadFlag qgis_core.QgsMapLayer.ReadFlags qgis_core.QgsMapLayer.StyleCategories qgis_core.QgsMapLayer.StyleCategory qgis_core.QgsMeshDriverMetadata.MeshDriverCapabilities qgis_core.QgsMeshDriverMetadata.MeshDriverCapability qgis_core.QgsPointCloudAttributeProxyModel.Filter qgis_core.QgsPointCloudAttributeProxyModel.Filters qgis_core.QgsProcessing.LayerOptionsFlags qgis_core.QgsProjectStyleDatabaseProxyModel.Filters qgis_core.QgsRasterProjector.Precision qgis_core.QgsRenderChecker.Flags qgis_core.QgsServerWmsDimensionProperties.PredefinedWmsDimensionName qgis_core.QgsServerWmsDimensionProperties.WmsDimensionInfo qgis_core.QgsSnappingConfig.IndividualLayerSettings qgis_core.QgsSnappingConfig.ScaleDependencyMode qgis_core.QgsSnappingConfig.SnappingType qgis_core.QgsTask.Flag qgis_core.QgsTask.Flags qgis_core.QgsTask.SubTaskDependency qgis_core.QgsTask.TaskStatus qgis_gui.QgsAdvancedDigitizingDockWidget.CadCapacities qgis_gui.QgsAdvancedDigitizingDockWidget.CadCapacity qgis_gui.QgsAdvancedDigitizingDockWidget.CadConstraint qgis_gui.QgsAdvancedDigitizingDockWidget.WidgetSetMode qgis_gui.QgsAttributeEditorContext.FormMode qgis_gui.QgsAttributeEditorContext.Mode qgis_gui.QgsAttributeEditorContext.RelationMode qgis_gui.QgsAttributeTableFilterModel.ColumnType qgis_gui.QgsAttributeTableFilterModel.FilterMode qgis_gui.QgsAuthSettingsWidget.WarningType qgis_gui.QgsCodeEditor.Flags qgis_gui.QgsColorButton.Behavior qgis_gui.QgsColorRampLegendNodeWidget.Capabilities qgis_gui.QgsColorTextWidget.ColorTextFormat qgis_gui.QgsCoordinateReferenceSystemProxyModel.Filter qgis_gui.QgsCoordinateReferenceSystemProxyModel.Filters qgis_gui.QgsDualView.FeatureListBrowsingAction qgis_gui.QgsDualView.ViewMode qgis_gui.QgsExpressionBuilderWidget.Flag qgis_gui.QgsExpressionBuilderWidget.Flags qgis_gui.QgsFileWidget.RelativeStorage qgis_gui.QgsFileWidget.StorageMode qgis_gui.QgsFilterLineEdit.ClearMode qgis_gui.QgsFloatingWidget.AnchorPoint qgis_gui.QgsFontButton.Mode qgis_gui.QgsGui.HigFlag qgis_gui.QgsGui.HigFlags qgis_gui.QgsGui.ProjectCrsBehavior qgis_gui.QgsMapToolIdentify.IdentifyMode qgis_gui.QgsMapToolIdentify.IdentifyResult qgis_gui.QgsMapToolIdentify.LayerType qgis_gui.QgsMapToolIdentify.Type qgis_gui.QgsMediaWidget.Mode qgis_gui.QgsProcessingToolboxProxyModel.Filters qgis_gui.QgsRelationEditorWidget.Button qgis_gui.QgsRelationEditorWidget.Buttons qgis_gui.QgsSourceSelectProvider.Capabilities qgis_gui.QgsSourceSelectProvider.Ordering qgis_gui.QgsSublayersDialog.LayerDefinition qgis_gui.QgsSublayersDialog.PromptMode qgis_gui.QgsSublayersDialog.ProviderType qgis_gui.QgsVectorLayerSaveAsDialog.Options ```