On Wed, 28 Aug 2013 01:46:01 -0700, Ferrous Cranus wrote: > Τη Τρίτη, 27 Αυγούστου 2013 8:07:52 μ.μ. UTC+3, ο χρήστης Steven > D'Aprano έγραψε:
>> Hint: you can use >> "print(type(page), file=open('path/to/some/file', 'w'))" >> >> to see the type of the variable 'page' without displaying it on your >> website. > i tried to do what you said and iam receing this: > > [Wed Aug 28 08:43:31 2013] [error] [client 108.162.231.120] Original > exception was: [Wed Aug 28 08:43:31 2013] [error] [client > 108.162.231.120] Traceback (most recent call last): [Wed Aug 28 08:43:31 > 2013] [error] [client 108.162.231.120] File > "/home/nikos/public_html/cgi-bin/metrites.py", line 39, in <module> [Wed > Aug 28 08:43:31 2013] [error] [client 108.162.231.120] print( > type(page), file=open('../err.out', 'w') ) [Wed Aug 28 08:43:31 2013] > [error] [client 108.162.231.120] PermissionError: [Errno 13] > \\u0386\\u03c1\\u03bd\\u03b7\\u03c3\\u03b7 > \\u03c0\\u03c1\\u03cc\\u03c3\\u03b2\\u03b1\\u03c3\\u03b7\\u03c2: > '../err.out' [Wed Aug 28 08:43:31 2013] [error] [client 108.162.231.120] > Premature end of script headers: metrites.py Then pick a different location, one where you have permission to write files! Honestly Nikos, I'm not trying to be rude, but if you cannot think of this on your own after all this time we've been helping you, perhaps programming is not the right vocation for you. Perhaps you need to consider a change of career. If you do decide to stay as a web developer, you need to start thinking: * What is this error message telling me? ("Permission denied") * How can I fix that? ("I need permission to read the file. Maybe try a different file?") > Also many times when i try to view the error_log by > > tail -F /usr/local/apache/logs/error_log & > > i get realtime scrolling of other joomla webistes pho errors and i have > hard time trackign my own webistes erros. > > is ther a work around for that? That's an apache logging issue, not Python, and I don't know enough about apache to do more than guess that there probably is a solution but I have no idea what it is. -- Steven -- http://mail.python.org/mailman/listinfo/python-list