Jump to content

Recommended Posts

Posted

I wanted to start using Helio using Python/Django. However, whatever I do I'll get a 500 error. So, I tried to make to simple cgi scripts with python, one using us-ascii and another in utf8. The former works, the latter gives me again a 500 error.

 

Am I missing something?

 

There is a high probability that I will use UTF-8 later in the project so I don't want to use ascii.

(.. also: I don't know where the error log is located :-()

 

agon.

Posted

Please post the content of your scripts.

Posted

ANSI (actually saved as us-ascii), which prints the hello-world message:

#!/usr/bin/python

print "Content-Type: text/plain\n\n"

print "Hello World: ANSI"

and UTF-8 (which gives a 500 Error):



#!/usr/bin/python

print "Content-Type: text/plain\n\n"

print "Hello World: UTF-8"

.. nothing too fancy.

 

I rechecked just to be sure:

The permission on for both files, which are in the same directory, is 755.

Posted

Are you using the windows character to end your lines?

  • Like 1
Posted

Thank you so far.

 

The django app is developed on Ubuntu, so I assume there it's unixy.

The two scripts were actually windowsy, but they are both. I changed the utf8 one to Unix-line-endings, but the problem remains.

 

... after I changed the encoding of the UTF8-file to ansi, it works.

 

---------------- Later this evening ------

Ha, got it:

I had to remove the BOM from the UTF8 file.

 

Now, if this is also the problem with my django application (currently merely a hello-world) then it would be rather annoying to have the BOM removed from every file that is created from python/django. Well, I will look into this during the weekend.

Posted

I'm not sure if the django problem with the same error is related. I'm going to make a new thread for it.

this thread can be marked solved.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...