Stream Access as Collaborator

Quick question (maybe stupid haha): I want to clone a project. I am collaborator on the project.

client = SpeckleClient(host="app.speckle.systems")
client.authenticate_with_token(self.auth_token)

# get Speckle Stream Wrapper
wrapper = StreamWrapper(self.url)

Initializing the wrapper, I get this error:

Seems like I don’t have access rights. I thought I could access data as collaborator. Am I wrong?
Do I only have access as owner?

Quick other question: Is there already some script lying around for cloning projects into my workspace.

Hey @janix,

You should be able to access the data if you are a collaborator. Do you have access to other projects that you are the Owner?

Make sure the auth.token you are using has the appropriate permissions.

You can also try the following because you are using the Wrapper, and I guess you have the Speckle Manager.

# initialise the client
client = SpeckleClient(host="app.speckle.systems")

# authenticate the client with a token
account = get_default_account()
client.authenticate_with_account(account)

On the following, I think @jonathon has something lying around.

See if any of these works and let us know.
Thanks

1 Like

After more debugging:

Eventually all other projects (whether I am owner or collaborator) I can access and I get the commit data via GraphQL (so the access token works). But for this specific project, it does not work.

Can owners restrict my access such that GraphQL does not work? (I have edit rights though for the project)

The project is set on “Private”. Does it have to be on “Link sharable”?

Hi @janix,

Are you using (or able to use) accounts add local accounts through Manager for Speckle?

I believe the problem you are seeing is the StreamWrapper will only try and use these local accounts and does not currently allow for passing a authentication/personal access token.

If you are able to use local accounts, then the following should work for you (without having to manually generate tokens):

  wrapper = StreamWrapper(self.url)
  client = wrapper.get_client()

If you need to specify a token directly, please let me know and we’ll track an issue to investigate further how we can enable the StreamWrapper to do this.

1 Like

I have my collaborator account connected via the Speckle Manager. Unfortunately, it still does not work.

I actually have no clue, as I can import other projects with exactly the same setup (collaborator, project is set on private). Both links lead me to the viewer (so the URL are working).

The wrapper fails when send a test query (or at least it executes a http_request?):

specklepy/core/api/wrapper.py", line 157, in __init__
    project = self._client.httpclient.execute(query, params)

I have one more potential idea: the file is probably quite big (as a point cloud is included). Can that have any influence on the access?

Hi @janix ,
please try to construct the StreamWrapper with the basic project URL, e.g. “https://app.speckle.systems/projects/0000000000
If this makes difference, please send us the original URL you have tried for further debugging:) (you can replace random characters in the URL for privacy, just want to see the format that has failed)

Otherwise, pls let us know how is that failing project any different from the rest, e.g. stored on different URL, accessed from different Account in SpeckleManager; and if you can access the data from the project using any of the connectors :raised_hands:

Hi Speckle team,

don’t know what happened, but when trying your instructions, eventually I did not get the error with StreamWrapper. Now it works.

Thanks for your effort everybody!

3 Likes

Please let us know if the issue re-surfaces.

1 Like