Opened 6 years ago

Closed 6 years ago

#56001 closed defect (wontfix)

qgis3 - no write/read of Geopackage or Sqlite databases

Reported by: Malauch Owned by: Veence (Vincent)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc:
Port: qgis3

Description

Hi, I noticed that there is no Geopackage or Sqlite support in qgis3 port. I can't either save or read these databases. On other platforms (windows and linux) there is no problem like that.

Attachments (2)

Zrzut ekranu 2018-03-17 o 15.08.02.png (195.3 KB) - added by Malauch 6 years ago.
Zrzut ekranu 2018-03-27 o 08.53.51.png (224.3 KB) - added by Malauch 6 years ago.

Download all attachments as: .zip

Change History (21)

comment:1 Changed 6 years ago by Schamschula (Marius Schamschula)

Cc: Veence removed
Owner: set to Veence
Status: newassigned

Please don't set priority. This field is for MacPorts maintainers.

comment:2 Changed 6 years ago by Schamschula (Marius Schamschula)

Priority: HighNormal

comment:3 Changed 6 years ago by mf2k (Frank Schima)

Keywords: qgis geopackage sqlite database removed

comment:4 Changed 6 years ago by Malauch

I noticed that when trying to create new geopackage or sqlite layer QGIS shows error: "Layer creation failed. GeoPackage driver not found."

comment:5 Changed 6 years ago by Veence (Vincent)

I don’t seem to have the same problem. I can create a SQLite layer, however the DB manager doesn’t work. Is that what you get?

Changed 6 years ago by Malauch

comment:6 Changed 6 years ago by Malauch

My mistake, it's true that creating Sqlite works but for Geopackage still doesn't. Reading doesn't work for both formats.

comment:7 Changed 6 years ago by Malauch

Today I noticed that problem is wider, because there is no option to connect any database type when adding vector layer (for example ODBC). I checked oficial binaries from KyngChaos on VM and there wasn't any problem like that.

comment:8 Changed 6 years ago by Malauch

Is there any progress in that matter or only I have that problem with connection to data base driver?

comment:9 Changed 6 years ago by Veence (Vincent)

Did you upgrade to 3.0.1?

comment:10 Changed 6 years ago by Malauch

Yes, I did. The MacPorts build is the only one which has problem like that. Official MacOS binaries, Linux version, Windows version all read and write geopackage without problem.

comment:11 Changed 6 years ago by Veence (Vincent)

I can create Geopackage layers, but trying to open one crashes QGis. Do you get the same behaviour?

comment:12 Changed 6 years ago by Veence (Vincent)

If you have loaded the "official Mac binaries" could you take a screen shot of the "about" dialogue to know what versions it is linked against? Thanks.

comment:13 Changed 6 years ago by Malauch

In Macport's QGIS version I don't have crash, only dialog about no data base drive or "can't connect to database".

Changed 6 years ago by Malauch

comment:14 Changed 6 years ago by Veence (Vincent)

You’re still using the 3.0.0 version. Try upgrading to the 3.0.1 I committed yesterday and tell me if that bug is always here.

comment:15 Changed 6 years ago by Malauch

That "About" screenshot is from "official" KyngChaos version.

comment:16 Changed 6 years ago by Malauch

In addition in Macport's version, when trying to connect to Sqlite database from database manager there are some python bugs.

			  File "/Applications/MacPorts/Qgis3.app/Contents/MacOS/../Resources/python/plugins/db_manager/db_model.py", line 441, in rowCount
			    self._refreshIndex(parent, True)
			  File "/Applications/MacPorts/Qgis3.app/Contents/MacOS/../Resources/python/plugins/db_manager/db_model.py", line 490, in _refreshIndex
			    if item.populate():
			  File "/Applications/MacPorts/Qgis3.app/Contents/MacOS/../Resources/python/plugins/db_manager/db_model.py", line 167, in populate
			    if not connection.connect():
			  File "/Applications/MacPorts/Qgis3.app/Contents/MacOS/../Resources/python/plugins/db_manager/db_plugins/spatialite/plugin.py", line 80, in connect
			    return self.connectToUri(uri)
			  File "/Applications/MacPorts/Qgis3.app/Contents/MacOS/../Resources/python/plugins/db_manager/db_plugins/plugin.py", line 109, in connectToUri
			    self.db = self.databasesFactory(self, uri)
			  File "/Applications/MacPorts/Qgis3.app/Contents/MacOS/../Resources/python/plugins/db_manager/db_plugins/spatialite/plugin.py", line 66, in databasesFactory
			    return SLDatabase(connection, uri)
			  File "/Applications/MacPorts/Qgis3.app/Contents/MacOS/../Resources/python/plugins/db_manager/db_plugins/spatialite/plugin.py", line 109, in __init__
			    Database.__init__(self, connection, uri)
			  File "/Applications/MacPorts/Qgis3.app/Contents/MacOS/../Resources/python/plugins/db_manager/db_plugins/plugin.py", line 218, in __init__
			    self.connector = self.connectorsFactory(uri)
			  File "/Applications/MacPorts/Qgis3.app/Contents/MacOS/../Resources/python/plugins/db_manager/db_plugins/spatialite/plugin.py", line 112, in connectorsFactory
			    return SpatiaLiteDBConnector(uri)
			  File "/Applications/MacPorts/Qgis3.app/Contents/MacOS/../Resources/python/plugins/db_manager/db_plugins/spatialite/connector.py", line 51, in __init__
			    self.connection = spatialite_connect(self._connectionInfo())
			  File "/Applications/MacPorts/Qgis3.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 616, in spatialite_connect
			    raise RuntimeError("Cannot find any suitable spatialite module")
			RuntimeError: Cannot find any suitable spatialite module
			

comment:17 Changed 6 years ago by Veence (Vincent)

Interesting. I’ll try that later today. Thanks for the info.

comment:18 Changed 6 years ago by Malauch

I solve that problem. Today I tried to use ogr2ogr in Terminal and I found out that there are almost no drivers installed. I install gdal with additional variants: ` sudo port install gdal +odbc +spatialite +sqlite3 ` Now it support all necessary formats in ogr2ogr and QGIS. I think QGIS should install all these variants by default.

comment:19 Changed 6 years ago by Veence (Vincent)

Resolution: wontfix
Status: assignedclosed

Ah, okay, I will do that, makes sense. Thanks and sorry for the hair tearing —

Note: See TracTickets for help on using tickets.