FAQ
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

Search Discussions

  • Fredrik Lundh at Nov 16, 2005 at 8:19 am

    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>
  • Martin at Nov 16, 2005 at 10:18 am

    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

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppython-list @
categoriespython
postedNov 16, '05 at 7:45a
activeNov 16, '05 at 10:18a
posts3
users2
websitepython.org

2 users in discussion

Martin: 2 posts Fredrik Lundh: 1 post

People

Translate

site design / logo © 2022 Grokbase