Bug in specklepy StreamWrapper

Hi all,

I just found a bug in the specklepy StreamWrapper, see this line:
specklepy/wrapper.py at main · specklesystems/specklepy · GitHub

The issue is in the check: if self.host in a.serverInfo.url. Namely, we have our own company Speckle server (rhdhv.speckle.xyz), but I was currently testing with the public server (speckle.xyz). Then of course when performing this check, it will evaluate to True for "speckle.xyz" in "rhdhv.speckle.xyz", meaning that the wrong account (of rhdhv.speckle.xyz) can possibly be assigned to a StreamWrapper with a stream_url of speckle.xyz. This of course gives issues when actually calling the API, returning a GraphQLException.

I now fixed it like below. Would be nice to have a generic fix for it, as I can see this issue happening for more users that will start to use their own server at some point.

3 Likes

Hi @Rob ,

Thanks for bringing this up. I’ll ping our PyQueen🐍 @izzylys on this.

1 Like

Hey @Rob ,

I created an issue on Github. Thanks for reporting it :rose:.

1 Like

Hey @Rob
sorry for acting late on this, but now we have a PR ready with a fix. It should make its way to a new specklepy release soon.

1 Like

Great, thanks for the update!
Let me know when it’s there so we can have a test :slight_smile:

1 Like