hopefully is a quick one but I cant figure this out.
I’ve programmatically created Streams and branches using specklepy without a hitch
now, every package I send using transport is always sent to the main stream.
I’ve tried using the Stream Wrapper to create a transport directed to a branch url but im getting an error:
sqlite3.ProgrammingError: SQLite objects created in a thread can only be used in that same thread. The object was created in thread id 4000 and this is thread id 12892
how can I select a specific branch to send data to?
the ServerTransport is kind of a “dumb” concept that is only in charge of:
Sending an object to a stream and returning it’s ID
Receiving an object from a stream by it’s ID
The transport does not send to a specific branch, all uploaded objects belong to a Stream, but are not part of any branch unless you create a commit after uploading it. Which is when you’re able to specify what branch it should belong to.
Notice that on the example Bilal shared, when creating a Transport, you only need to specify the Stream it points to.
I will admit that the error you’re getting seems rather unhelpful Could you share with us a snippet of your code so we can see what’s going on, and either prevent it from happening, or display a more meaningful error instead?
I realized the error was more verbose after the post - I will edit it
Essentially when I looked into the transport object the account keys were empty - even though I authorized with a token previously - the error I was getting it was a credentials error in the end. I installed the speckle Manager and the error just went away.