Skip to content
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

DB Manager AttributeError when double clicking layer in GeoPackage database #45799

Closed
2 tasks done
dkav opened this issue Nov 2, 2021 · 2 comments · Fixed by #45845
Closed
2 tasks done

DB Manager AttributeError when double clicking layer in GeoPackage database #45799

dkav opened this issue Nov 2, 2021 · 2 comments · Fixed by #45845
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! DB Manager Relating to the DB Manager core plugin Regression Something which used to work, but doesn't anymore

Comments

@dkav
Copy link

dkav commented Nov 2, 2021

What is the bug or the crash?

In a DB Manager window when I double click a GeoPackage layer I get the following error–Python error: An error has occurred while executing Python code: See message log (Python Error) for more details. I assumed double clicking would add the the layer to the open QGIS project.

Python Error

021-11-02T08:45:33     WARNING    Traceback (most recent call last):
              File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/plugins/db_manager/db_tree.py", line 162, in addLayer
              layer = table.toMapLayer(table.geometryType())
             AttributeError: 'GPKGVectorTable' object has no attribute 'geometryType'

Stack trace

An error has occurred while executing Python code: 

AttributeError: 'GPKGVectorTable' object has no attribute 'geometryType' 
Traceback (most recent call last):
  File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/plugins/db_manager/db_tree.py", line 162, in addLayer
    layer = table.toMapLayer(table.geometryType())
AttributeError: 'GPKGVectorTable' object has no attribute 'geometryType'

Python version: 3.9.5 (default, Sep 10 2021, 16:18:19) [Clang 12.0.5 (clang-1205.0.22.11)] 
QGIS version: 3.22.0-Białowieża Białowieża, d9022691f1 

Python Path:
/Applications/QGIS.app/Contents/MacOS/../Resources/python
/Users/dkav/Library/Application Support/QGIS/QGIS3/profiles/default/python
/Users/dkav/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins
/Applications/QGIS.app/Contents/MacOS/../Resources/python/plugins
/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/numba-0.50.1-py3.9-macosx-10.13.0-x86_64.egg
/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages
/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/GDAL-3.3.2-py3.9-macosx-10.13.0-x86_64.egg
/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/pyproj-3.2.0-py3.9-macosx-10.13.0-x86_64.egg
/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/opencv_contrib_python-4.3.0.36-py3.9-macosx-10.13.0-x86_64.egg
/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/patsy-0.5.1-py3.9.egg
/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/Rtree-0.9.7-py3.9-macosx-10.13.0-x86_64.egg
/Applications/QGIS.app/Contents/MacOS/lib/python39.zip
/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/netCDF4-1.5.4-py3.9-macosx-10.13.0-x86_64.egg
/Applications/QGIS.app/Contents/MacOS/lib/python3.9
/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/numpy-1.20.1-py3.9-macosx-10.13.0-x86_64.egg
/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/Pillow-7.2.0-py3.9-macosx-10.13.0-x86_64.egg
/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/Fiona-1.8.13.post1-py3.9-macosx-10.13.0-x86_64.egg
/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/scipy-1.5.1-py3.9-macosx-10.13.0-x86_64.egg
/Applications/QGIS.app/Contents/MacOS/lib/python3.9/lib-dynload
/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/matplotlib-3.3.0-py3.9-macosx-10.13.0-x86_64.egg
/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/statsmodels-0.11.1-py3.9-macosx-10.13.0-x86_64.egg
/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/geopandas-0.8.1-py3.9.egg
/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/cftime-1.2.1-py3.9-macosx-10.13.0-x86_64.egg
/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/rasterio-1.1.5-py3.9-macosx-10.13.0-x86_64.egg
/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/pandas-1.3.3-py3.9-macosx-10.13.0-x86_64.egg
/Users/dkav/Library/Application Support/QGIS/QGIS3/profiles/default/python

Steps to reproduce the issue

  1. Open DB manager.
  2. Create new connection or use existing connection to a GeoPackage database.
  3. Open GeoPackage database.
  4. Double click table/layer.

Versions

QGIS version 3.22.0-Białowieża QGIS code revision d902269
Qt version 5.15.2
Python version 3.9.5
GDAL/OGR version 3.3.2
PROJ version 8.1.1
EPSG Registry database version v10.028 (2021-07-07)
GEOS version 3.9.1-CAPI-1.14.2
SQLite version 3.35.2
PDAL version 2.3.0
PostgreSQL client version 12.3
SpatiaLite version 5.0.1
QWT version 6.1.6
QScintilla2 version 2.11.5
OS version macOS 10.15
       
Active Python plugins
processing 2.12.99
sagaprovider 2.12.99
grassprovider 2.12.99
db_manager 0.1.20
MetaSearch 0.3.5

Supported QGIS version

  • I'm running a supported QGIS version according to the roadmap.

New profile

  • I tried with a new QGIS profile

Additional context

No response

@dkav dkav added the Bug Either a bug report, or a bug fix. Let's hope for the latter! label Nov 2, 2021
@gioman gioman added DB Manager Relating to the DB Manager core plugin Regression Something which used to work, but doesn't anymore labels Nov 2, 2021
@gioman
Copy link
Contributor

gioman commented Nov 2, 2021

@dkav confirmed on Windows too...

@nicogodet
Copy link
Member

The culprit #45223
Ping @lbartoletti

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! DB Manager Relating to the DB Manager core plugin Regression Something which used to work, but doesn't anymore
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants