473,583 Members | 3,072 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2012
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_Se rver_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_Se rver_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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

699
33656
by: mike420 | last post by:
I think everyone who used Python will agree that its syntax is the best thing going for it. It is very readable and easy for everyone to learn. But, Python does not a have very good macro capabilities, unfortunately. I'd like to know if it may be possible to add a powerful macro system to Python, while keeping its amazing syntax, and if it...
8
3207
by: JZ | last post by:
I cannot find out what is the problem with my Python. I cannot join to smtp host. > python Python 2.3.4 (#1, Jun 22 2004, 04:42:42) on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import smtplib >>> smtplib.SMTP('localhost') Traceback (most recent call last):
10
3677
by: Andrew Dalke | last post by:
Is there an author index for the new version of the Python cookbook? As a contributor I got my comp version delivered today and my ego wanted some gratification. I couldn't find my entries. Andrew dalke@dalkescientific.com
0
323
by: Martin | last post by:
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
4
1979
by: Layne Meier | last post by:
I'm having a bit of a problem trying to install Python on a Solaris 10 system. I didn't have this kind of problem when trying to install it on Solaris 8. Has anyone else experienced this problem? I've tried adding CC=gcc into the configure script, and have also tried running ./configure --with-gcc with no luck. I appears that this is...
0
2495
by: metaperl | last post by:
A Comparison of Python Class Objects and Init Files for Program Configuration ============================================================================= Terrence Brannon bauhaus@metaperl.com http://www.livingcosmos.org/Members/sundevil/python/articles/a-comparison-of-python-class-objects-and-init-files-for-program-configuration/view
15
2939
by: John Nagle | last post by:
I've been installing Python and its supporting packages on a dedicated server with Fedora Core 6 for about a day now. This is a standard dedicated rackmount server in a colocation facility, controlled via Plesk control panel, and turned over to me with Fedora Core 6 in an empty state. This is the standard way you get a server in a colo...
0
7895
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7826
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8182
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7935
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
8193
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6579
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
3818
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
2333
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
1157
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.