Hi all,
I’m working on a project with the help of Speckle + Streamlit. I worked on my local so far. Now I’m trying to deploy it in Streamlit cloud. I used StreamWrapper to get all data for the spesific commit while running locally. I’m getting this error in the cloud now:
/home/adminuser/venv/lib/python3.8/site-packages/streamlit/runtime/scriptrun
ner/script_runner.py:535 in _run_script
/mount/src/project_beam_mvp/pages/Explore_Projects.py:94 in <module>
91 │
92 │ # Get data using object id of selected commit
93 │ obj_id = sCommit.referencedObject
❱ 94 │ commit_data = operations.receive(
95 │ │ obj_id=obj_id, remote_transport=wrapper.get_transport()
96 │ )
97
/home/adminuser/venv/lib/python3.8/site-packages/specklepy/api/operations.py
:53 in receive
50 │ │ Base -- the base object
51 │ """
52 │ metrics.track(metrics.RECEIVE, getattr(remote_transport, "account",
❱ 53 │ return _untracked_receive(obj_id, remote_transport, local_transport
54
55
56 def serialize(base: Base, write_transports: List[AbstractTransport] = [
/home/adminuser/venv/lib/python3.8/site-packages/specklepy/core/api/operatio
ns.py:86 in receive
83 │ │ │ )
84 │ │ )
85 │
❱ 86 │ obj_string = remote_transport.copy_object_and_children(
87 │ │ id=obj_id, target_transport=local_transport
88 │ )
89
/home/adminuser/venv/lib/python3.8/site-packages/specklepy/transports/server
/server.py:145 in copy_object_and_children
142 │ │ r.encoding = "utf-8"
143 │ │
144 │ │ if r.status_code != 200:
❱ 145 │ │ │ raise SpeckleException(
146 │ │ │ │ f"Can't get object {self.stream_id}/{id}: HTTP error"
147 │ │ │ │ f" {r.status_code} ({r.text[:1000]})"
148 │ │ │ )
────────────────────────────────────────────────────────────────────────────────
SpeckleException: SpeckleException: Can't get object
.....: HTTP error 403 ({"error":"Your
token is not valid."})
I parsed the commit data using the speckle-data-pack examples and developed the project using this. To be honest, I didn’t focus on the “local account” mentioned in the docs and didn’t question how it works at the time :). It is the problem, am I right? Should I use SpeckleClient instead of StreamWrapper?