Sir, please find the code below. It runs perfectly fine locally, but it does not execute in Streamlit Cloud. The compilation is successful; however, after compilation, it presents an error, which you can observe in the error image. Kindly provide me with the appropriate solution. Thank you in advance for your valuable assistance.
If pivottablejs is spinning up a server, this will not work in the cloud. Specifically, the server is probably being started on 0.0.0.0 (localhost) and will not be reachable from your browser (as it would be if everything is running locally).
I apologize, sir. This code was functioning perfectly until last week; however, it is now producing an error this week. I have been using pivottablejs on the Streamlit server for the past four months without any issues, but it is encountering an error this week.
You’re right to highlight this your code runs locally because pivottablejs creates a temporary HTML file, which doesn’t persist or render well on Streamlit Cloud due to sandbox restrictions. Instead, try using streamlit-pivottable or convert the HTML to a string and embed it directly using components.html(). That should make it Streamlit Cloud–friendly.
Thank you very very much for your prompt reply
I kindly request that you send me the sample code for utilizing components.html() in Python Streamlit. As I am new to Streamlit, I would appreciate your guidance on how to implement components.html() in Python using VSCode. Thank you in advance for your valuable assistance.
Thanks for stopping by! We use cookies to help us understand how you interact with our website.
By clicking “Accept all”, you consent to our use of cookies. For more information, please see our privacy policy.
Cookie settings
Strictly necessary cookies
These cookies are necessary for the website to function and cannot be switched off. They are usually only set in response to actions made by you which amount to a request for services, such as setting your privacy preferences, logging in or filling in forms.
Performance cookies
These cookies allow us to count visits and traffic sources so we can measure and improve the performance of our site. They help us understand how visitors move around the site and which pages are most frequently visited.
Functional cookies
These cookies are used to record your choices and settings, maintain your preferences over time and recognize you when you return to our website. These cookies help us to personalize our content for you and remember your preferences.
Targeting cookies
These cookies may be deployed to our site by our advertising partners to build a profile of your interest and provide you with content that is relevant to you, including showing you relevant ads on other websites.