Bug report #21455

macOS: Error when attempting to connect spatialite DB in DB manager

Added by ann rae over 5 years ago. Updated over 5 years ago.

Status:Open
Priority:Normal
Assignee:-
Category:mac_os_specific
Affected QGIS version:3.6.0 Regression?:No
Operating System:Mac Mojave 10.14.3 Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:29272

Description

Error when attempting to connect spatialite DB in DB manager:
Traceback (most recent call last):
  File "/Applications/QGIS3.6.app/Contents/MacOS/../Resources/python/plugins/db_manager/db_model.py", line 444, in rowCount
    self._refreshIndex(parent, True)
  File "/Applications/QGIS3.6.app/Contents/MacOS/../Resources/python/plugins/db_manager/db_model.py", line 493, in refreshIndex
    if item.populate():
  File "/Applications/QGIS3.6.app/Contents/MacOS/../Resources/python/plugins/db_manager/db_model.py", line 170, in populate
    if not connection.connect():
  File "/Applications/QGIS3.6.app/Contents/MacOS/../Resources/python/plugins/db_manager/db_plugins/spatialite/plugin.py", line 78, in connect
    return self.connectToUri(uri)
  File "/Applications/QGIS3.6.app/Contents/MacOS/../Resources/python/plugins/db_manager/db_plugins/plugin.py", line 109, in connectToUri
    self.db = self.databasesFactory(self, uri)
  File "/Applications/QGIS3.6.app/Contents/MacOS/../Resources/python/plugins/db_manager/db_plugins/spatialite/plugin.py", line 64, in databasesFactory
    return SLDatabase(connection, uri)
  File "/Applications/QGIS3.6.app/Contents/MacOS/../Resources/python/plugins/db_manager/db_plugins/spatialite/plugin.py", line 107, in init
    Database.
_init__(self, connection, uri)
  File "/Applications/QGIS3.6.app/Contents/MacOS/../Resources/python/plugins/db_manager/db_plugins/plugin.py", line 218, in init
    self.connector = self.connectorsFactory(uri)
  File "/Applications/QGIS3.6.app/Contents/MacOS/../Resources/python/plugins/db_manager/db_plugins/spatialite/plugin.py", line 110, in connectorsFactory
    return SpatiaLiteDBConnector(uri)
  File "/Applications/QGIS3.6.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/QGIS3.6.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 615, in spatialite_connect
    raise RuntimeError("Cannot find any suitable spatialite module")
RuntimeError: Cannot find any suitable spatialite module

Python version: 3.6.8 (v3.6.8:3c6b436a57, Dec 24 2018, 02:04:31) [GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.57)] 
QGIS version: 3.6.0-Noosa Noosa, exported 

Python Path:
  • /Applications/QGIS3.6.app/Contents/MacOS/../Resources/python
  • /Users/andreaparr/Library/Application Support/QGIS/QGIS3/profiles/default/python
  • /Users/andreaparr/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins
  • /Applications/QGIS3.6.app/Contents/MacOS/../Resources/python/plugins
  • /Library/Frameworks/SQLite3.framework/Versions/E/Python/3.6
  • /Library/Frameworks/Python.framework/Versions/3.6/lib/python36.zip
  • /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6
  • /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/lib-dynload
  • /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages
  • /Users/andreaparr/Library/Application Support/QGIS/QGIS3/profiles/default/python

History

#1 Updated by Giovanni Manghi over 5 years ago

  • Category changed from Python plugins to mac_os_specific
  • Subject changed from RuntimeError: Cannot find any suitable spatialite module to macOS: Error when attempting to connect spatialite DB in DB manager

Possibly a macOS thing. I just tried that on windows and linux and there is no issue.

#2 Updated by Leon van der Meulen over 5 years ago

I've been unable to reproduce this with 3.6 (Lutra installer) on MacOS 10.14.1 nor on 10.14.3.

Steps taken:
Downloaded some data from OSM, exported to spatiallite database with default settings. Made new connection to spatiallite database from DB manager.

Also available in: Atom PDF