A couple of weeks ago I was playing around with Streamlit and decided to deploy it on Azure a
using Azure App Services using the guidance from Deploying Streamlit Applications with Azure App Services .
using Azure App Services using the guidance from Deploying Streamlit Applications with Azure App Services .
Streamlit is an open-source Python library that allows you to create interactive, data-driven web applications in just a few lines of Python code. It does not require you to have any JavaScript, html or CSS experience.
The deployment using the steps outlined in the blog post went quite smooth but when I navigated to the website, I was greeted by an exception.
Since I haven't worked with Linux for over 20 years now, I feared to be in for a long and painful experience to get this resolved but it actually turned out to be easier then expected.
First step, I took was looking at the Application Logs for the Azure Web App. Go to the Azure App Service > Diagnose and solve problems > Application Logs.
The exception log "TypeError: Descriptor cannot be created directly. Your generated code is
out of data and must be regenerated with protoc > 3.19.0. If you cannot immediately
regenerate your protos, some other possible workarounds are: 1. Downgrade the protobuf package to 3.20.x or lower" actually pointed me to a thread on the Streamlit forums - Issue with Protocol Buffers. After changing requirements.txt to deploy a newer version of Streamlit (see Configure a Linux Python App for Azure App Service for more details on how the Azure App Service deployment engine automatically runs pip install.) all started working correctly again.
References:
- Viewing Azure App Service web server and application logs in real time on Azure Portal
- 30 days of Streamlit challenge
- Streamlit vs Dash vs Shiny vs Voila vs Flask vs Jupyter - comparing data dashboarding tools and frameworks
- Turn an Excel Sheet into an interactive dashboard using Python (Streamlit) -YouTube
- Streamlit app showcasing Plotly graphs
- Stuck learning Python? Make it fun with Streamlit!
No comments:
Post a Comment