"'SpeckleClient' object has no attribute 'stream'" - IFC Universal

Hi everyone I was looking for automation options to upload files in bulk in the Speckle environment and I came across this post about IFC Universal connector - for workspaces . @oscarazzus It really caught my attention, I was trying to use it but every time I use it I get this warning [Image 1].

As you can see I have that warning on the web.

The steps I performed were the same as in the post.
I have the current Starter plan.

I don’t know if I have to modify anything else that I am not contemplating.
Thank you in advance for your response.

Hi Joff, are you using workspaces on speckle? if not, you need to use it. Please check you token too; be sure to use all the good scopes.

Thanks for the quick responses @oscarazzus .
I have these workspaces.

When I was looking for the option to activate tokens I found this configuration

I don’t know if it is the correct opcionts to activate the tokens.

Hi @Joff_20,

Looking at @oscarazzus 's post, the instructions to pip install specklepy will result in you installing the latest version of SpecklePy, which today is 3.0.1.

I believe that v3.x.x specklepy is not compatible with his app -
With version 3, the deprecated api functions speckle_client.stream, speckle_client.branch, speckle_client.commit, etc… functions were removed. Hence the error you see about the streams attribute no longer existing. You can see a more detailed description of what’s changed here: Specklepy 3.0.0 is here


I suggest, as a work around, you install a v2 version of specklepy.
@oscarazzus may be able to suggest the specklepy version he’s designed the app to work with. But as an example, you can install a specific specklepy version like so:

pip install specklepy==2.23.0


@oscarazzus you may consider updating your instructions to pin specklepy to v2.
If you need any help updating your app to be compatible with v3, I’m hear to answer any questions.

2 Likes

Hi Jedd thanks; yes I will put a comment on my post! When I published my post I used the last availeble specklepy version that was the 2.23.0 , some day after you release the version 3.0.1 and you right my script can not work with this version.
So yes please, if you can share with me the modification I need to made in the script I will publish a newest version that is able to use v 3.0.1 specklepy!
Thanks again

2 Likes

This post summarises the breaking changes Specklepy 3.0.0 is here


Hopefully most of the functions have a straightforward replacement if you’re familiar with The Great Rename.
client.stream.createclient.project.create
client.branch.updateclient.model.update
client.commit.getclient.version.get
etc…

Look at the function inputs, they probably have changed somewhat, so refer to the source code. I recommend using an IDE that has some sort of language server e.g. VSCode’s python extension.

There are a couple no-so-obvious function replacements, so don’t hesitate to ask if you run into any troubles.

client.stream.listclient.active_user.get_projects
client.stream.searchclient.active_user.get_projects with a UserProjectsFilter
client.stream.inviteclient.project_invite.create


Additionally, many of the Objects types have changed. It looks like you’re just using Mesh and Base which haven’t changed significantly. But you may find that they expect all args to be passed via the constructor now.
It should give you a clear error message if you’re not already.

Lmk if you get stuck.

@Jedd I just put a comment on my original post; but I’m not able to edit myself the post idk why; if you can do it as administrator should be fine! Thanks again

2 Likes

Thank you very much to both of you @Jedd @oscarazzus , Try uninstalling SpecklePy 3.0.1 in the same environment and installing version 2.23.0 and everything works great.

3 Likes

very very nice :slight_smile: I like you are keeping the text in italian :smiley: thanks