Carl A. Posted December 5, 2011 Posted December 5, 2011 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.
Carl A. Posted December 7, 2011 Author Posted December 7, 2011 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.
Guest xaav Posted December 7, 2011 Posted December 7, 2011 Are you using the windows character to end your lines? 1
Carl A. Posted December 9, 2011 Author Posted December 9, 2011 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.
Carl A. Posted December 12, 2011 Author Posted December 12, 2011 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.
Guest xaav Posted December 12, 2011 Posted December 12, 2011 Glad your question got answered! Please spare a few minutes to take our brief survey: http://feedback.heliohost.org/ Your participation in this survey is greatly appreciated.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now