470,594 Members | 1,442 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,594 developers. It's quick & easy.

Python/ASP local characters and 500 server error

Using Python / ASP on a IIS server with Mark Hammond's win32 extensions,
i have the following problem.

All occurences of local characters (fx. danish זרו) in comments or in
strings result in a HTTP/1.1 500 Server Error.

Is there a solution to this problem?

/Martin
Nov 22 '05 #1
4 1902
Martin wrote:
Using Python / ASP on a IIS server with Mark Hammond's win32 extensions,
i have the following problem.

All occurences of local characters (fx. danish זרו) in comments or in
strings result in a HTTP/1.1 500 Server Error.

Is there a solution to this problem?


the first thing to do when you get a server error is to look in the server logs
to see what the real error is.

in this case, chances are that you'll see a warning message from the Python
interpreter that points to you this page:

http://www.python.org/peps/pep-0263.html

(scroll down to "Examples" to see the solution)

</F>

Nov 22 '05 #2
Martin wrote:
Using Python / ASP on a IIS server with Mark Hammond's win32 extensions,
i have the following problem.

All occurences of local characters (fx. danish זרו) in comments or in
strings result in a HTTP/1.1 500 Server Error.

Is there a solution to this problem?


the first thing to do when you get a server error is to look in the server logs
to see what the real error is.

in this case, chances are that you'll see a warning message from the Python
interpreter that points to you this page:

http://www.python.org/peps/pep-0263.html

(scroll down to "Examples" to see the solution)

</F>

Nov 22 '05 #3
Fredrik Lundh wrote:

http://www.python.org/peps/pep-0263.html


Using the info from pep-0263, adding a line in the start for the file:

# -*- coding: <charcode> -*-

works for .py files, but the error i get is from an .asp file.

The logfile contains this info:

ASP_0147|500_Server_Error 500

A solution is to move ALL code from the .asp page to a .py file and
import it on the .asp page.

But there must be another solution?

/Martin
Nov 22 '05 #4
Fredrik Lundh wrote:

http://www.python.org/peps/pep-0263.html


Using the info from pep-0263, adding a line in the start for the file:

# -*- coding: <charcode> -*-

works for .py files, but the error i get is from an .asp file.

The logfile contains this info:

ASP_0147|500_Server_Error 500

A solution is to move ALL code from the .asp page to a .py file and
import it on the .asp page.

But there must be another solution?

/Martin
Nov 22 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

699 posts views Thread by mike420 | last post: by
8 posts views Thread by JZ | last post: by
10 posts views Thread by Andrew Dalke | last post: by
reply views Thread by Martin | last post: by
4 posts views Thread by Layne Meier | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.