I have a Django project that I have deployed on a heroku web server and use PyCharm as my IDE. I used to be able to interact with my web server with "heroku run bash", however, now when I try running "heroku run bash" I get:
▸ stat /.local/share/heroku/client/bin/heroku: not a directory
▸ fork/exec /.local/share/heroku/client/bin/heroku: not a directory
I'm not sure what has changed, but I can't seem to connect to my heroku webserver anymore. I can still push changes using git push heroku master, but any other interaction with my heroku server doesn't seem to work anymore. I've already checked with Heroku and their systems are running just fine.
How do I reconnect to my heroku web server again with PyCharm? Or just in general?
Thanks in advance for your help!
This is either due to a new version of the CLI or to an OS upgrade.
I experienced the exact same issue on my Mac after upgrading to High Sierra and resolved it by reinstalling the CLI, this time using Homebrew.
Had the same problem. Did the following steps, as described here:
1) brew install heroku/brew/heroku
2) which heroku pointed to /usr/local/bin/heroku so no problems there
3) finally brew link --overwrite heroku
After this, everything was sorted and worked as expected.
Related
I am using chrome and chromedriver as heroku buildpacks in heroku
If chrome or chromedriver's version is updated, it's not compatible
Then Do I have to look forward to another one's update?
I want to fix their version
currently, I am using that
1 https://github.com/heroku/heroku-buildpack-google-chrome
2 https://github.com/heroku/heroku-buildpack-chromedriver
somebody help me
I ran into this issue today and realized that this is an open issue in the repositories of both buildpacks:
https://github.com/heroku/heroku-buildpack-google-chrome/issues/86
https://github.com/heroku/heroku-buildpack-chromedriver/issues/35
You can find some workarounds in these links but apparently there is no general fix at the moment. In my case, I only had to reset my cache. Using the heroku CLI:
$ heroku plugins:install heroku-repo
$ heroku repo:purge_cache -a appname
so I am trying to do some background job to run in my flask app , and in order to run the worker, I needed to use cygwin instead of my windows terminal. My application use MongoDb Atlas for documents storage and it works perfectly fine when I "flask run" it from my cmd . But I got the error once I run it or run the worker from cygwin. It is to note that I whitelisted my IP adress and installed the dnspython package , and still got the error.
Any suggestions about what could be the problem? I don't seem to find any answer in previous asked questions . Thank you.
It's because of your dynamic DNS configuration from your ISP. make it static or you can use googleDNS server which is 8.8.8.8 or 8.8.4.4 as your DNS servers.
I hit and resolved this same issue hit today w/ cygwin, python3.8, dnspython 1.16.0 by updating to dnspython 2.0.0 and ensuring there was a valid /etc/resolv.conf in place.
I'm actually learning to use the Django framework with PostgreSQL with Docker and docker-compose.
Regularly, when I make a mistake (for example a syntax error in the views.py file), I cannot reach my Django app anymore trough my web browser.
Firefox tells me:
Unable to connect
Firefox can't establish a connection to the server at localhost:8000
Chrome tells me:
This site can’t be reached
localhost refused to connect.
ERR_CONNECTION_REFUSED
I had this several times and I always managed to find the error in my code, to correct it and then everything went well again.
Currently, my code is working fine. But if I encounter this again (and this happens very often), I would like to be able to find the error quickly by myself.
So here is my question:
How can I see which file at which line contains the error ?
I would like to have a correct error message telling me what went wrong instead of that annoying ERR_CONNECTION_REFUSED browser page over and over.
I hope I explained my issue well because I struggled to describe it to Google.
Thanks a lot in advance. :)
FYI:
Ubuntu 18.04.3 LTS Bionic (window manager i3wm)
Docker 19.03.4
docker-compose 1.17.1
python 3.7 (docker image)
Django 2.2.6 (inside the python 3.7 image)
PostgreSQL 12.0 (docker image)
Visual Studio Code 1.39.2
I finally found a solution.
I had the bad habit to run my docker-compose in detached mode.
When attached, the syntax errors are shown directly from the terminal when de container is stopped.
I also added a script where I run my server in a loop. This way, the server will relaunch automatically over and over until I correct the error. I don't have to restart my Django server manually.
Thank you for helping me anyway.
I'm having difficulty installing Flask on my Ubuntu machine. In fact, I tried 2 different Ubuntu computers and neither of them worked.
I followed this tutorial https://pythonprogramming.net/creating-first-flask-web-app/ where all steps are well explained.
The problem is. When I type localhost:5000 or just localhost or 127.0.0.1:5000 I get "Can't connect. Something is broken" you know that sort of message you get when server can't find index.html or index.php
Everything during the installation went okay. The only thing that didn't work well was installing virtual environment. It downloaded okay but when I ran sudo virtualenv xyz I got No such command. But Django & Flask can work without it so it shouldn't be an issue.
Any ideas ?
I deleted those as Flask don't need files to be named index.html.
I am trying to connect to Heroku bash on windows and use python manage.py shell iPython shell to help me type commands faster.
While this works fine if I am on Mac, on my Windows machine - the colour coding of heroku bash iPython shell and the tab-autocomplete feature does not work.
Is there some other tool I can use or can configure somewhere? I tried installing bash on Windows, and it gives me the same result
You should NOT, NOT, NOT!!#!!!!! be using Heroku's bash shell for casual python coding. This is an awful idea for many reasons:
Heroku dynos don't have a persistent filesystem. Any files on your dyno can be deleted randomly.
The amount of time it will take you to build an ipython setup / configuration from scratch, and get it running on your dyno is not worth the effort.
Heroku dynos are meant to run web processes as they restart randomly -- your terminal session may blow up at any point.
If you really want an authentic 'shell' experience, I recommend using a real shell for development -- either get yourself a virtual machine and install ubuntu, or spin up a ubuntu server machine through a host like DigitalOcean or Amazon.