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.