Stack communities,
I need your help. I’ve just written my first app in Python with the dash libraries. I am now trying to deploy thanks to the Heroku frameworks. It first works but when trying to connect it my database (PostGre), it crashed. I think it’s because my connection btw Heroku/PostGre SQL is not working correctly.
I’ve tried many changes within my code but still don’t understand why my app crash.
When I try to run the app, I get the following error within the heroku log :
Image of the Heroku error within the server log
My code can be found here in my Github repositorie.
As of now, my database consists of a giant CSV master file because I want to keep it simple for now.
Link to the Database (Private): https://s3-eu-west-1.amazonaws.com/iag-test1/Test1.csv
*On Heroku it seems that I should use the AWS-S3 and connect it. But I didn't manage to do it.
The goal of this project is to build an end-to-end visualization tool in python and deploy it. (I decided to use Dash Library and Heroku to deploy it). Maybe I should switch to AWS...
Any help/advice would be greatly appreciated…
Related
Hi I have been trying to deploy a streamlit app in azure for the past couple of days. A simple app like
import streamlit as st
def main():
st.write('hello all')
if __name__=='__main__':
main()
even with requirements.txt, a docker file, trying to push the docker image to azure container registry, all process are done right. There are even no errors so that i can debug them. The app just opens up in azure and freezes in the please wait screen. Please can someone help. I have tried everything, github deployment local deployment. I have been following the below articles.
https://saitracychen.medium.com/deploy-a-streamlit-app-to-azure-126452e7df6d
https://towardsdatascience.com/deploying-a-streamlit-web-app-with-azure-app-service-1f09a2159743
What am not getting is if this is a recent issue specifically with streamlit and azure or am i doing something wrong. attaching my problem below. I have also managed to capture a HAR file from the frozen page if anyone can help with it. If anyone can document the recent process and changes we have to make to deploy in azure that will be great as the support on this topic is pretty thin online.
TLDR: you need to get at least a B1 appservice plan. The FREE one will not work with Streamlit (and apps using WebSockets).
After a couple of hours trying to find the answer to the same answer, I found out what it was. I wanted to deploy a streamlit app, but was stuck at the same place after following the guidance. A Ctrl+Maj+J showed in the "Please wait" page that WebSockets were an issue. It appears WebSockets will not work for FREE Linux appservice plans, and after recreating a B1 appservice plan (as in the guidance), it worked.
i am new in developing web apps so i might get confused a lot of times!
The problem is this:
I was developing with Pycharm son sort of basic social network, and at first when you sign up the users were created in local folder as JSON files and then i look foward to make a deployment, and i did it without problem using PythonAnywere (PA). Lets call my .py file "server.py" where i have the whole thing.
Then i started looking for some cloud service and I ended modifying everything in order to work with Mongodb Atlas and it was a complete success. I made a lot of local test using Pycharm and everything is OK, the users are now created on cloud service.
My problem is that i would like to make a deployment test with that Mongodb service version, and i was trying to use (PA) again but this time its give me a lot of errors.
Note: i already install all the requirements in (PA) from pip freeze requirements.txt
Is there a problem with PA and MongoDB? is ther any other better option?
Should it run ok if the first version of "server.py" was ok?
I just replaced that file with new one, that was runnning perfect on localhost.
If you need more info just tell me, i am very new in this.
Thanks a lot
I've been trying for about two weeks now to set up a server for a completed Django app on the google cloud shell. All of the documentation for gcloud is confusing and sends me to several different pages for one task and it is very hard to keep track of what to do. Sites like digitalocean, which is useful for Django program setup, doesn't work on gcloud. I haven't figured out a way to connect a postgres VM to my program through the cloud shell despite having the server running. I am very lost in setting this up. Could someone please help me set up my Django app? It runs perfectly on localhost but when trying to implement it into the google cloud nothing works.
I've done the django-gcloud tutorial already and set up a simple site just by importing the code from google, which doesn't help because all it does is import a completed app and you just type in "gcloud app deploy" which doesn't explain how to set it up so that you can do that.
My program uses python 3, DjangoRestFramework, and Celery. The database is Postgresql.
My full module list is:
Django-1.11.2 amqp-2.1.4 astroid-1.5.3 billiard-3.5.0.2 celery-4.0.2 djangorestframework-3.6.3 isort-4.2.15 kombu-4.0.2 lazy-object-proxy-1.3.1 mccabe-0.6.1 pep8-1.7.0 psycopg2-2.7.1 pylint-1.7.2 pytz-2017.2 six-1.10.0 vine-1.1.3 wrapt-1.10.10
This is the first time I have asked a question, so please forgive me if I leave something out.
I am working on my first app using Heroku, this is a python app. When working locally I would like to be able to see changes without having to restart the server. I know in node there is a way to run the server so that changes are live. Any advice on add-ons or how to reword my search for this would be greatly appreciated (I have tried searching for "live changes to heroku python", "heroku watch", "automatic restarting of heroku server" and a few other things).
The CSS updates with a refresh, but any text added or other changes will not update without restarting the server. I am using Jinja2 for templating.
Currently to run the server I am using heroku local -f Procfile.windows
Thanks for your help!
It is really weird that after clicking run button, it does nothing and also no log and show a clock sign on the first column.
It works normally before. However, after I messed up my python environment, the google coursebuilder can't run web application. That's my guessing. When I run which python.it only shows:
/Library/Frameworks/Python.framework/Versions/2.7/bin/python
These let me feel like I have no way to solve it!Are there anyone who came across this problem before? Any ideas or suggestions?
Updated: I follow suggestions to use command line to run web application on GAE. It reminds me here:
Update: The error message shows that GAE can't get the allocated port and domain. The reason why it happens is that when I use command line to run the web application, I also open GAE GUI to run a web app with the same port number.
So the way to solve it is to close the GAE GUI and free the port. Or we also could designate another kind of port number with command line.(--port=XXXX and --admin_port=YYYY). Or take a look at the doc:
Again thanks for the help of Mihail R!
The OP had multiple issues with GAE setup which were resolved by simply reinstalling the GAE Launcher and making sure the app was first copied into Applications from the .dmg file, then ran from the Applications instead of from inside the .dmg file, and appropriate permissions were suppose to be given so that GAE Launcher created the symlinks it needed to work properly.
More instructions on proper GAE SDK installation can be found here: https://cloud.google.com/appengine/downloads after clicking on the needed SDK and then the OS the SDK will be installed on.