Python Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming LanguagesPython Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old March 23rd, 2004, 06:14 PM
penngray penngray is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Posts: 38 penngray User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 52 m 31 sec
Reputation Power: 10
Cant get httplib working through mod python

python 2.2.3, I the directory is configure to use mod publisher for all documents called from it.


test.py

Code:
def getwebpage(req,**arg):
	import httplib
	conn = httplib.HTTPConnection("www.python.org")
	conn.request("GET", "/index.html")
	r1 = conn.getresponse()
	return r1.status

test.html

<html>

<FORM action="/draft/htmlRead.py/getwebpage" method="POST">
<input type="submit" value="Login" style="width:100px; font-family:verdana; font-size:10px">
</FORM>

</html>


The errror I get is....


Mod_python error: "PythonHandler mod_python.publisher"

Traceback (most recent call last):

File "/usr/local/lib/python2.2/site-packages/mod_python/apache.py", line 332, in HandlerDispatch
result = object(req)

File "/usr/local/lib/python2.2/site-packages/mod_python/publisher.py", line 198, in handler
result = apply(object, (), args)

File "/usr/local/apach2/htdocs/draft/htmlRead.py", line 5, in getwebpage
conn = httplib.HTTPConnection("www.python.org")

AttributeError: 'module' object has no attribute 'HTTPConnection'


I cant figure this out, I have a full fantasy sports app working and lots of function calls, never had this problem..

Im stumped
penn

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesPython Programming > Cant get httplib working through mod python

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap