Unable to get Mercurial's hgweb.cgi working on IIS7 - python

I have been using this guide http://tinyurl.com/mercurial-iis to attempt to setup Mercurial on IIS 7. I have followed every step however when I try to access the site I get the following error:
Error Summary
HTTP Error 500.0 - Internal Server Error
There is a
problem with the resource you are
looking for, so it cannot be
displayed.
Detailed Error Information
Module IsapiModule
Notification ExecuteRequestHandler
Handler Mercurial-ISAPI
Error Code 0x8007007e
Requested URL http://localhost:81/
Physical Path C:\inetpub\hg
Logon Method Anonymous
Logon User Anonymous
I am using the following setup:
Windows Server 2008 SP2 x64 OS
IIS7
Python 2.6.6 32bit
Mercurial 1.7.5 32bit
pywin32-215

I would recommend dropping the ISAPI and try going down the CGI route. That's what we did - and it has been working flawlessly. It's not like the performance difference is going to be noticeable anyway.
Useful links:
http://www.jeremyskinner.co.uk/mercurial-on-iis7/ (we followed this guide almost religiously)
http://vampirebasic.blogspot.com/2009/06/running-mercurial-on-windows.html
http://www.endswithsaurus.com/2010/05/setting-up-and-configuring-mercurial-in.html
How to setup Mercurial and hgwebdir on IIS?

1.7.1+ changed a few things that aren't reflected in most of the links floating around. Try this tutorial that I posted a while back, it seems like a few people have been successful with it.

Related

python.exe the fastcgi process exited unexpectedly

i have some reasons witch i am stuck to use django on windows machine. i was wondering how to configure django on a windows sesrver 2012 r2 with iis 8.5. so i followed the tutorial here.
i did what the tutorial says and it is pretty much straight forward what i am gonna do for any kind of application i want to run with iis.
but i get the following error the fastcgi process exited unexpectedly.
here is what i have provided as executable for wfastcgi module:
E:\venvs\...\Scripts\python.exe|E:\venvs\...\Lib\site-packages\wfastcgi.py
i removed the wfastcgi.py part after | from handler mapping and error changed to script processor could not find the config for fastcgi configuration and i figured out the error must be related to the wfastcgi.py file. but i could not find the issue here. so i was wondering what can be the issue? and what are my options are here.
has any one been able to use django on a windows machine?? jsut in case my python version is python 3.6
I had the exact same problem as you but managed to solve this by using Python 3.4.2 version. Follow the exact steps as described in this tutorial Django with IIS and avoid using Python 3.5 or above because it seems that there are compatibility issues. The stack I used was IIS version 10, Windows 10, Python 3.4.2 and Django 1.11.2.
Upgrading wfastcgi to the latest version
pip install wfastcgi --upgrade
solved it for me: Python 3.6.6, wfastcgi 3.0.0
In my Case I was facing the same issue i.e. enter image description here
Mine is a Django App used for APIs that queries data from back-end platforms. This issue was only for specific filters that the API was using in queries while for other values in filters it worked great.
My Config file did not have a fastCgi tag and I added below mentioned part to top of system.webServer in config file. Yes off course it gave few errors here and there corresponding to activityTimeout and requestTimeout. Tried increasing up-to 900 and 601 respectively and then it worked for me. But could not understand cause of the issue as query that API was running for which i was facing this issue was not taking that long at all. I would like to understand that.
<fastCgi>
<application fullPath="D:\Python34\python.exe|D:\Python34\Scripts\wfastcgi.py"
arguments=""
maxInstances="4"
idleTimeout="300"
activityTimeout="900"
requestTimeout="601"
instanceMaxRequests="10000"
protocol="NamedPipe"
flushNamedPipe="false">
</application>
</fastCgi>

django stripe set up installation error

My problem is down to my lack of experience with django (and coding) and stripe.
I am trying to test a very basic stripe payment on a test form on my local development server, but I am getting an error message when I try to start my local development server.
Here is a a screen grab of the issue:
Can somone give me an idea of what I have done wrong and how I even start to go about solving the issue? I am using djstripe which I have pip installed.
I have searched my templates and gone over my code and SO and Google, but I am still stumped. I have djstripe installed in my INSTALLED_APPS.
Is there a tutorial of how to read and interpret the errors in the above screen grab, or does the understanding mainly come from experience?
You need to define STRIPE_PUBLIC_KEY (and STRIPE_SECRET_KEY I believe) in your settings.py. You can get this key from stripe if you have an account.
If you follow the instructions you will see this. https://github.com/pydanny/dj-stripe
A google search for "reading python stack trace" gives us this:
https://www.odoo.com/forum/help-1/question/how-to-read-and-understand-errors-from-tracebacks-9704

Configuring Azure for Django/Python 3

I had a Django project that uses python 3.2+. Having been through a couple Azure classes I wanted to deploy my Django application through Windows Azure. I got the web site synced through my Git Repository, and following the advice of the MSDN forums, added the python 33 runtime in a folder called /PythonCore/ and added WSCGI.py to the scripts folder within there.
My website can''t find the CGI interface and likewise is failing to process HTTP requests. I know something must be wrong in my configuration, but I havn't a clue as to what. I was wondering if anyone might know what my error is.
WEBSITE_NODE_DEFAULT_VERSION 0.10.5
DJANGO_SETTINGS_MODULE DjangoApplication.settings
PYTHONPATH D:\home\site\wwwroot\DjangoApplication;
WSGI_HANDLER django.core.handlers.wsgi.WSGIHandler
Handler Mappings
* D:\home\site\wwwroot\PythonCore\python.exe D:\home\site\wwwroot\PythonCore\scripts\wfastcgi.py
Please let me know if any additional information is needed or you have an idea what I can try.
Azure Web Sites w Django currently requires Python version 2.7. Please see this:
http://www.windowsazure.com/en-us/develop/python/tutorials/web-app-with-django-and-mysql/
and
http://pytools.codeplex.com/wikipage?title=Django%20Web%20Site/Cloud%20Service%20Tutorial
Corresponding video walk thru:
http://www.youtube.com/watch?v=S7A7VNnsA_8
Python 3.x will be supported soon (hopefully fall 2013).

django 1.5 flips between "it worked" page display and error 500

Installed Django 1.5 python2.7 mod_wsgi and python-sql on a red hat 4 web server with apache 2.
The "It worked" page keep flipping between the correct display and "internal server error" "500"
The flip occurs very frequently when pressing F5, but not only when quickly sending a request.
I have restarted Apache, erased wsgi that was configured for python 3.2 and reconfigured and installed for 2.7. I have also tried creating a new project, mysql database, and kicking the cat < not advisable.
On the python 3.2 installation I was having problems with the admin page registrations flipping between what I had applied, and being non-existent.
This error is occurring with debug = true, no apps installed, no database configuration yet, and what I assume is a complete baseline system aside from the wsgi file which seemed to work fine for the 3.2 installation.
If you are getting issues with the Python egg cache, see the mod_wsgi documentation at:
http://code.google.com/p/modwsgi/wiki/ApplicationIssues#Access_Rights_Of_Apache_User
The reason it flicks may be because you are running a multiprocess configuration and so requests can go to different processes. That it would be different though for different processes is a bit odd, but is often explained by import order dependencies in your code where whether it works depends on the order in which URLs are visited.
Quite often such ordering issues don't show up if using Django and developing with Django developer server, because the Django development server preloads code before requests are handled. I have commented on this specific Django issue in:
http://blog.dscpl.com.au/2010/03/improved-wsgi-script-for-use-with.html
Do note that code examples in that corresponded to an old Django version so may not be appropriate to use now.

How and where to deploy my Python and BottlePy application

Ok, so I made this application in Bottle that uses the NLTK package. It works fine on my computer which has all neccesary libraries installed, however, I can't get it to work on Google's App Engine. It gives these errors:
AttributeError: 'module' object has no attribute 'getuid'
I searched around and think this is a limitation of GAE, so I tried to use Alwaysdata and host my app there. However over there I have the problem that the YAML module is not installed. I tried to install it but access was denied.
creating /usr/local/lib/python2.6/site-packages/yaml
error: could not create '/usr/local/lib/python2.6/site-packages/yaml': Permission denied
So now I am stuck. This is the problem I walk into a lot. It all works fine on my computer, but then I can't get it to work online. Is this because of GAE limitations, alwaysdata limitations? So I guess I am asking where and how could I deploy best?
Is it more easy when I rent my own server and have full access there? Does that work as if it were my own computer and I can install everything?
Let me know if I need to provide more information, I'm pretty clueless.
I realise that you've already found an answer, but for other people looking for Python bottle hosting. PythonAnywhere has a quickstart option for deploying and hosting bottle apps now.
This is a three or four click wizard process that will have a barebones bottle application running in a 10 seconds. Letting you then build from there.
I've had great success running all different types of Python frameworks on WebFaction - http://www.webfaction.com/
Their support is awesome, instant replies to any problems I face. You get SSH access and can install your own modules, virtual-envs etc. You can run sites as a Custom Application listening on a port number, so you can basically run anything.
Here's a thread on how to setup a Bottle app with them: http://community.webfaction.com/questions/3998/how-to-setup-a-python-bottle-application
All that for $8.50/month if you pay a year upfront. http://www.webfaction.com/services/hosting
I can't recommend them enough.
Edit: Thought it wise to mention, I've written apps that use the NLTK and they've run on WebFaction with no troubles.

Categories