Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #43230 > unrolled thread
| Started by | Νίκος Γκρ33κ <nikos.gr33k@gmail.com> |
|---|---|
| First post | 2013-04-09 14:10 -0700 |
| Last post | 2013-04-16 23:56 -0700 |
| Articles | 20 on this page of 81 — 17 participants |
Back to article view | Back to comp.lang.python
Unicode issue with Python v3.3 Νίκος Γκρ33κ <nikos.gr33k@gmail.com> - 2013-04-09 14:10 -0700
Re: Unicode issue with Python v3.3 Ian Kelly <ian.g.kelly@gmail.com> - 2013-04-09 15:34 -0600
Re: Unicode issue with Python v3.3 nagia.retsina@gmail.com - 2013-04-09 20:16 -0700
Re: Unicode issue with Python v3.3 Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-04-10 04:25 +0000
Re: Unicode issue with Python v3.3 Chris Angelico <rosuav@gmail.com> - 2013-04-10 14:46 +1000
Re: Unicode issue with Python v3.3 rusi <rustompmody@gmail.com> - 2013-04-09 22:06 -0700
Re: Unicode issue with Python v3.3 rusi <rustompmody@gmail.com> - 2013-04-09 23:04 -0700
Re: Unicode issue with Python v3.3 Antoine Pitrou <solipsis@pitrou.net> - 2013-04-10 07:04 +0000
Re: Unicode issue with Python v3.3 Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-04-10 08:28 +0000
People in the python community [was Re: Unicode issue with Python v3.3] Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-04-10 08:34 +0000
Re: People in the python community [was Re: Unicode issue with Python v3.3] Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-04-10 10:31 +0100
Re: People in the python community [was Re: Unicode issue with Python v3.3] Νίκος Γκρ33κ <nikos.gr33k@gmail.com> - 2013-04-10 03:50 -0700
Re: People in the python community [was Re: Unicode issue with Python v3.3] Νίκος Γκρ33κ <nikos.gr33k@gmail.com> - 2013-04-10 03:50 -0700
Re: People in the python community [was Re: Unicode issue with Python v3.3] Νίκος Γκρ33κ <nikos.gr33k@gmail.com> - 2013-04-10 03:53 -0700
Re: People in the python community [was Re: Unicode issue with Python v3.3] Νίκος Γκρ33κ <nikos.gr33k@gmail.com> - 2013-04-10 03:53 -0700
Re: People in the python community [was Re: Unicode issue with Python v3.3] Peter Otten <__peter__@web.de> - 2013-04-10 13:11 +0200
Re: People in the python community [was Re: Unicode issue with Python v3.3] Peter Otten <__peter__@web.de> - 2013-04-10 13:13 +0200
Re: People in the python community [was Re: Unicode issue with Python v3.3] Νίκος Γκρ33κ <nikos.gr33k@gmail.com> - 2013-04-10 07:43 -0700
Re: People in the python community [was Re: Unicode issue with Python v3.3] Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-04-10 16:15 +0100
Re: People in the python community [was Re: Unicode issue with Python v3.3] Νίκος Γκρ33κ <nikos.gr33k@gmail.com> - 2013-04-10 09:50 -0700
Re: People in the python community [was Re: Unicode issue with Python v3.3] Michael Torrie <torriem@gmail.com> - 2013-04-11 21:20 -0600
Re: People in the python community [was Re: Unicode issue with Python v3.3] Νίκος Γκρ33κ <nikos.gr33k@gmail.com> - 2013-04-10 09:50 -0700
Re: People in the python community [was Re: Unicode issue with Python v3.3] Chris Angelico <rosuav@gmail.com> - 2013-04-11 01:19 +1000
Re: People in the python community [was Re: Unicode issue with Python v3.3] Νίκος Γκρ33κ <nikos.gr33k@gmail.com> - 2013-04-10 07:43 -0700
Re: Unicode issue with Python v3.3 Arnaud Delobelle <arnodel@gmail.com> - 2013-04-10 23:56 +0100
Re: Unicode issue with Python v3.3 nagia.retsina@gmail.com - 2013-04-10 00:23 -0700
Re: Unicode issue with Python v3.3 Νίκος Γκρ33κ <nikos.gr33k@gmail.com> - 2013-04-10 01:06 -0700
Re: Unicode issue with Python v3.3 Cameron Simpson <cs@zip.com.au> - 2013-04-11 09:17 +1000
Re: Unicode issue with Python v3.3 nagia.retsina@gmail.com - 2013-04-10 21:50 -0700
Re: Unicode issue with Python v3.3 Cameron Simpson <cs@zip.com.au> - 2013-04-11 20:45 +1000
Re: Unicode issue with Python v3.3 nagia.retsina@gmail.com - 2013-04-11 03:54 -0700
Re: Unicode issue with Python v3.3 nagia.retsina@gmail.com - 2013-04-11 03:54 -0700
Re: Unicode issue with Python v3.3 Nikos <nagia.retsina@gmail.com> - 2013-04-11 09:55 -0700
Re: Unicode issue with Python v3.3 Cameron Simpson <cs@zip.com.au> - 2013-04-13 11:41 +1000
Re: Unicode issue with Python v3.3 nagia.retsina@gmail.com - 2013-04-12 21:50 -0700
Re: Unicode issue with Python v3.3 Cameron Simpson <cs@zip.com.au> - 2013-04-13 20:28 +1000
Re: Unicode issue with Python v3.3 nagia.retsina@gmail.com - 2013-04-13 07:16 -0700
Re: Unicode issue with Python v3.3 Chris Angelico <rosuav@gmail.com> - 2013-04-14 01:45 +1000
Re: Unicode issue with Python v3.3 Cameron Simpson <cs@zip.com.au> - 2013-04-14 10:01 +1000
Re: Unicode issue with Python v3.3 nagia.retsina@gmail.com - 2013-04-13 07:16 -0700
Re: Unicode issue with Python v3.3 nagia.retsina@gmail.com - 2013-04-12 21:50 -0700
Re: Unicode issue with Python v3.3 Nikos <nagia.retsina@gmail.com> - 2013-04-11 09:55 -0700
Re: Unicode issue with Python v3.3 nagia.retsina@gmail.com - 2013-04-10 21:50 -0700
Re: Unicode issue with Python v3.3 nagia.retsina@gmail.com - 2013-04-11 00:13 -0700
Re: Unicode issue with Python v3.3 nagia.retsina@gmail.com - 2013-04-11 00:13 -0700
Re: Unicode issue with Python v3.3 Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-04-11 07:50 +0000
Re: Unicode issue with Python v3.3 Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-04-11 08:20 +0000
Re: Unicode issue with Python v3.3 nagia.retsina@gmail.com - 2013-04-11 03:07 -0700
Re: Unicode issue with Python v3.3 Lele Gaifax <lele@metapensiero.it> - 2013-04-11 12:45 +0200
Re: Unicode issue with Python v3.3 Nobody <nobody@nowhere.com> - 2013-04-10 19:08 +0100
Re: Unicode issue with Python v3.3 Νίκος Γκρ33κ <nikos.gr33k@gmail.com> - 2013-04-10 11:25 -0700
Re: Unicode issue with Python v3.3 Ian Kelly <ian.g.kelly@gmail.com> - 2013-04-10 13:50 -0600
Re: Unicode issue with Python v3.3 nagia.retsina@gmail.com - 2013-04-09 20:16 -0700
Re: Unicode issue with Python v3.3 nagia.retsina@gmail.com - 2013-04-11 21:36 -0700
Re: Unicode issue with Python v3.3 alex23 <wuwei23@gmail.com> - 2013-04-11 22:06 -0700
Re: Unicode issue with Python v3.3 nagia.retsina@gmail.com - 2013-04-11 22:42 -0700
Re: Unicode issue with Python v3.3 nagia.retsina@gmail.com - 2013-04-12 05:50 -0700
Re: Unicode issue with Python v3.3 Chris Angelico <rosuav@gmail.com> - 2013-04-12 23:14 +1000
Re: Unicode issue with Python v3.3 nagia.retsina@gmail.com - 2013-04-12 06:18 -0700
Re: Unicode issue with Python v3.3 Chris Angelico <rosuav@gmail.com> - 2013-04-12 23:21 +1000
Re: Unicode issue with Python v3.3 nagia.retsina@gmail.com - 2013-04-12 06:18 -0700
Re: Unicode issue with Python v3.3 rusi <rustompmody@gmail.com> - 2013-04-12 06:29 -0700
Re: Unicode issue with Python v3.3 nagia.retsina@gmail.com - 2013-04-12 07:36 -0700
Re: Unicode issue with Python v3.3 Ian Kelly <ian.g.kelly@gmail.com> - 2013-04-12 12:37 -0600
Re: Unicode issue with Python v3.3 Roy Smith <roy@panix.com> - 2013-04-12 14:49 -0400
Re: Unicode issue with Python v3.3 nagia.retsina@gmail.com - 2013-04-12 13:48 -0700
Re: Unicode issue with Python v3.3 nagia.retsina@gmail.com - 2013-04-12 13:48 -0700
Re: Unicode issue with Python v3.3 nagia.retsina@gmail.com - 2013-04-13 23:00 -0700
Re: Unicode issue with Python v3.3 Cameron Simpson <cs@zip.com.au> - 2013-04-14 19:28 +1000
Re: Unicode issue with Python v3.3 nagia.retsina@gmail.com - 2013-04-14 04:22 -0700
Re: Unicode issue with Python v3.3 Cameron Simpson <cs@zip.com.au> - 2013-04-18 09:00 +1000
Re: Unicode issue with Python v3.3 Νίκος Γκρ33κ <nikos.gr33k@gmail.com> - 2013-04-17 20:37 -0700
Re: Unicode issue with Python v3.3 Νίκος Γκρ33κ <nikos.gr33k@gmail.com> - 2013-04-17 20:37 -0700
Re: Unicode issue with Python v3.3 Νίκος Γκρ33κ <nikos.gr33k@gmail.com> - 2013-04-19 12:16 -0700
Re: Unicode issue with Python v3.3 nagia.retsina@gmail.com - 2013-04-14 04:22 -0700
Re: Unicode issue with Python v3.3 Νίκος Γκρ33κ <nikos.gr33k@gmail.com> - 2013-04-15 11:42 -0700
Re: Unicode issue with Python v3.3 Νίκος Γκρ33κ <nikos.gr33k@gmail.com> - 2013-04-15 11:42 -0700
Re: Unicode issue with Python v3.3 nagia.retsina@gmail.com - 2013-04-16 23:56 -0700
Re: Unicode issue with Python v3.3 Chris Angelico <rosuav@gmail.com> - 2013-04-17 17:01 +1000
Re: Unicode issue with Python v3.3 Chris Angelico <rosuav@gmail.com> - 2013-04-17 17:32 +1000
Re: Unicode issue with Python v3.3 nagia.retsina@gmail.com - 2013-04-16 23:56 -0700
Page 4 of 5 — ← Prev page 1 2 3 [4] 5 Next page →
| From | nagia.retsina@gmail.com |
|---|---|
| Date | 2013-04-12 06:18 -0700 |
| Message-ID | <mailman.519.1365772735.3114.python-list@python.org> |
| In reply to | #43444 |
Τη Παρασκευή, 12 Απριλίου 2013 4:14:39 μ.μ. UTC+3, ο χρήστης Chris Angelico έγραψε: > On Fri, Apr 12, 2013 at 10:50 PM, <nagia.retsina@gmail.com> wrote: > > > Someone HEEEEEEEEEELP MEEEEEEEEE!! > > > > http://youtu.be/VxMYwjp8t0o > > > > ChrisA Well, instead of being a smartass it would be nice if you could actually help for once.
[toc] | [prev] | [next] | [standalone]
| From | rusi <rustompmody@gmail.com> |
|---|---|
| Date | 2013-04-12 06:29 -0700 |
| Message-ID | <218d468e-5e8e-4e63-bba0-c20e1882caa1@ul7g2000pbc.googlegroups.com> |
| In reply to | #43446 |
On Apr 12, 6:18 pm, nagia.rets...@gmail.com wrote: > Τη Παρασκευή, 12 Απριλίου 2013 4:14:39 μ.μ. UTC+3, ο χρήστης Chris Angelico έγραψε: > > > On Fri, Apr 12, 2013 at 10:50 PM, <nagia.rets...@gmail.com> wrote: > > > > Someone HEEEEEEEEEELP MEEEEEEEEE!! > > >http://youtu.be/VxMYwjp8t0o > > > ChrisA > > Well, instead of being a smartass it would be nice if you could actually help for once. Interesting! Among the things which you dont seem to know is the meaning of the word 'once'.
[toc] | [prev] | [next] | [standalone]
| From | nagia.retsina@gmail.com |
|---|---|
| Date | 2013-04-12 07:36 -0700 |
| Message-ID | <2b23fe0a-722d-4e5e-9b97-b8099f36a668@googlegroups.com> |
| In reply to | #43448 |
Τη Παρασκευή, 12 Απριλίου 2013 4:29:51 μ.μ. UTC+3, ο χρήστης rusi έγραψε: > On Apr 12, 6:18 pm, nagia.rets...@gmail.com wrote: > > > Τη Παρασκευή, 12 Απριλίου 2013 4:14:39 μ.μ. UTC+3, ο χρήστης Chris Angelico έγραψε: > > > > > > > On Fri, Apr 12, 2013 at 10:50 PM, <nagia.rets...@gmail.com> wrote: > > > > > > > > Someone HEEEEEEEEEELP MEEEEEEEEE!! > > > > > > >http://youtu.be/VxMYwjp8t0o > > > > > > > ChrisA > > > > > > Well, instead of being a smartass it would be nice if you could actually help for once. > > > > Interesting! > > Among the things which you dont seem to know is the meaning of the > > word 'once'. Same applies for you too. Stop being smartasses.
[toc] | [prev] | [next] | [standalone]
| From | Ian Kelly <ian.g.kelly@gmail.com> |
|---|---|
| Date | 2013-04-12 12:37 -0600 |
| Message-ID | <mailman.533.1365792239.3114.python-list@python.org> |
| In reply to | #43455 |
On Fri, Apr 12, 2013 at 8:36 AM, <nagia.retsina@gmail.com> wrote: > Τη Παρασκευή, 12 Απριλίου 2013 4:29:51 μ.μ. UTC+3, ο χρήστης rusi έγραψε: >> On Apr 12, 6:18 pm, nagia.rets...@gmail.com wrote: >> > Well, instead of being a smartass it would be nice if you could actually help for once. >> >> Interesting! >> >> Among the things which you dont seem to know is the meaning of the >> word 'once'. > > Same applies for you too. Stop being smartasses. Please keep in mind that this is a community of volunteers. Nobody here is being paid for their time to help you fix your website, and if you manage to irritate us in the process, we're likely to just walk away from it. I looked over the code that you have provided us with, and based on that I could not see any reason why the html would be in the form of a bytes instead of a str. Since nobody else here seems to have any further insight into the problem either, you're just going to have to find a a way to debug the code. If you cannot do that on your own, then I suggest that you find a contractor who can, hire them, and grant them the access they need to do a real debugging session. I would also recommend that in the future you should stop deploying untested code to your production website. Set up a development environment for yourself, make the changes there, and only deploy when you know that everything is working.
[toc] | [prev] | [next] | [standalone]
| From | Roy Smith <roy@panix.com> |
|---|---|
| Date | 2013-04-12 14:49 -0400 |
| Message-ID | <roy-548E0E.14491512042013@news.panix.com> |
| In reply to | #43477 |
In article <mailman.533.1365792239.3114.python-list@python.org>, Ian Kelly <ian.g.kelly@gmail.com> wrote: > I would also recommend that in the future you should stop deploying > untested code to your production website. Set up a development > environment for yourself, make the changes there, and only deploy when > you know that everything is working. But that takes all the fun out of it :-)
[toc] | [prev] | [next] | [standalone]
| From | nagia.retsina@gmail.com |
|---|---|
| Date | 2013-04-12 13:48 -0700 |
| Message-ID | <a2554eeb-2023-4af1-bb4b-5b7b8d9ae27a@googlegroups.com> |
| In reply to | #43477 |
Τη Παρασκευή, 12 Απριλίου 2013 9:37:29 μ.μ. UTC+3, ο χρήστης Ian έγραψε: > On Fri, Apr 12, 2013 at 8:36 AM, <nagia.retsina@gmail.com> wrote: > > > Τη Παρασκευή, 12 Απριλίου 2013 4:29:51 μ.μ. UTC+3, ο χρήστης rusi έγραψε: > > >> On Apr 12, 6:18 pm, nagia.rets...@gmail.com wrote: > > >> > Well, instead of being a smartass it would be nice if you could actually help for once. > > >> > > >> Interesting! > > >> > > >> Among the things which you dont seem to know is the meaning of the > > >> word 'once'. > > > > > > Same applies for you too. Stop being smartasses. > > > > Please keep in mind that this is a community of volunteers. Nobody > > here is being paid for their time to help you fix your website, and if > > you manage to irritate us in the process, we're likely to just walk > > away from it. > > > > I looked over the code that you have provided us with, and based on > > that I could not see any reason why the html would be in the form of a > > bytes instead of a str. Since nobody else here seems to have any > > further insight into the problem either, you're just going to have to > > find a a way to debug the code. If you cannot do that on your own, > > then I suggest that you find a contractor who can, hire them, and > > grant them the access they need to do a real debugging session. > > > > I would also recommend that in the future you should stop deploying > > untested code to your production website. Set up a development > > environment for yourself, make the changes there, and only deploy when > > you know that everything is working. I agree with what you say except form the fact that i try to irritate people. Look at the thread and you will see who's irritating whom first.
[toc] | [prev] | [next] | [standalone]
| From | nagia.retsina@gmail.com |
|---|---|
| Date | 2013-04-12 13:48 -0700 |
| Message-ID | <mailman.536.1365799721.3114.python-list@python.org> |
| In reply to | #43477 |
Τη Παρασκευή, 12 Απριλίου 2013 9:37:29 μ.μ. UTC+3, ο χρήστης Ian έγραψε: > On Fri, Apr 12, 2013 at 8:36 AM, <nagia.retsina@gmail.com> wrote: > > > Τη Παρασκευή, 12 Απριλίου 2013 4:29:51 μ.μ. UTC+3, ο χρήστης rusi έγραψε: > > >> On Apr 12, 6:18 pm, nagia.rets...@gmail.com wrote: > > >> > Well, instead of being a smartass it would be nice if you could actually help for once. > > >> > > >> Interesting! > > >> > > >> Among the things which you dont seem to know is the meaning of the > > >> word 'once'. > > > > > > Same applies for you too. Stop being smartasses. > > > > Please keep in mind that this is a community of volunteers. Nobody > > here is being paid for their time to help you fix your website, and if > > you manage to irritate us in the process, we're likely to just walk > > away from it. > > > > I looked over the code that you have provided us with, and based on > > that I could not see any reason why the html would be in the form of a > > bytes instead of a str. Since nobody else here seems to have any > > further insight into the problem either, you're just going to have to > > find a a way to debug the code. If you cannot do that on your own, > > then I suggest that you find a contractor who can, hire them, and > > grant them the access they need to do a real debugging session. > > > > I would also recommend that in the future you should stop deploying > > untested code to your production website. Set up a development > > environment for yourself, make the changes there, and only deploy when > > you know that everything is working. I agree with what you say except form the fact that i try to irritate people. Look at the thread and you will see who's irritating whom first.
[toc] | [prev] | [next] | [standalone]
| From | nagia.retsina@gmail.com |
|---|---|
| Date | 2013-04-13 23:00 -0700 |
| Message-ID | <f6140a71-533e-4a6c-810d-6b8b1b046932@googlegroups.com> |
| In reply to | #43230 |
Τη Τετάρτη, 10 Απριλίου 2013 12:10:13 π.μ. UTC+3, ο χρήστης Νίκος Γκρ33κ έγραψε:
> Hello, iam still trying to alter the code form python 2.6 => 3.3
>
>
>
> Everyrging its setup except that unicode error that you can see if you go to http://superhost.gr
>
>
>
> Can anyone help with this?
>
> I even tried to change print() with sys.stdout.buffer() but still i get the same unicode issue.
>
>
>
> I don't know what to try anymore.
root@nikos [/home/nikos/public_html/foo-py]# pwd
/home/nikos/public_html/foo-py
root@nikos [/home/nikos/public_html/foo-py]# cat foo.py
#!/bin/sh
exec 2>>/home/nikos/cgi.err.out
echo "$0 $*" >&2
id >&2
env | sort >&2
set -x
exec /full/path/to/foo-py ${1+"$@"}
root@nikos [/home/nikos/public_html/foo-py]# python3 foo.py
File "foo.py", line 2
exec 2>>/home/nikos/cgi.err.out
^
SyntaxError: invalid syntax
root@nikos [/home/nikos/public_html/foo-py]#
As far as thr tail -f of the error_log:
root@nikos [/home/nikos/public_html]# touch /var/log/httpd/error_log
root@nikos [/home/nikos/public_html]# tail -f /var/log/httpd/error_log
and its empty even when at the exact same time i run 'python3 metrites.py' from another interactive prompt when it supposed to give live feed of the error messages.
Cameron would it be too much to ask to provide you with root access to my VPS server so you can have a look there too?
i can pay you if you like if you wait a few days to gather some money.
[toc] | [prev] | [next] | [standalone]
| From | Cameron Simpson <cs@zip.com.au> |
|---|---|
| Date | 2013-04-14 19:28 +1000 |
| Message-ID | <mailman.584.1365931737.3114.python-list@python.org> |
| In reply to | #43562 |
On 13Apr2013 23:00, nagia.retsina@gmail.com <nagia.retsina@gmail.com> wrote:
| root@nikos [/home/nikos/public_html/foo-py]# pwd
| /home/nikos/public_html/foo-py
| root@nikos [/home/nikos/public_html/foo-py]# cat foo.py
| #!/bin/sh
| exec 2>>/home/nikos/cgi.err.out
| echo "$0 $*" >&2
| id >&2
| env | sort >&2
| set -x
| exec /full/path/to/foo-py ${1+"$@"}
|
| root@nikos [/home/nikos/public_html/foo-py]# python3 foo.py
| File "foo.py", line 2
| exec 2>>/home/nikos/cgi.err.out
| ^
| SyntaxError: invalid syntax
That is because foo.py isn't a python script anymore, it is a shell script.
Its purpose is to divert stderr to a file and to recite various
things about the environment to that file in addition to any error
messages.
Just run it directly:
./foo.py
The #! line should cause it to be run by the shell.
I also recommend you try to do all this as your normal user account.
Root is for administration, such as stopping/starting apache and
so on. Not test running scripts from the command line; consider:
if the script has bugs, as root it can do an awful lot of damage.
| root@nikos [/home/nikos/public_html/foo-py]#
| As far as thr tail -f of the error_log:
| root@nikos [/home/nikos/public_html]# touch /var/log/httpd/error_log
That won't do you much good; apache has not opened it, and so it
will not be writing to it. It was writing to a file of that name,
but you removed that file. Apache probably still has its hooks in the old
file (which now has no name).
Restarting apache should open (or create if missing) this file for you.
| root@nikos [/home/nikos/public_html]# tail -f /var/log/httpd/error_log
| and its empty even when at the exact same time i run 'python3
| metrites.py' from another interactive prompt when it supposed to
| give live feed of the error messages.
No, _apache_ writes to that file. So only when you visit the web
page will stuff appear there.
If you just run things from the command line, error messages will appear on your terminal. Or, after this line of the wrapper script:
exec 2>>/home/nikos/cgi.err.out
the error messages will appear in cgi.err.out.
| Cameron would it be too much to ask to provide you with root
| access to my VPS server so you can have a look there too?
| i can pay you if you like if you wait a few days to gather some money.
I really do not recommend that:
- it is nuts to blithely allow a stranger root access to your system
- you won't learn anything about CGI scripts
What you need for further debugging of your python issues is access
to the error messages from the CGI script. That is the purpose of
the wrapper script.
Get the wrapper running on the command line and then test it via the browser.
Cheers,
--
Cameron Simpson <cs@zip.com.au>
Lord grant me the serenity to accept the things I can not change,
the courage to change the things that I can,
and the wisdom to hide the bodies of those people I had to kill
because they pissed me off.
- Jeffrey Papen <JPapen@asucla.ucla.edu>
[toc] | [prev] | [next] | [standalone]
| From | nagia.retsina@gmail.com |
|---|---|
| Date | 2013-04-14 04:22 -0700 |
| Message-ID | <5108f522-3117-41e6-9ad0-88ceed14398c@googlegroups.com> |
| In reply to | #43566 |
Τη Κυριακή, 14 Απριλίου 2013 12:28:32 μ.μ. UTC+3, ο χρήστης Cameron Simpson έγραψε:
> On 13Apr2013 23:00, nagia.retsina@gmail.com <nagia.retsina@gmail.com> wrote:
>
> | root@nikos [/home/nikos/public_html/foo-py]# pwd
>
> | /home/nikos/public_html/foo-py
>
> | root@nikos [/home/nikos/public_html/foo-py]# cat foo.py
>
> | #!/bin/sh
>
> | exec 2>>/home/nikos/cgi.err.out
>
> | echo "$0 $*" >&2
>
> | id >&2
>
> | env | sort >&2
>
> | set -x
>
> | exec /full/path/to/foo-py ${1+"$@"}
>
> |
>
> | root@nikos [/home/nikos/public_html/foo-py]# python3 foo.py
>
> | File "foo.py", line 2
>
> | exec 2>>/home/nikos/cgi.err.out
>
> | ^
>
> | SyntaxError: invalid syntax
>
>
>
> That is because foo.py isn't a python script anymore, it is a shell script.
>
> Its purpose is to divert stderr to a file and to recite various
>
> things about the environment to that file in addition to any error
>
> messages.
>
>
>
> Just run it directly:
>
>
>
> ./foo.py
>
>
>
> The #! line should cause it to be run by the shell.
>
>
>
> I also recommend you try to do all this as your normal user account.
>
> Root is for administration, such as stopping/starting apache and
>
> so on. Not test running scripts from the command line; consider:
>
> if the script has bugs, as root it can do an awful lot of damage.
>
>
>
> | root@nikos [/home/nikos/public_html/foo-py]#
>
> | As far as thr tail -f of the error_log:
>
> | root@nikos [/home/nikos/public_html]# touch /var/log/httpd/error_log
>
>
>
> That won't do you much good; apache has not opened it, and so it
>
> will not be writing to it. It was writing to a file of that name,
>
> but you removed that file. Apache probably still has its hooks in the old
>
> file (which now has no name).
>
>
>
> Restarting apache should open (or create if missing) this file for you.
>
>
>
> | root@nikos [/home/nikos/public_html]# tail -f /var/log/httpd/error_log
>
> | and its empty even when at the exact same time i run 'python3
>
> | metrites.py' from another interactive prompt when it supposed to
>
> | give live feed of the error messages.
>
>
>
> No, _apache_ writes to that file. So only when you visit the web
>
> page will stuff appear there.
>
>
>
> If you just run things from the command line, error messages will appear on your terminal. Or, after this line of the wrapper script:
>
>
>
> exec 2>>/home/nikos/cgi.err.out
>
>
>
> the error messages will appear in cgi.err.out.
>
>
>
> | Cameron would it be too much to ask to provide you with root
>
> | access to my VPS server so you can have a look there too?
>
> | i can pay you if you like if you wait a few days to gather some money.
>
>
>
> I really do not recommend that:
>
>
>
> - it is nuts to blithely allow a stranger root access to your system
>
> - you won't learn anything about CGI scripts
>
>
>
> What you need for further debugging of your python issues is access
>
> to the error messages from the CGI script. That is the purpose of
>
> the wrapper script.
>
>
>
> Get the wrapper running on the command line and then test it via the browser.
>
>
>
> Cheers,
>
> --
>
> Cameron Simpson <cs@zip.com.au>
>
>
>
> Lord grant me the serenity to accept the things I can not change,
>
> the courage to change the things that I can,
>
> and the wisdom to hide the bodies of those people I had to kill
>
> because they pissed me off.
>
> - Jeffrey Papen <JPapen@asucla.ucla.edu>
Well i trust you because you are the only one along with Lele that are helpimg me here:
i tried what you said:
root@nikos [/home/nikos/public_html/cgi-bin]# service httpd restart
root@nikos [/home/nikos/public_html/cgi-bin]# python3 metrites.py
root@nikos [/home/nikos/public_html]# cd foo-py/
root@nikos [/home/nikos/public_html/foo-py]# ls
./ ../ foo.py*
root@nikos [/home/nikos/public_html/foo-py]# ./foo.py
root@nikos [/home/nikos/public_html/foo-py]# cd ..
root@nikos [/home/nikos/public_html]# cat cgi.err.out
root@nikos [/home/nikos/public_html/cgi-bin]# cat /var/log/httpd/error_log
root@nikos [/home/nikos/public_html/cgi-bin]#
and i have run the script form browser but i still see nothing.
I insist that you will make the most of this if you access the VPS yourself.
it runs CentOS 6.4
Please accept, i trust you.
[toc] | [prev] | [next] | [standalone]
| From | Cameron Simpson <cs@zip.com.au> |
|---|---|
| Date | 2013-04-18 09:00 +1000 |
| Message-ID | <mailman.739.1366239671.3114.python-list@python.org> |
| In reply to | #43569 |
On 14Apr2013 04:22, nagia.retsina@gmail.com <nagia.retsina@gmail.com> wrote:
| > | Cameron would it be too much to ask to provide you with root
| > | access to my VPS server so you can have a look there too?
| > | i can pay you if you like if you wait a few days to gather some money.
| >
| > I really do not recommend that:
| > - it is nuts to blithely allow a stranger root access to your system
| > - you won't learn anything about CGI scripts
[...]
| I insist that you will make the most of this if you access the VPS yourself.
| it runs CentOS 6.4
| Please accept, i trust you.
Very well.
Let's take this off list to personal email (note that the reply-to
on this message is just myself, not the list/group).
We can return here after sorting CGI issues, should there be any further python
specific issues.
Reply to this message. I will email you my ssh public key. Please make me an
_ordinary_ user account called "cameron" and send me the ssh details of your VPS.
--
Cameron Simpson <cs@zip.com.au>
TeX: When you pronounce it correctly to your computer, the terminal may
become slightly moist. - D. E. Knuth.
[toc] | [prev] | [next] | [standalone]
| From | Νίκος Γκρ33κ <nikos.gr33k@gmail.com> |
|---|---|
| Date | 2013-04-17 20:37 -0700 |
| Message-ID | <5b84d1d7-f769-4e4a-b033-9e2e4cc12f94@googlegroups.com> |
| In reply to | #43786 |
Τη Πέμπτη, 18 Απριλίου 2013 2:00:48 π.μ. UTC+3, ο χρήστης Cameron Simpson έγραψε: > Reply to this message. I will email you my ssh public key. Please make me an > _ordinary_ user account called "cameron" and send me the ssh details of your > VPS. Thank you very much Cameron, i appreciate all your help and i'am willing to open you a free lifetime premium account at my webhosting as a token of appreciation. I have just mail you the login credentials.
[toc] | [prev] | [next] | [standalone]
| From | Νίκος Γκρ33κ <nikos.gr33k@gmail.com> |
|---|---|
| Date | 2013-04-17 20:37 -0700 |
| Message-ID | <mailman.753.1366256249.3114.python-list@python.org> |
| In reply to | #43786 |
Τη Πέμπτη, 18 Απριλίου 2013 2:00:48 π.μ. UTC+3, ο χρήστης Cameron Simpson έγραψε: > Reply to this message. I will email you my ssh public key. Please make me an > _ordinary_ user account called "cameron" and send me the ssh details of your > VPS. Thank you very much Cameron, i appreciate all your help and i'am willing to open you a free lifetime premium account at my webhosting as a token of appreciation. I have just mail you the login credentials.
[toc] | [prev] | [next] | [standalone]
| From | Νίκος Γκρ33κ <nikos.gr33k@gmail.com> |
|---|---|
| Date | 2013-04-19 12:16 -0700 |
| Message-ID | <79a45556-6702-43f0-855a-e73db6012dc2@googlegroups.com> |
| In reply to | #43786 |
Hello Cameron, Did you received my yesterday's mail?
[toc] | [prev] | [next] | [standalone]
| From | nagia.retsina@gmail.com |
|---|---|
| Date | 2013-04-14 04:22 -0700 |
| Message-ID | <mailman.585.1365938578.3114.python-list@python.org> |
| In reply to | #43566 |
Τη Κυριακή, 14 Απριλίου 2013 12:28:32 μ.μ. UTC+3, ο χρήστης Cameron Simpson έγραψε:
> On 13Apr2013 23:00, nagia.retsina@gmail.com <nagia.retsina@gmail.com> wrote:
>
> | root@nikos [/home/nikos/public_html/foo-py]# pwd
>
> | /home/nikos/public_html/foo-py
>
> | root@nikos [/home/nikos/public_html/foo-py]# cat foo.py
>
> | #!/bin/sh
>
> | exec 2>>/home/nikos/cgi.err.out
>
> | echo "$0 $*" >&2
>
> | id >&2
>
> | env | sort >&2
>
> | set -x
>
> | exec /full/path/to/foo-py ${1+"$@"}
>
> |
>
> | root@nikos [/home/nikos/public_html/foo-py]# python3 foo.py
>
> | File "foo.py", line 2
>
> | exec 2>>/home/nikos/cgi.err.out
>
> | ^
>
> | SyntaxError: invalid syntax
>
>
>
> That is because foo.py isn't a python script anymore, it is a shell script.
>
> Its purpose is to divert stderr to a file and to recite various
>
> things about the environment to that file in addition to any error
>
> messages.
>
>
>
> Just run it directly:
>
>
>
> ./foo.py
>
>
>
> The #! line should cause it to be run by the shell.
>
>
>
> I also recommend you try to do all this as your normal user account.
>
> Root is for administration, such as stopping/starting apache and
>
> so on. Not test running scripts from the command line; consider:
>
> if the script has bugs, as root it can do an awful lot of damage.
>
>
>
> | root@nikos [/home/nikos/public_html/foo-py]#
>
> | As far as thr tail -f of the error_log:
>
> | root@nikos [/home/nikos/public_html]# touch /var/log/httpd/error_log
>
>
>
> That won't do you much good; apache has not opened it, and so it
>
> will not be writing to it. It was writing to a file of that name,
>
> but you removed that file. Apache probably still has its hooks in the old
>
> file (which now has no name).
>
>
>
> Restarting apache should open (or create if missing) this file for you.
>
>
>
> | root@nikos [/home/nikos/public_html]# tail -f /var/log/httpd/error_log
>
> | and its empty even when at the exact same time i run 'python3
>
> | metrites.py' from another interactive prompt when it supposed to
>
> | give live feed of the error messages.
>
>
>
> No, _apache_ writes to that file. So only when you visit the web
>
> page will stuff appear there.
>
>
>
> If you just run things from the command line, error messages will appear on your terminal. Or, after this line of the wrapper script:
>
>
>
> exec 2>>/home/nikos/cgi.err.out
>
>
>
> the error messages will appear in cgi.err.out.
>
>
>
> | Cameron would it be too much to ask to provide you with root
>
> | access to my VPS server so you can have a look there too?
>
> | i can pay you if you like if you wait a few days to gather some money.
>
>
>
> I really do not recommend that:
>
>
>
> - it is nuts to blithely allow a stranger root access to your system
>
> - you won't learn anything about CGI scripts
>
>
>
> What you need for further debugging of your python issues is access
>
> to the error messages from the CGI script. That is the purpose of
>
> the wrapper script.
>
>
>
> Get the wrapper running on the command line and then test it via the browser.
>
>
>
> Cheers,
>
> --
>
> Cameron Simpson <cs@zip.com.au>
>
>
>
> Lord grant me the serenity to accept the things I can not change,
>
> the courage to change the things that I can,
>
> and the wisdom to hide the bodies of those people I had to kill
>
> because they pissed me off.
>
> - Jeffrey Papen <JPapen@asucla.ucla.edu>
Well i trust you because you are the only one along with Lele that are helpimg me here:
i tried what you said:
root@nikos [/home/nikos/public_html/cgi-bin]# service httpd restart
root@nikos [/home/nikos/public_html/cgi-bin]# python3 metrites.py
root@nikos [/home/nikos/public_html]# cd foo-py/
root@nikos [/home/nikos/public_html/foo-py]# ls
./ ../ foo.py*
root@nikos [/home/nikos/public_html/foo-py]# ./foo.py
root@nikos [/home/nikos/public_html/foo-py]# cd ..
root@nikos [/home/nikos/public_html]# cat cgi.err.out
root@nikos [/home/nikos/public_html/cgi-bin]# cat /var/log/httpd/error_log
root@nikos [/home/nikos/public_html/cgi-bin]#
and i have run the script form browser but i still see nothing.
I insist that you will make the most of this if you access the VPS yourself.
it runs CentOS 6.4
Please accept, i trust you.
[toc] | [prev] | [next] | [standalone]
| From | Νίκος Γκρ33κ <nikos.gr33k@gmail.com> |
|---|---|
| Date | 2013-04-15 11:42 -0700 |
| Message-ID | <751502a7-e2d4-4bb5-9712-100a7d6564f2@googlegroups.com> |
| In reply to | #43566 |
Hello, can you still help me please?
[toc] | [prev] | [next] | [standalone]
| From | Νίκος Γκρ33κ <nikos.gr33k@gmail.com> |
|---|---|
| Date | 2013-04-15 11:42 -0700 |
| Message-ID | <mailman.639.1366051340.3114.python-list@python.org> |
| In reply to | #43566 |
Hello, can you still help me please?
[toc] | [prev] | [next] | [standalone]
| From | nagia.retsina@gmail.com |
|---|---|
| Date | 2013-04-16 23:56 -0700 |
| Message-ID | <e7f4bc30-c5d2-4769-b5bd-3be16ce8ca23@googlegroups.com> |
| In reply to | #43566 |
Τη Κυριακή, 14 Απριλίου 2013 12:28:32 μ.μ. UTC+3, ο χρήστης Cameron Simpson έγραψε:
> On 13Apr2013 23:00, nagia.retsina@gmail.com <nagia.retsina@gmail.com> wrote:
>
> | root@nikos [/home/nikos/public_html/foo-py]# pwd
>
> | /home/nikos/public_html/foo-py
>
> | root@nikos [/home/nikos/public_html/foo-py]# cat foo.py
>
> | #!/bin/sh
>
> | exec 2>>/home/nikos/cgi.err.out
>
> | echo "$0 $*" >&2
>
> | id >&2
>
> | env | sort >&2
>
> | set -x
>
> | exec /full/path/to/foo-py ${1+"$@"}
>
> |
>
> | root@nikos [/home/nikos/public_html/foo-py]# python3 foo.py
>
> | File "foo.py", line 2
>
> | exec 2>>/home/nikos/cgi.err.out
>
> | ^
>
> | SyntaxError: invalid syntax
>
>
>
> That is because foo.py isn't a python script anymore, it is a shell script.
>
> Its purpose is to divert stderr to a file and to recite various
>
> things about the environment to that file in addition to any error
>
> messages.
>
>
>
> Just run it directly:
>
>
>
> ./foo.py
>
>
>
> The #! line should cause it to be run by the shell.
>
>
>
> I also recommend you try to do all this as your normal user account.
>
> Root is for administration, such as stopping/starting apache and
>
> so on. Not test running scripts from the command line; consider:
>
> if the script has bugs, as root it can do an awful lot of damage.
>
>
>
> | root@nikos [/home/nikos/public_html/foo-py]#
>
> | As far as thr tail -f of the error_log:
>
> | root@nikos [/home/nikos/public_html]# touch /var/log/httpd/error_log
>
>
>
> That won't do you much good; apache has not opened it, and so it
>
> will not be writing to it. It was writing to a file of that name,
>
> but you removed that file. Apache probably still has its hooks in the old
>
> file (which now has no name).
>
>
>
> Restarting apache should open (or create if missing) this file for you.
>
>
>
> | root@nikos [/home/nikos/public_html]# tail -f /var/log/httpd/error_log
>
> | and its empty even when at the exact same time i run 'python3
>
> | metrites.py' from another interactive prompt when it supposed to
>
> | give live feed of the error messages.
>
>
>
> No, _apache_ writes to that file. So only when you visit the web
>
> page will stuff appear there.
>
>
>
> If you just run things from the command line, error messages will appear on your terminal. Or, after this line of the wrapper script:
>
>
>
> exec 2>>/home/nikos/cgi.err.out
>
>
>
> the error messages will appear in cgi.err.out.
>
>
>
> | Cameron would it be too much to ask to provide you with root
>
> | access to my VPS server so you can have a look there too?
>
> | i can pay you if you like if you wait a few days to gather some money.
>
>
>
> I really do not recommend that:
>
>
>
> - it is nuts to blithely allow a stranger root access to your system
>
> - you won't learn anything about CGI scripts
>
>
>
> What you need for further debugging of your python issues is access
>
> to the error messages from the CGI script. That is the purpose of
>
> the wrapper script.
>
>
>
> Get the wrapper running on the command line and then test it via the browser.
>
>
>
> Cheers,
>
> --
>
> Cameron Simpson <cs@zip.com.au>
>
>
>
> Lord grant me the serenity to accept the things I can not change,
>
> the courage to change the things that I can,
>
> and the wisdom to hide the bodies of those people I had to kill
>
> because they pissed me off.
>
> - Jeffrey Papen <JPapen@asucla.ucla.edu>
cameron,
can you help please or tell me what else i need to try?
Hello
[toc] | [prev] | [next] | [standalone]
| From | Chris Angelico <rosuav@gmail.com> |
|---|---|
| Date | 2013-04-17 17:01 +1000 |
| Message-ID | <mailman.707.1366182106.3114.python-list@python.org> |
| In reply to | #43733 |
On Wed, Apr 17, 2013 at 4:56 PM, <nagia.retsina@gmail.com> wrote: > can you help please or tell me what else i need to try? You need to try trimming quoted text in replies, not double-spacing, and paying for help. ChrisA
[toc] | [prev] | [next] | [standalone]
| From | Chris Angelico <rosuav@gmail.com> |
|---|---|
| Date | 2013-04-17 17:32 +1000 |
| Message-ID | <mailman.711.1366183947.3114.python-list@python.org> |
| In reply to | #43733 |
On Wed, Apr 17, 2013 at 4:56 PM, <nagia.retsina@gmail.com> wrote: > can you help please or tell me what else i need to try? You need to try trimming quoted text in replies, not double-spacing, and paying for help. ChrisA
[toc] | [prev] | [next] | [standalone]
Page 4 of 5 — ← Prev page 1 2 3 [4] 5 Next page →
Back to top | Article view | comp.lang.python
csiph-web