I'm having this weird problem where when I run an app on GAE locally on Windows 7. Everything works fine except when I update the code; It works well the first 10 minutes and then it doesn't update when I edit the code. I have to close the server and open it again.
It's not a cache problem, because even if I try it in a different browser the content still doesn't change.
I tried reinstalling python and appengine and it worked fine for 2 days, but then problem came back again. I would appreciate any help.
Thanks!
Since your issue is limited to Python files, it sounds like a bug that was brought up in the discussion forum and issue tracker.
The suggested workaround in the forum is to remove the .pyc files corresponding the .py file you are editing, restart the local server, and continue. Obviously this is sub-optimal, so I would suggest 'starring' the bug in the issue tracker to keep track of updates.
Related
I am trying to deploy Django based website on AWS EC2. I have successfully created an instance and install my python libraries there. I am using Postgres here. For that, I have installed Postgres along with pgAdmin, but for some reason, it does not open. It just displayed that it's starting up the server but it does not open at all.
I am new to it so I do not know much about it. Can someone please help or guide me why it does not open up?
You will need to check the logs from
C:\Users\Administrator\AppData\Local with name - 'pgadmin4.startup'
A lot of the time removing the instance and recreating usually works but without seeing the logs it's hard to tell what the issue might be. Could also be worth making the instance a bit beefier as pgadmin does use a good amount of CPU and memory.
I am working on a python based micro service. Now, changes in any of the scripts used besides the application.py script are completely ignored. Unfortunately I have no idea what changes caused this problem but it broke after moving the Project directory locally and restructuring the file structure.
Has anyone experienced this before and found a solution?
Fortunately I found the answer myself. The Problem was that I didn't update the OpenAPI file which links the endpoints to the respective python functions after changing the file-structure of the project!
I have several django projects and they work well on my desktop. But when I run them on my laptop, they run ok for sometime. Then on a random occasion, opening a page won't work. The browser keeps trying to load the page (title tab keeps spinning, URL changes to the page its trying to open, and the page turns blank), while the development server (django on windows shell) says it has successfully served the page (200 status).
This behavior is consistent among Firefox, IE and Chrome. I tried changing ports, using machine IP instead of localhost, loading static files on external server, but nothing works. I tried opening the site (using laptop computer name) from desktop browsers and behaves the same. Another interesting thing is, even if I shutdown and restart the django server, I wont be able to open the page that have failed previously unless I close the loading page.
My laptop is running a basic Windows 8, while desktop is Windows 8 Pro. I think the windows version has something to do with it.
Does anyone know how to solve this? I hope I made myself clear. Thanks.
It is hard to tell whether the issue is related to Windows specifically, rather than compatibility issues with images/CSS/Javascript/plugins such as Flash. Are you running the latest versions of those browsers (or at least the same versions as on your desktop)? Do you have different security software/firewalls? Do other sites load inconsistently? Seems unlikely to be a Django issue (although you can try loading sites like djangoproject.com).
Thanks people for your comments and answer. I uninstalled from the laptop each application that is not present in the desktop and found which one is causing the problem. This app called NetWorx has a network filtering that I enabled and for some reason its blocking the django response. I disabled network filtering which is good enough for my need.
I have been using GAE for about 2 months now, and so far, the journey has been quite smooth for me. Until today. Today, while the launcher was still on(along with other applications and programs), I had to shut down my PC without closing the existing running programs for some reason. When I restarted my PC, I couldn't launch my GAE application. When I try to force close it, it says that "GoogleAppEngineLauncher.exe is not responding". This is what opens up when I double click on the launcher icon:
When I maximize the window for the launcher:
Is this because my GAE application is now corrupted after I shut down the PC without closing it? Or is it something else? How can I resolve this problem?
Finally I found out what the problem was. Well, today I had installed two new softwares: Youtube Accelerator and CamStudio. Ever since then, my GAE wasn't starting. So I just uninstalled those two softwares, and now GAE is working again without any hassles! Don't really know why those softwares were causing this problem, but I am more than happy that I have the power of GAE back again!
I have looked and I could not find this question before, and it surprises me.
I am reasonably proficient in Python, and I used Dreamhost for a number of years. Now I would like to learn Django. They are finally supporting it using Passenger. Which I do not know what is.
Following the instructions on Dreamhost I installed Django. Then I started following the tutorial 01. This went well, except that I could not start the server (this in the tutorial) since the code was live on dreamhost. At the time this did not seem to make any difference. Then when I went on the second part of the tutorial I had to access the admin site. And it worked well going to myurl/admin/ , as it should. But here the problems started. According to the tutorial (here) I have to add a file in the poll application and then restart the server. But I never started the server in the first place, my code is running live on the web... but when I add a file the website the admin acts as if it does not see it.
Probably dreamhost has started its own server, and I don't know how to restart it. But I assume this is going to be a common problem when you run django on dreamhost. Every time you add a file you will have to tell the server to consider it.
So what should I do to let the server know about it?
Thanks,
Pietro
Here's the relevant section of the Passenger user's guide for restarting Passenger:
http://www.modrails.com/documentation/Users%20guide.html#_redeploying_restarting_the_ruby_on_rails_application
Eventually I got the answer from the DH support service. They told me to
pkill python
I did it. I also checked with
ps -aux
what process I was running. And indeed I could see the python process starting when I went to the page, and being killed when I pkilled it.
Thanks for all that helped.
I had the same problem with Passenger not reloading the Django server.
According to Django wiki page on Dreamhost, you can touch a "restart.txt" file that Passenger watches. If the timestamp on the file changes, Passenger restarts Django.
If you modified your application and your changes do not seem to be reflected, you may need to notify Passenger about your change by creating or modifying ~/example.com/tmp/restart.txt:
touch /home/user/example.com/tmp/restart.txt
Source: http://wiki.dreamhost.com/Django#Hints
For the tutorial, you should be working on a local machine, not a web server.