No errors displayed but i blank scren nstead.

Discussion in 'Python' started by Íßêïò Ãêñ33ê, Mar 28, 2013.

  1. Fianlly my cgi .py script doesnt produce any more errors, i think i ahve correct them but it present a blank screen

    http://superhost.gr

    Any idea why?
    What should i check?
    Íßêïò Ãêñ33ê, Mar 28, 2013
    #1
    1. Advertising

  2. Íßêïò Ãêñ33ê

    Miki Tebeka Guest

    > Fianlly my cgi .py script doesnt produce any more errors, i think i ahve correct them but it present a blank screen
    > Any idea why?

    Please post the code to the script, otherwise we can't help you.
    Miki Tebeka, Mar 28, 2013
    #2
    1. Advertising

  3. Ôç ÐÝìðôç, 28 Ìáñôßïõ 2013 4:42:59 ì.ì. UTC+2, ï ÷ñÞóôçò Miki Tebeka Ýãñáøå:

    > Please post the code to the script, otherwise we can't help you.


    I wanted to make my website running Python 3 which is more new and bette:)

    i treid to execute metrites.py via my jailed shell, please take a look if i'am not tiring you and maybe you can see if there is nothign wrong because i dont see nayhting.

    The gethostbyaddr at the end its because the script run in cmd instead of in a browser.
    Please help, its alkmost ready to run correctly!


    Code:
     [~/www/cgi-bin]# /usr/bin/python3 metrites.py 
    <!--: spam
    Content-Type: text/html
    
    <body bgcolor="#f0f0f8"><font color="#f0f0f8" size="-5"> -->
    <body bgcolor="#f0f0f8"><font color="#f0f0f8" size="-5"> --> -->
    </font> </font> </font> </script> </object> </blockquote> </pre>
    </table> </table> </table> </table> </table> </font> </font> </font><body bgcolor="#f0f0f8">
    <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
    <tr bgcolor="#6622aa">
    <td valign=bottom>&nbsp;<br>
    <font color="#ffffff" face="helvetica, arial">&nbsp;<br><big><big><strong>KeyError</strong></big></big></font></td[color=blue]
    ><td align=right valign=bottom
    ><font color="#ffffff" face="helvetica, arial">Python 3.2.3: /usr/bin/python3<br>Thu Mar 28 09:41:53 2013</font></td></tr></table>[/color]
     
    <p>A problem occurred in a Python script.  Here is the sequence of
    function calls leading up to the error, in the order they occurred.</p>
    <table width="100%" cellspacing=0 cellpadding=0 border=0>
    <tr><td bgcolor="#d8bbff"><big>&nbsp;</big><a href="file:///home/nikos/public_html/cgi-bin/metrites.py">/home/nikos/public_html/cgi-bin/metrites.py</a> in <strong><module></strong>()</td></tr>
    <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;&nbsp;26</small>&nbsp;userform&nbsp;=&nbsp;form.getvalue('userform')<br>
    </tt></font></td></tr>
    <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;&nbsp;27</small>&nbsp;<br>
    </tt></font></td></tr>
    <tr><td bgcolor="#ffccee"><tt>=&gt;<small>&nbsp;&nbsp;&nbsp;28</small>&nbsp;host&nbsp;=&nbsp;socket.gethostbyaddr(&nbsp;os.environ['REMOTE_ADDR']&nbsp;)[0]<br>
    </tt></td></tr>
    <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;&nbsp;29</small>&nbsp;date&nbsp;=&nbsp;(&nbsp;datetime.utcnow()&nbsp;+&nbsp;timedelta(hours=2)&nbsp;).strftime(&nbsp;'%y-%m-%d&nbsp;%H:%M:%S'&nbsp;)<br>
    </tt></font></td></tr>
    <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;&nbsp;30</small>&nbsp;userinfo&nbsp;=&nbsp;os.environ['HTTP_USER_AGENT']<br>
    </tt></font></td></tr>
    <tr><td><small><font color="#909090">host <em>undefined</em>, <strong>socket</strong>&nbsp;= &lt;module 'socket' from '/opt/python3/lib/python3.2/socket.py'&gt;, socket.<strong>gethostbyaddr</strong>&nbsp;= &lt;built-infunction gethostbyaddr&gt;, <strong>os</strong>&nbsp;= &lt;module 'os' from '/opt/python3/lib/python3.2/os.py'&gt;, os.<strong>environ</strong>&nbsp;= environ({'PROMPT_COMMAND': 'history -a', 'PERL_M...xa=00;36:*.oga=00;36:*.spx=00;36:*.xspf=00;36:'})</font></small></td></tr></table>
    <table width="100%" cellspacing=0 cellpadding=0 border=0>
    <tr><td bgcolor="#d8bbff"><big>&nbsp;</big><a href="file:///opt/python3/lib/python3.2/os.py">/opt/python3/lib/python3.2/os.py</a> in <strong>__getitem__</strong>(self=environ({'PROMPT_COMMAND': 'history -a', 'PERL_M...xa=00;36:*.oga=00;36:*.spx=00;36:*.xspf=00;36:'}), key='REMOTE_ADDR')</td></tr>
    <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;448</small>&nbsp;<br>
    </tt></font></td></tr>
    <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;449</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;def&nbsp;__getitem__(self,&nbsp;key):<br>
    </tt></font></td></tr>
    <tr><td bgcolor="#ffccee"><tt>=&gt;<small>&nbsp;&nbsp;450</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;value&nbsp;=&nbsp;self._data[self.encodekey(key)]<br>
    </tt></td></tr>
    <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;451</small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return&nbsp;self.decodevalue(value)<br>
    </tt></font></td></tr>
    <tr><td><font color="#909090"><tt>&nbsp;&nbsp;<small>&nbsp;&nbsp;452</small>&nbsp;<br>
    </tt></font></td></tr>
    <tr><td><small><font color="#909090">value <em>undefined</em>, <strong>self</strong>&nbsp;= environ({'PROMPT_COMMAND': 'history -a', 'PERL_M...xa=00;36:*.oga=00;36:*.spx=00;36:*.xspf=00;36:'}), self.<strong>_data</strong>&nbsp;= {b'CLASSPATH': b'.:/usr/local/jdk/lib/classes.zip', b'CVS_RSH': b'ssh', b'EDITOR': b'pico', b'GREP_COLOR': b'1;32', b'GREP_OPTIONS': b'--color', b'G_BROKEN_FILENAMES': b'1', b'HISTSIZE': b'5000', b'HOME': b'/home/nikos', b'HOSTNAME': b'menara.websitewelcome.com', b'INPUTRC': b'/etc/inputrc', ...}, self.<strong>encodekey</strong>&nbsp;= &lt;function encode&gt;, <strong>key</strong>&nbsp;= 'REMOTE_ADDR'</font></small></td></tr></table><p><strong>KeyError</strong>: b'REMOTE_ADDR'
    <br><tt><small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</small>&nbsp;</tt>args&nbsp;=
    (b'REMOTE_ADDR',)
    <br><tt><small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</small>&nbsp;</tt>with_traceback&nbsp;=
    &lt;built-in method with_traceback of KeyError object&gt;
    
    
    <!-- The above is a description of an error in a Python program, formatted
    for a Web browser because the 'cgitb' module was enabled.  In case you
    are not reading this in a Web browser, here is the original traceback:
    
    Traceback (most recent call last):
    File "metrites.py", line 28, in &lt;module&gt;
    host = socket.gethostbyaddr( os.environ['REMOTE_ADDR'] )[0]
    File "/opt/python3/lib/python3.2/os.py", line 450, in __getitem__
    value = self._data[self.encodekey(key)]
    KeyError: b'REMOTE_ADDR'
    
    -->
    
    Íßêïò Ãêñ33ê, Mar 28, 2013
    #3
  4. Ôç ÐÝìðôç, 28 Ìáñôßïõ 2013 4:42:59 ì.ì. UTC+2, ï ÷ñÞóôçò Miki Tebeka Ýãñáøå:
    > > Fianlly my cgi .py script doesnt produce any more errors, i think i ahve correct them but it present a blank screen

    >
    > > Any idea why?

    >
    > Please post the code to the script, otherwise we can't help you.


    who ever dent me an email please sent agian or post here too

    he sai soemhtign about param style but accidently got deleted please send again or post here!

    Thank you and i apolgoze.
    Íßêïò Ãêñ33ê, Mar 28, 2013
    #4
  5. On Fri, Mar 29, 2013 at 1:46 AM, Íßêïò Ãêñ33ê <> wrote:
    > <!-- The above is a description of an error in a Python program, formatted
    > for a Web browser because the 'cgitb' module was enabled. In case you
    > are not reading this in a Web browser, here is the original traceback:
    >
    > Traceback (most recent call last):
    > File "metrites.py", line 28, in &lt;module&gt;
    > host = socket.gethostbyaddr( os.environ['REMOTE_ADDR'] )[0]
    > File "/opt/python3/lib/python3.2/os.py", line 450, in __getitem__
    > value = self._data[self.encodekey(key)]
    > KeyError: b'REMOTE_ADDR'
    >
    > -->


    Oh look, an exception traceback! In all this time of using Python,
    Nikos, have you learned how to read these?

    Very courteous of it to provide.

    ChrisA
    Chris Angelico, Mar 28, 2013
    #5
  6. this is correct when it runs from a browser thats not the issue here othwerise it would prodice an error.

    the question is why the blank screen...

    somehting with param style perhaps?
    Íßêïò Ãêñ33ê, Mar 28, 2013
    #6
  7. this is correct when it runs from a browser thats not the issue here othwerise it would prodice an error.

    the question is why the blank screen...

    somehting with param style perhaps?
    Íßêïò Ãêñ33ê, Mar 28, 2013
    #7
  8. PLEASE GIVE ME A CLUE ABOUT THIS SITUATION.

    EVEN JAILED SHELL ACCESS SAYS ITS OKEY BUT I CNA ONLY SEE A BLANK PAGE NOT EVEN AN INTERNAL SERVER ERROR.

    [~/www/cgi-bin]# /usr/bin/python3 metrites.py

    says its ok.
    Íßêïò Ãêñ33ê, Mar 28, 2013
    #8
  9. PLEASE GIVE ME A CLUE ABOUT THIS SITUATION.

    EVEN JAILED SHELL ACCESS SAYS ITS OKEY BUT I CNA ONLY SEE A BLANK PAGE NOT EVEN AN INTERNAL SERVER ERROR.

    [~/www/cgi-bin]# /usr/bin/python3 metrites.py

    says its ok.
    Íßêïò Ãêñ33ê, Mar 28, 2013
    #9
  10. On Fri, Mar 29, 2013 at 2:20 AM, Íßêïò Ãêñ33ê <> wrote:
    > PLEASE GIVE ME A CLUE ABOUT THIS SITUATION.
    >
    > EVEN JAILED SHELL ACCESS SAYS ITS OKEY BUT I CNA ONLY SEE A BLANK PAGE NOT EVEN AN INTERNAL SERVER ERROR.


    Quit shouting. You are asking for free help from volunteers.

    At the moment, you're asking for a killfiling.

    You have the traceback. Read it. Grok it. Solve it.

    ChrisA
    Chris Angelico, Mar 28, 2013
    #10
  11. Ôç ÐÝìðôç, 28 Ìáñôßïõ 2013 5:25:26 ì.ì. UTC+2, ï ÷ñÞóôçò Chris Angelico Ýãñáøå:
    > On Fri, Mar 29, 2013 at 2:20 AM, Íßêïò Ãêñ33ê <> wrote:
    >
    > > PLEASE GIVE ME A CLUE ABOUT THIS SITUATION.

    >
    > >

    >
    > > EVEN JAILED SHELL ACCESS SAYS ITS OKEY BUT I CNA ONLY SEE A BLANK PAGE NOT EVEN AN INTERNAL SERVER ERROR.

    >
    >
    >
    > Quit shouting. You are asking for free help from volunteers.
    >
    >
    >
    > At the moment, you're asking for a killfiling.
    >
    >
    >
    > You have the traceback. Read it. Grok it. Solve it.


    What traceback? It displayes no error at all not i cmd not in browser mode at http://superhost.gr

    i dont see what wrong with it.

    If you know what wrong with it why not just tell me?
    Íßêïò Ãêñ33ê, Mar 28, 2013
    #11
  12. Ôç ÐÝìðôç, 28 Ìáñôßïõ 2013 5:25:26 ì.ì. UTC+2, ï ÷ñÞóôçò Chris Angelico Ýãñáøå:
    > On Fri, Mar 29, 2013 at 2:20 AM, Íßêïò Ãêñ33ê <> wrote:
    >
    > > PLEASE GIVE ME A CLUE ABOUT THIS SITUATION.

    >
    > >

    >
    > > EVEN JAILED SHELL ACCESS SAYS ITS OKEY BUT I CNA ONLY SEE A BLANK PAGE NOT EVEN AN INTERNAL SERVER ERROR.

    >
    >
    >
    > Quit shouting. You are asking for free help from volunteers.
    >
    >
    >
    > At the moment, you're asking for a killfiling.
    >
    >
    >
    > You have the traceback. Read it. Grok it. Solve it.


    What traceback? It displayes no error at all not i cmd not in browser mode at http://superhost.gr

    i dont see what wrong with it.

    If you know what wrong with it why not just tell me?
    Íßêïò Ãêñ33ê, Mar 28, 2013
    #12
  13. Ôç ÐÝìðôç, 28 Ìáñôßïõ 2013 4:42:59 ì.ì. UTC+2, ï ÷ñÞóôçò Miki Tebeka Ýãñáøå:
    > > Fianlly my cgi .py script doesnt produce any more errors, i think i ahve correct them but it present a blank screen

    >
    > > Any idea why?

    >
    > Please post the code to the script, otherwise we can't help you.


    Can you do me a big favour please?

    may i send you my code or perhaps jailed linux access so to understand whats wrong and altyhough i get no erros now i see a blank poage at http://superhost.gr

    Please man iam struggling 2 days to conever a 2,6 script to 3.2.3

    please accept!!!
    Íßêïò Ãêñ33ê, Mar 28, 2013
    #13
  14. On Fri, Mar 29, 2013 at 2:51 AM, Íßêïò Ãêñ33ê <> wrote:
    > Ôç ÐÝìðôç, 28 Ìáñôßïõ 2013 5:25:26 ì.ì.UTC+2, ï ÷ñÞóôçò Chris Angelico Ýãñáøå:
    >> On Fri, Mar 29, 2013 at 2:20 AM, Íßêïò Ãêñ33ê <> wrote:
    >>
    >> > PLEASE GIVE ME A CLUE ABOUT THIS SITUATION.

    >>
    >> >

    >>
    >> > EVEN JAILED SHELL ACCESS SAYS ITS OKEY BUT I CNA ONLY SEE A BLANK PAGENOT EVEN AN INTERNAL SERVER ERROR.

    >>
    >>
    >>
    >> Quit shouting. You are asking for free help from volunteers.
    >>
    >>
    >>
    >> At the moment, you're asking for a killfiling.
    >>
    >>
    >>
    >> You have the traceback. Read it. Grok it. Solve it.

    >
    > What traceback? It displayes no error at all not i cmd not in browser mode at http://superhost.gr
    >
    > i dont see what wrong with it.
    >
    > If you know what wrong with it why not just tell me?


    When you ran it from a shell, it showed you a traceback. Did you solve
    that issue?

    I am about done holding your hand like a little child. If you're not
    going to pay me a salary (with overtime rates, it's Good Friday over
    here now), you can solve your own problem... or at least demonstrate
    that you're trying things. So far, you're just making random changes
    that we can't see to code that we can't see, then expecting us to
    solve your problems.

    ChrisA
    Chris Angelico, Mar 28, 2013
    #14
  15. Ôç ÐÝìðôç, 28 Ìáñôßïõ 2013 5:59:55 ì.ì. UTC+2, ï ÷ñÞóôçò Chris Angelico Ýãñáøå:
    > On Fri, Mar 29, 2013 at 2:51 AM, Íßêïò Ãêñ33ê <> wrote:
    >
    > > Ôç ÐÝìðôç, 28 Ìáñôßïõ 2013 5:25:26 ì.ì. UTC+2, ï ÷ñÞóôçò Chris Angelico Ýãñáøå:

    >
    > >> On Fri, Mar 29, 2013 at 2:20 AM, Íßêïò Ãêñ33ê <> wrote:

    >
    > >>

    >
    > >> > PLEASE GIVE ME A CLUE ABOUT THIS SITUATION.

    >
    > >>

    >
    > >> >

    >
    > >>

    >
    > >> > EVEN JAILED SHELL ACCESS SAYS ITS OKEY BUT I CNA ONLY SEE A BLANK PAGE NOT EVEN AN INTERNAL SERVER ERROR.

    >
    > >>

    >
    > >>

    >
    > >>

    >
    > >> Quit shouting. You are asking for free help from volunteers.

    >
    > >>

    >
    > >>

    >
    > >>

    >
    > >> At the moment, you're asking for a killfiling.

    >
    > >>

    >
    > >>

    >
    > >>

    >
    > >> You have the traceback. Read it. Grok it. Solve it.

    >
    > >

    >
    > > What traceback? It displayes no error at all not i cmd not in browser mode at http://superhost.gr

    >
    > >

    >
    > > i dont see what wrong with it.

    >
    > >

    >
    > > If you know what wrong with it why not just tell me?

    >
    >
    >
    > When you ran it from a shell, it showed you a traceback. Did you solve
    >
    > that issue?
    >
    >
    >
    > I am about done holding your hand like a little child. If you're not
    >
    > going to pay me a salary (with overtime rates, it's Good Friday over
    >
    > here now), you can solve your own problem... or at least demonstrate
    >
    > that you're trying things. So far, you're just making random changes
    >
    > that we can't see to code that we can't see, then expecting us to
    >
    > solve your problems.
    >
    >
    >
    > ChrisA


    I am trying my best with the little knowledge i have and i expect no help from you. You are more inclinded to criticize that to actually help. And if i pay someone that certainly not gonna be you.

    And i told you about gethostbyaddr, tht its not an issue its because the script bein run form cmd that canot get hold of an address via browser tis ok..

    something else is wrong here and the page is displayed blank.
    Íßêïò Ãêñ33ê, Mar 28, 2013
    #15
  16. Ôç ÐÝìðôç, 28 Ìáñôßïõ 2013 5:59:55 ì.ì. UTC+2, ï ÷ñÞóôçò Chris Angelico Ýãñáøå:
    > On Fri, Mar 29, 2013 at 2:51 AM, Íßêïò Ãêñ33ê <> wrote:
    >
    > > Ôç ÐÝìðôç, 28 Ìáñôßïõ 2013 5:25:26 ì.ì. UTC+2, ï ÷ñÞóôçò Chris Angelico Ýãñáøå:

    >
    > >> On Fri, Mar 29, 2013 at 2:20 AM, Íßêïò Ãêñ33ê <> wrote:

    >
    > >>

    >
    > >> > PLEASE GIVE ME A CLUE ABOUT THIS SITUATION.

    >
    > >>

    >
    > >> >

    >
    > >>

    >
    > >> > EVEN JAILED SHELL ACCESS SAYS ITS OKEY BUT I CNA ONLY SEE A BLANK PAGE NOT EVEN AN INTERNAL SERVER ERROR.

    >
    > >>

    >
    > >>

    >
    > >>

    >
    > >> Quit shouting. You are asking for free help from volunteers.

    >
    > >>

    >
    > >>

    >
    > >>

    >
    > >> At the moment, you're asking for a killfiling.

    >
    > >>

    >
    > >>

    >
    > >>

    >
    > >> You have the traceback. Read it. Grok it. Solve it.

    >
    > >

    >
    > > What traceback? It displayes no error at all not i cmd not in browser mode at http://superhost.gr

    >
    > >

    >
    > > i dont see what wrong with it.

    >
    > >

    >
    > > If you know what wrong with it why not just tell me?

    >
    >
    >
    > When you ran it from a shell, it showed you a traceback. Did you solve
    >
    > that issue?
    >
    >
    >
    > I am about done holding your hand like a little child. If you're not
    >
    > going to pay me a salary (with overtime rates, it's Good Friday over
    >
    > here now), you can solve your own problem... or at least demonstrate
    >
    > that you're trying things. So far, you're just making random changes
    >
    > that we can't see to code that we can't see, then expecting us to
    >
    > solve your problems.
    >
    >
    >
    > ChrisA


    I am trying my best with the little knowledge i have and i expect no help from you. You are more inclinded to criticize that to actually help. And if i pay someone that certainly not gonna be you.

    And i told you about gethostbyaddr, tht its not an issue its because the script bein run form cmd that canot get hold of an address via browser tis ok..

    something else is wrong here and the page is displayed blank.
    Íßêïò Ãêñ33ê, Mar 28, 2013
    #16
  17. Like you werent of any help....
    Íßêïò Ãêñ33ê, Mar 28, 2013
    #17
  18. Will someone help me out here please?
    Íßêïò Ãêñ33ê, Mar 28, 2013
    #18
  19. On 28/03/2013 18:37, Îίκος ΓκÏ33κ wrote:
    > Will someone help me out here please?
    >


    I suggest you take a course in diplomacy, but not one given by me :)

    --
    If you're using GoogleCrapâ„¢ please read this
    http://wiki.python.org/moin/GoogleGroupsPython.

    Mark Lawrence
    Mark Lawrence, Mar 28, 2013
    #19
  20. Well i dont like people taking to me this way espceially when iam tryign 2 days for something and thats changing from 2.6 => 3.2.3

    I follow advice as long as i can understand whats being said to me.

    So if someone wants to help by asking me to try things please do.
    Íßêïò Ãêñ33ê, Mar 28, 2013
    #20
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Robert Brown
    Replies:
    2
    Views:
    405
    Kevin Spencer
    Jul 3, 2003
  2. Mark Goldin

    Errors, errors, errors

    Mark Goldin, Jan 17, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    941
    Mark Goldin
    Jan 17, 2004
  3. boney
    Replies:
    1
    Views:
    563
  4. Lance Wynn
    Replies:
    1
    Views:
    1,836
    Lance Wynn
    Feb 3, 2008
  5. Samuel van Laere

    Images get loaded but not displayed?

    Samuel van Laere, Sep 12, 2009, in forum: HTML
    Replies:
    3
    Views:
    536
    Samuel van Laere
    Sep 12, 2009
Loading...

Share This Page