Unable to load the Speckle plugin on QGIS for Mac

I’ve tried to load the Speckle 2.0 Connector for QGIS using the QGIS plugin manager window. The plugin was installed successfully but its toolbar didn’t load. I also have tried to reinstall and install from the zip file. When I relaunch QGIS a error message appears with the following

Unable to load plugin ‘speckle-qgis’ due to a error when calling Class Factory().

AttributeError: module ‘speckle-qgis’ has no attribute ‘classFactory’

Traceback (most recent call last):
File “/Applications/QGIS-LTR.app/Contents/MacOS/…/Resources/python/qgis/utils.py”, line 423, in _startPlugin
plugins[packageName] = package.classFactory(iface)
AttributeError: module ‘speckle-qgis’ has no attribute ‘classFactory’

Python version: 3.8.7 (default, Feb 10 2021, 09:04:08) [Clang 12.0.0 (clang-1200.0.32.29)]
QGIS version: 3.22.10-Białowieża Białowieża, 44701d6dd7

Python Path:

  • /Applications/QGIS-LTR.app/Contents/MacOS/…/Resources/python
  • /Users/femfs/Library/Application Support/QGIS/QGIS3/profiles/default/python
  • /Users/femfs/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins
  • /Applications/QGIS-LTR.app/Contents/MacOS/…/Resources/python/plugins
  • /Applications/QGIS-LTR.app/Contents/MacOS/lib/python3.8/site-packages/GDAL-3.2.1-py3.8-macosx-10.13.0-x86_64.egg
  • /Applications/QGIS-LTR.app/Contents/MacOS/lib/python3.8/site-packages/cftime-1.2.1-py3.8-macosx-10.13.0-x86_64.egg
  • /Applications/QGIS-LTR.app/Contents/MacOS/lib/python3.8/site-packages/affine-2.3.0-py3.8.egg
  • /Applications/QGIS-LTR.app/Contents/MacOS/lib/python3.8/site-packages/statsmodels-0.11.1-py3.8-macosx-10.13.0-x86_64.egg
  • /Applications/QGIS-LTR.app/Contents/MacOS/lib/python3.8/site-packages/rasterio-1.1.5-py3.8-macosx-10.13.0-x86_64.egg
  • /Applications/QGIS-LTR.app/Contents/MacOS/lib/python38.zip
  • /Applications/QGIS-LTR.app/Contents/MacOS/lib/python3.8/site-packages/scipy-1.5.1-py3.8-macosx-10.13.0-x86_64.egg
  • /Applications/QGIS-LTR.app/Contents/MacOS/lib/python3.8
  • /Applications/QGIS-LTR.app/Contents/MacOS/lib/python3.8/site-packages/geopandas-0.8.1-py3.8.egg
  • /Applications/QGIS-LTR.app/Contents/MacOS/lib/python3.8/site-packages/opencv_contrib_python-4.3.0.36-py3.8-macosx-10.13.0-x86_64.egg
  • /Applications/QGIS-LTR.app/Contents/MacOS/lib/python3.8/site-packages/Pillow-7.2.0-py3.8-macosx-10.13.0-x86_64.egg
  • /Applications/QGIS-LTR.app/Contents/MacOS/lib/python3.8/site-packages/patsy-0.5.1-py3.8.egg
  • /Applications/QGIS-LTR.app/Contents/MacOS/lib/python3.8/site-packages/numpy-1.20.1-py3.8-macosx-10.13.0-x86_64.egg
  • /Applications/QGIS-LTR.app/Contents/MacOS/lib/python3.8/site-packages/pandas-1.1.0-py3.8-macosx-10.13.0-x86_64.egg
  • /Applications/QGIS-LTR.app/Contents/MacOS/lib/python3.8/site-packages/matplotlib-3.3.0-py3.8-macosx-10.13.0-x86_64.egg
  • /Applications/QGIS-LTR.app/Contents/MacOS/lib/python3.8/site-packages/numba-0.50.1-py3.8-macosx-10.13.0-x86_64.egg
  • /Applications/QGIS-LTR.app/Contents/MacOS/lib/python3.8/lib-dynload
  • /Applications/QGIS-LTR.app/Contents/MacOS/lib/python3.8/site-packages/Rtree-0.9.4-py3.8.egg
  • /Applications/QGIS-LTR.app/Contents/MacOS/lib/python3.8/site-packages/Fiona-1.8.13.post1-py3.8-macosx-10.13.0-x86_64.egg
  • /Applications/QGIS-LTR.app/Contents/MacOS/lib/python3.8/site-packages/snuggs-1.4.7-py3.8.egg
  • /Applications/QGIS-LTR.app/Contents/MacOS/lib/python3.8/site-packages
  • /Applications/QGIS-LTR.app/Contents/MacOS/lib/python3.8/site-packages/pyproj-2.6.0-py3.8-macosx-10.13.0-x86_64.egg
  • /Applications/QGIS-LTR.app/Contents/MacOS/lib/python3.8/site-packages/netCDF4-1.5.4-py3.8-macosx-10.13.0-x86_64.egg
  • /Applications/QGIS-LTR.app/Contents/MacOS/lib/python3.8/site-packages/click_plugins-1.1.1-py3.8.egg
  • /Users/femfs/Library/Application Support/QGIS/QGIS3/profiles/default/python
1 Like

I can replicate this error with the version that is available from the QGIS plugin manager. :cry: The v2.9.0 tagged release on both the public QGIS marketplace and our speckle-qgis is also not working.

However, I can also help you manually install our most recent version (2.9.3) and get you up and running. The latest code available is functional. :tada:

  1. Uninstall the broken Speckle plugin from the manager
    Screenshot 2022-10-26 at 20.15.57

  2. Open your active User profile directory
    image

  3. Navigate to the plugins directory
    image

  4. Download the .zip from the main branch v2.9.3 on the speckle-gis GitHub repo into the plugins folder

  5. Expand the Zip
    image

  6. Restart QGIS

  7. You can now enable the Speckle plugin in the manager. Activating it will pause as it downloads dependencies (specklepy)
    image

  8. ENJOY! :clinking_glasses:

1 Like

This is the same procedure for any QGIS PC users who may find their way here while we fix the Release.

It didn’t work. I’ve replicated your steps and got the same error.
According to the Plugin Manager, the version of Speckle installed with your ZIP file still is 2.9.0 and not the 2.9.3.
If it makes any difference my macOS is Ventura 13.0 (22A380).

I have tested this on Monterey. Ventura is taunting me with an update now badge.

To try and resolve this for you, can you try with a new User Profile? i.e. no other plugins installed

image

In a new profile, you will likely have to create the plugins folder.

/Users/jonathon/Library/Application Support/QGIS/QGIS3/profiles/v2.9.3/python/plugins


Confusingly, the Plugin Information page continues to be delivered by the QGIS Plugins site even though you have manually installed a newer version. Hence the incorrect v2.9.0

The problem seems to persist, despite creating a new profile with no other plugins installed.

I’m afraid without installing latest macOS, I’m unable to replicate your setup to mirror the persistent problem. I’m not convinced that is the cause, but I also am using a slightly different version of QGIS.

Last roll of the dice before I have to then consult the QGIS team (timezones), instead of downloading the repo latest zip, are you familiar enough with git that you could clone the repo into the plugins folder? The fact that, for me, the initial error went away I want to get rule out bad links or zip files altogether.

This is the method we use when developing/testing.

With QGIS closed, in Terminal, navigate to the profile directory and type:

git clone https://github.com/specklesystems/speckle-qgis.git

Restart QGIS and enable Speckle in the Manager.

For the sake of completeness, if when enabling you still get an error, change nothing. Restart QGIS and check again.

I know I have had other plugins for QGIS PC in the past that install from an expanded zip, report an error but then operate fine on the next launch.

The quick fix was released as 2.9.4 :fire: if steps above didn’t work for you, please try in a few days when it’s approved and available through Plugin Manager :pray:

P.S. when replicating the steps above and copying files over, make sure QGIS is closed

1 Like

Once again, the problem persist, even after replicating the steps suggested using github terminal for desktop.

We pushed a new version to the QGIS plug-in repository this week. It should be approved soon. In the meantime it is possible to install manually by cloning our repo code into the plugins folder

1 Like

I have quickly recorded a video of the manual install method that seems to solve it in Mac,PC and multiple versions of QGIS.

Do make sure your plugins folder has no trace of speckle-qgis before you download from the repo.

1 Like

@femfs Were you able to resolve this plugin install error with the guide we posted?

In case you didn’t, you may be please to hear that the fixed version has been activated in the QGIS Plugin repository.

You can now install using the Plugin Manager.

So, I’ve tried both ways and the result is the same. Either Plugin Manager and Github repository failed.
However, I get a different message this time. It’s the following:

ModuleNotFoundError: No module named ‘specklepy’

Traceback (most recent call last):
File “/Applications/QGIS-LTR.app/Contents/MacOS/…/Resources/python/qgis/utils.py”, line 423, in _startPlugin
plugins[packageName] = package.classFactory(iface)
File “/Users/femfs/Library/Application Support/QGIS/QGIS3/profiles/FEMFS/python/plugins/speckle-qgis-main/init.py”, line 51, in classFactory
from speckle_qgis import SpeckleQGIS
File “/Applications/QGIS-LTR.app/Contents/MacOS/…/Resources/python/qgis/utils.py”, line 888, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
File “/Users/femfs/Library/Application Support/QGIS/QGIS3/profiles/FEMFS/python/plugins/speckle-qgis-main/speckle_qgis.py”, line 24, in
from specklepy.api import operations
File “/Applications/QGIS-LTR.app/Contents/MacOS/…/Resources/python/qgis/utils.py”, line 888, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
ModuleNotFoundError: No module named ‘specklepy’

I’m starting to wonder about the interaction between Ventura system python runtime and the LTR build of 3.22 QGIS

A couple of things to try:

  1. Could you take a look inside /Applications/QGIS-LTR.app/Contents/MacOS/lib/python3.9/site-packages/ and see if specklepy module folder is in there

    To navigate to a folder inside a macOS application use

  2. a. Within the QGIS python console, could you try typing import specklepy and paste any error here.
    b. If there was no error, in the Python console, type specklepy and paste the response here

    To launch the Python console from QGIS:

    Launch Python Console

A post was split to a new topic: Unable to install Speckle-QGIS on M1 Mac