[Zope] Re: urlopen works outside Zope, not inside

Dieter Maurer dieter@handshake.de
Sun, 31 Mar 2002 20:16:14 +0200


Bill Bell writes:
 > ... "urlopen" working outside but not inside Zope ...
 > ...
 > If I upload this into an External Method with function name "getCount" and
 >  then click on the 'Test' tab I get the following:
 > 
 > http://jobsearch.monster.ca/jobsearch.asp?brd=1&cy=CA&lid=236&fn=6&f
 > n=546&fn=660&fn=554&fn=561&q=Cobol<br/>[Errno socket error]
 >  (10061, 'Connection refused')
 > 
 > Would appreciate any more thoughts you might have.
I once had similar unexplainable problems. An "http_proxy" environment
variable finally turned out to be the culprit.

If not, I would look at the complete traceback for your exception.

   The error message is completely clear: "Connection refused".
   "urlopen" tries to connect to a host/port where there is no
   server.
   With the traceback, I would locate the precise code line
   and instrument it to find out where "urlopen" tries to
   connect to.


Dieter