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.
Related
so I am currently trying to automate a windows programm using pywinauto. Unfortunately, the programm is limited to this coorporate (meaning that I cannnot disclose its name or any code that I am writing). My problem, though, is very simple. The programm invovles a communication with a server and getting data from it. When I run the .exe normally the application behaves normally without any errors or problems. Meanwhile, when I try to use pywinauto the moment I try to get any data from the sever I have connection issues and I get no data from the server. As I have little to no information about the inner programming of the application, my question is whether there is any way for a .exe to know it is being run from pywinauto. The app itself looks old (maybe first run for WinXP and barely updated). I have yet to try change my backend when I am trying to automate and also I should try to run it on Python 32-bit insted of Python 64-bit as the app is a 32-bit app. Any info or advice would be avaliable.
For “win32” backend 32-bit Python may really help. For “uia” backend it doesn’t matter usually. Other thing could be some lazy initialization that you can’t skip manually because manual action is slower. You can try app.wait_cpu_usage_lower() for such case. For DB-connected apps this is pretty normal situation.
I'm stepping into the Python world. First I learned a little Python. Then I learned the basics of Django, and on top of that I'm learning Wagtail (framework for template managing for Django)
To learn Django a went through a tutorial to build a site locally and test it in 127.0.0.1:8000.
At some point of the tutorial I configured the settings (because the tutorial said so) to redirect to 127.0.0.1:8000/catalog when browsing to 127.0.0.1:8000 alone.
Then I started the Wagtail tutorial, as a completely different project in another folder. Not sharing any code with the tutorial Django project.
I run the server and the console says it is now running in port 127.0.0.1:8000 and when I browse it, it redirects me to /catalog and of course shows a Page not found error since this project doesn't have one app catalog.
I workaround this by opening Chrome in Incognito Mode. But still I would like to know why this is happening and how to solve it to add to my knowledge of how Python works.
Some notes:
I'm on Windows
I killed all processes related to Python and actually this is still happening after turning my PC off and on
I know I could use a different port, please do not give me that answer. My goal is to learn.
Try clearing your browser cache.
The problem is most likely that your browser has cached a 301 Moved Permanently for 127.0.0.1:8000, thus never hit your development server when you enter the URL, but simply do the redirect based on the cache.
You will see the same result no matter what you're running behind port 8000, and it's as such not related to Django.
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 a django website which make possible to listen mp3 files with jPlayer.
It works ok on Chrome, Firefox and Opera. Unfortunately, it doesn't work in IE9. However, it is ok when running the site locally with the django dev server.
Is there any things, i should be careful on server side. I've checked than the jPlayer.swf is on the server. Any thing else?
Any recommendation for debugging this issue?
A quick search reveals similar problems about jPlayer and IE9. Have you seen this q/a before?
JPlayer issue in IE9 <--
It could be as simple as an .htaccess fix. Gracias.
I have put my Django web site up to my web server and have it set up using apache2 and mod_wsgi.. everything works fine most of the time but occasionally it will just give the error that it can't import a module (usually from my views file). However, it's not an issue with that module as it usually works, for example, I will get the error "Cannot import classname from module" once, then reload the page and it works fine, I would say it's about 1 in 10 page loads where this occurs and it's just random as it will happen for any page on my site.
I have tried restarting apache2, restarting the server but the issue persists. I have tried it on different client machines, clearing out the user cache, etc but the issue persists. I don't know what might be doing this, would perhaps some sort of caching help prevent this as it seems that the server is just having an issue with sometimes not being able to fully process the request. I am using a cloud set up with not much memory on the server so maybe this is the problem? Any advice is appreciated
It is working most of the time because you likely have a multi process configuration and only one of the processes is affected.
You can try alternate WSGI script file as documented in:
http://blog.dscpl.com.au/2010/03/improved-wsgi-script-for-use-with.html
The jury is still out as to whether the issue is the differences between development server and proper deployment systems using WSGI, or whether it is users not handling imports properly and causing order dependencies or even import cycles. Problems possibly only come up when URL visited in certain order and thus why random as to when it can happen.