Unable to get the Speckle Viewer working as an iframe in Streamlit

Hi All,

I’ve been following the SpecklePy and Streamlit Tutorial and I can’t seem to get the iframe working. I don’t think there’s any more dependencies I need to install other than the ones mentioned in the tutorial. Create Your First Speckle App using only Python :snake:

Looking closer at the errors, it looks like I’m missing a lot. Is this because of Streamlit or something else?

But if I edit the HTML directly and get an iframe url element and generate that. It seems to have no problem rendering it.

Any ideas would be great!!

The root call to the embedded view is throwing a 404. Can you show what the generated HTML for that DOM element is?

It’s showing

<iframe allow="accelerometer; ambient-light-sensor; autoplay; battery; camera; document-domain; encrypted-media; fullscreen; geolocation; gyroscope; layout-animations; legacy-image-formats; magnetometer; microphone; midi; oversized-images; payment; picture-in-picture; publickey-credentials-get; sync-xhr; usb; vr ; wake-lock; xr-spatial-tracking" src="<https://speckle.xyz/embed?stream=72e016ffa8&amp;commit=b5e09708ba" width="530" height="400" scrolling="no" sandbox="allow-forms allow-modals allow-popups allow-popups-to-escape-sandbox allow-same-origin allow-scripts allow-downloads" title="st.iframe" style="overflow: hidden;"></iframe>

I just realised there was a typo in the URL… :melting_face:

1 Like

URLEncoding is hard!

1 Like