Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Basic python help

Reply
Thread Tools

Basic python help

 
 
Kevin Feng
Guest
Posts: n/a
 
      03-14-2006
I have the following simple html file that is trying to send data to a
python script, however, I am getting a weird server error:

This is my HTML:

<html>
<FORM METHOD="POST" ACTION="../cgi-bin/quoteprice2.py">
Ticker 1
<input type="text" name="ticker1" size=10>
<br>

<input type="submit" value="Submit">
<input type="reset" value="Reset">
</form>
</html>


This is my Python:

#!/usr/bin/python

import cgi
print "Content-type: text/html"
print

form = cgi.FieldStorage()
print form.keys()

print "<br>"

for x in form.keys():
print "%s=%s" % (x, form[x].value) + "<br>"


This is my error

Internal Server Error

The server encountered an internal error or misconfiguration and was unable
to complete your request.

Please contact the server administrator, root@localhost and inform them of
the time the error occurred, and anything you might have done that may have
caused the error.

More information about this error may be available in the server error log.



Any suggestions? Much thanks.

 
Reply With Quote
 
 
 
 
Gregor Horvath
Guest
Posts: n/a
 
      03-14-2006
Kevin Feng schrieb:

> More information about this error may be available in the server error log.
>
>
>
> Any suggestions? Much thanks.
>


What does the error log of the webserver say?

--
Greg
 
Reply With Quote
 
 
 
 
Kevin Feng
Guest
Posts: n/a
 
      03-14-2006
No idea, I do not have permission to access the error log.




On 3/14/06 2:12 AM, in article 2955b$44166cc5$506c2949$,
"Gregor Horvath" <> wrote:

> Kevin Feng schrieb:
>
>> More information about this error may be available in the server error log.
>>
>>
>>
>> Any suggestions? Much thanks.
>>

>
> What does the error log of the webserver say?
>
> --
> Greg


 
Reply With Quote
 
John M. Gabriele
Guest
Posts: n/a
 
      03-14-2006
(Please don't top-post -- fixed)

Kevin Feng wrote:

>
>
> On 3/14/06 2:12 AM, in article 2955b$44166cc5$506c2949$,
> "Gregor Horvath" <> wrote:
>
>
>>Kevin Feng schrieb:
>>
>>
>>>More information about this error may be available in the server error log.
>>>
>>>
>>>
>>>Any suggestions? Much thanks.
>>>

>>
>>What does the error log of the webserver say?
>>
>>--
>>Greg

>


> No idea, I do not have permission to access the error log.
>
>


In your cgi script, try putting "import cgitb; cgitb.enable()"
on the next line right after "import cgi".

Also try changing your POST to GET.

---John
--
(remove zeez if demunging email address)
 
Reply With Quote
 
Dennis Lee Bieber
Guest
Posts: n/a
 
      03-14-2006
On Tue, 14 Mar 2006 01:43:40 -0500, Kevin Feng <>
declaimed the following in comp.lang.python:


>
> Internal Server Error
>
> The server encountered an internal error or misconfiguration and was unable
> to complete your request.
>
> Please contact the server administrator, root@localhost and inform them of
> the time the error occurred, and anything you might have done that may have
> caused the error.
>
> More information about this error may be available in the server error log.
>
>
>
> Any suggestions? Much thanks.


Uhm... contact the admin like the error message says?

Are you sure the server supports Python for CGI?

--
> ================================================== ============ <
> | Wulfraed Dennis Lee Bieber KD6MOG <
> | Bestiaria Support Staff <
> ================================================== ============ <
> Home Page: <http://www.dm.net/~wulfraed/> <
> Overflow Page: <http://wlfraed.home.netcom.com/> <

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
TurboTax Basic vs. Taxcut Basic? Sharp Dressed Man Computer Support 1 01-12-2009 12:52 PM
What is the difference between Visual Basic.NET and Visual Basic 6? Jimmy Dean Computer Support 3 07-25-2005 07:05 AM
Re: Python interpreter in Basic or a Python-2-Basic translator. rrr@ronadam.com Python 0 05-02-2005 01:48 PM
Python interpreter in Basic or a Python-2-Basic translator. Engineer Python 6 05-01-2005 10:16 PM
Upgrading Microsoft Visual Basic 6.0 to Microsoft Visual Basic .NET Jaime MCSD 2 09-20-2003 05:16 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57