I'm using Pycharm 2016.3.2 on Windows 10. I have a Django project using an separate virtual environment( ie. virtual environment is in totally separate folder to the project). I am using a Postgres server which is working fine and can be seen by Pycharm and can test connect. The problem I have is when I go to Run it in Pycharm the server is not starting. I get the following in the Run window:
"C:\Program Files (x86)\JetBrains\PyCharm 2016.3.2\bin\runnerw.exe" C:\Pyprojects\VirtualEnvs\venv2\Scripts\python.exe C:/Pyprojects/MyProject/manage.py runserver 8000
Process finished with exit code -1073741819 (0xC0000005)
I can attest to this all actually working outside Pycharm. I can use 'runserver' from my virtual environment using Windows command prompt. I can then get into my django site once I've started it that way with no problems.
Can anyone shed some light on how to make this work with Pycharm? I just purchased Pycharm professional and hopefully this will have some kind of easy fix.
Thanks in advance for any help.
Marco
Related
I want to set up a Django project with docker-compose and PyCharm on my PC with Ubuntu 22.04 OS. Using PyCharm 2022.2.1 (Professional) I get the following error
How to solve Local path is not registered within uploads in the request
I added a Python interpreter from Settings > project > Python interpreter and then add interpreter > on SSH after that entered ssh credentials and on the system interpreter finally I created the Python interpreter.
I have docker-compose run on another terminal.
After I run the runserver command it shows this error:
this is the runserver command configuration:
I have recreated the interpreter, and explored the same problems on JetBrains website but couldn't solve the issue.
This bug was reported as PY-55396 on the JetBrains bug tracker.
The bug was solved in PyCharm 2022.2.2, the solution is to upgrade to that version or downgrade to PyCharm 2021.3.
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.
We have a project on nginx/Django, using VirtualBox.
When we try to run command VBoxManage list runningvms in nginx, we have the next error:
Failed to initialize COM because the global settings directory '/.config/VirtualBox' is not accessible!
If we run this command in console, it works fine.
What can we do to make it working good in nginx?
Other details:
nginx is runned by user "www-data", console - by the other user (Administrator).
We have fixed the issue.
There was wrong environment variable "Home" (os.environ['HOME']). We changed it, and so the problem was gone.
Using Python API for VB instead of ssh can really help you with that problem, as RegularlyScheduledProgramming suggested - we added Python API too.
Thanks!
I configured PyCharm Python Interpreter as a remote Docker Python Interpreter:
I do not have any problem to run my tests using this configuration.
But when I try to run them in Debug, execution freeze to this waiting for connection... status:
So my questions are:
What am I doing bad?
How can I execute my tests in Debug in PyCharm using a Docker Python Interpreter ?
This problem is due to pydevd hardcoded host ip address in PyCharm sources (10.0.0.2).
So if you do not use VirtualBox to manage and run your docker-machine, you will not be able to easily launch your tests in debug.
It should be patched in PyCharm 2016.3 for docker interpreter and in PyCharm 2016.3.1 for docker-compose interpreter.
Awaiting this release, a workaround exist here, on JetBrain website.
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.