QGIS Connector WIP

Thanks @teocomi for you reply!

Here I created a stream with some buildings of my town downloaded from OSM.

Somehow I’ve managed to mess the features attributes, but it can be a good example of the use case: being able to make edits to the attributes in excel and send it back to QGIS.

Unfortunately the data chunks and __closure fields don’t play well with this kind of task!

For the Civil 3D → QGIS part, if I understood the current code correctly, the qgis plugin only looks for Layer objects (and its children) from the stream, so it only works with its own data (and indeed I was able to copy the polygons to an empty qgis project).

For my specific use case, I don’t care much if the received alignment(s) will be placed in a new or existing layer, but I can imagine some cases where, e.g., CAD layers need to be transposed to qgis layers - if they have only a single geometry type!

1 Like

Hello,

I am trying to install the speckle plugin for QGIS.
Running into the same issue than @tlmn
I did pip install specklepy. Is it because my version of QGIS is too recent ? Currently installing 3.16.13

2 Likes

Hi @pauldotnet

Are you trying to install the connector via the package manager from QGIS? or directly from code?

We added a dependency installer that should check if specklepy is installed upon load and if it isn’t it should install it itself (or upgrade it if needed)

Not sure about the QGIS version, I use 3.22 but I’m aware Kateryna does use 3.16 so in theory it should be fine with both.

If you’re installing the connector directly from the github repo, try installing the latest main branch.

EDIT: Also, what system are you running QGIS from?

thanks @AlanRynne for the instant reply. I tried to install from QGIS’ package manager. Will try from the github repo then, hopefully the dependency installer with solve this.

If you mean Mac or Windows, I am using Windows

I’ll try to debug on your specific version of QGIS to check if it has anything to do with that.

The latest version in the QGIS package manager should have the dependency installer… so I’m leaning towards considering this an unknown bug for now. Thanks for bringing it up.

On a sidenote, just to try to pinpoint the issue a bit more. In windows there are several ways to install QGIS afaik, I know of:

  • Using the Standalone Version installer
  • Using the OSGEO4W installer
  • Maybe there’s more?

Which one did you use? This will help me reproduce your steps and hopefully get the same issue

Thank you for investigating further. I installed QGIS from this Standalone

2 Likes

Hi @sanzoghenzo ! Sorry for a long time to respond. We are working on a new release right now which would allow receiving data from other software than only GIS. Would you mind sharing a sample of the data you sent from Civil3d, here or in PM? If you can make me a stream collaborator for existing or a new test stream would be great!

Hello, I’ve reinstalled QGIS and and still getting the same error as posted above. Any new tips for bypassing this ?

ModuleNotFoundError: No module named 'specklepy' 
Traceback (most recent call last):
  File "C:\PROGRA~1/QGIS32~1.7/apps/qgis-ltr/./python\qgis\utils.py", line 423, in _startPlugin
    plugins[packageName] = package.classFactory(iface)
  File "C:\Users/PPoinet/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\speckle-qgis\__init__.py", line 51, in classFactory
    from speckle_qgis import SpeckleQGIS
  File "C:\PROGRA~1/QGIS32~1.7/apps/qgis-ltr/./python\qgis\utils.py", line 888, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
  File "C:\Users\PPoinet\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\speckle-qgis\speckle_qgis.py", line 25, in 
    from specklepy.api import operations
  File "C:\PROGRA~1/QGIS32~1.7/apps/qgis-ltr/./python\qgis\utils.py", line 888, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
ModuleNotFoundError: No module named 'specklepy'


Version de Python : 3.9.5 (tags/v3.9.5:0a7dcbd, May  3 2021, 17:27:52) [MSC v.1928 64 bit (AMD64)] 
Version de QGIS : 3.22.7-Białowieża Białowieża, 5a65627a 

Chemin Python :
C:\Users\PPoinet\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\speckle-qgis
C:/PROGRA~1/QGIS32~1.7/apps/qgis-ltr/./python
C:/Users/PPoinet/AppData/Roaming/QGIS/QGIS3\profiles\default/python
C:/Users/PPoinet/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins
C:/PROGRA~1/QGIS32~1.7/apps/qgis-ltr/./python/plugins
C:\Program Files\QGIS 3.22.7\bin\python39.zip
C:\PROGRA~1\QGIS32~1.7\apps\Python39\DLLs
C:\PROGRA~1\QGIS32~1.7\apps\Python39\lib
C:\Program Files\QGIS 3.22.7\bin
C:\PROGRA~1\QGIS32~1.7\apps\Python39
C:\PROGRA~1\QGIS32~1.7\apps\Python39\lib\site-packages
C:\PROGRA~1\QGIS32~1.7\apps\Python39\lib\site-packages\GDAL-3.4.3-py3.9-win-amd64.egg
C:\PROGRA~1\QGIS32~1.7\apps\Python39\lib\site-packages\win32
C:\PROGRA~1\QGIS32~1.7\apps\Python39\lib\site-packages\win32\lib
C:\PROGRA~1\QGIS32~1.7\apps\Python39\lib\site-packages\Pythonwin
C:/Users/PPoinet/AppData/Roaming/QGIS/QGIS3\profiles\default/python
2 Likes

Hey @pauldotnet,

Could you try installing specklepy directly from your QGIS python environment? Just to ensure it is, in fact, being installed.

I cannot manage to reproduce your issue with your exact version, so I’ll need to look into it a bit.

Quick question, once QGIS opens (and after that exception), do you have a “Speckle” message panel in QGIS? And if so, does it show the message?

If it doesn’t, it may be that the “auto-installer” we included is not doing the trick for you for some reason. I’m going to look into this further, but i’d be happy to schedule a call to look into your particular case as I’m sure you’re not the only one affected by it, just the only one that brought it up :raised_hands:t3:

And sorry for the late reply on this! It fell through the cracks of Discourse :sweat:

2 Likes

Hi Alan,
Many thanks for the answer.
I finally successfully installed the plugin after pip install in the command prompt. I thought I tried last time but didn’t work back then. So yeah, not sure why but in my case Speckle hasn’t installed it automatically.
All good!

Sorry, couldn’t replicate this one after the plug-in got installed :stuck_out_tongue:

2 Likes

Glad to know that a manual install fixed the issue!

Not sure how it can get to that point without installing specklepy. I guess there’s some hole in our logic we need to patch!

One quick advice, i think the latest QGIS version hasn’t yet been updated to the latest specklepy version, so make sure you install the one it’s expecting: 2.6.4.

If you just did pip install specklepy you may have gotten the latest 2.7.4 which I’m not sure but it may have breaking changes.

We’ll update it for our latest release, but if you want to keep up with the latest updates, cloning our repo into your plugins folder is a good way to go :slight_smile: that way you could pull any urgent fixes before a “stable release” is approved by the QGIS marketplace (which usually takes a couple days at least)

I actually tried to send data into speckle.
This is a shp file from SNCF open data available here

I created a stream via the browser, selected it, sent it. but it says “no displayable objects found in object xxxx”

The data view doesn’t show anything

Stream ID : fb7352fbd9

Any clue… ?

1 Like

Hmmm… silly question, but could it be that you didn’t select any layer to send on the SpeckleQGIS panel?

PS: we desperately need to upgrade the UI, it’s on our todo’s already :slight_smile:

1 Like

I guess I did :confused:

It will allow you to press send without a layer selected. The layers list shows the available layers. It isn’t clear but you do need to select them in the list.

2 Likes

@jsdbroughton beat me to it!

Screenshot 2022-07-06 at 13.28.25

1 Like

aha! wohooo
thank you both!

2 Likes

A post was split to a new topic: Rhino crash when receiving QGIS Raster layers

New version has been released few hours ago! Many issues raised here are now fixed and CAD integration simplified:)

3 Likes