[Tutor] URLLIB Problem Progress(?)

Curtis Larsen curtis.larsen@Covance.Com
Tue, 01 Feb 2000 14:34:08 -0600


I've been continuing to make progress on getting the URLLIB module to
work with an HTTP proxy -- my http_proxy environment variable currently
reads: "http://proxyname.mydomain.com/" -- and now I get this error when
running "urllib.test()":

Traceback (innermost last):
  File "/usr/local/lib/python1.5/urllib.py", line 985, in ?
    test()
  File "/usr/local/lib/python1.5/urllib.py", line 964, in test
    fn, h = urlretrieve(url)
  File "/usr/local/lib/python1.5/urllib.py", line 69, in urlretrieve
    return _urlopener.retrieve(url)
  File "/usr/local/lib/python1.5/urllib.py", line 186, in retrieve
    fp = self.open(url)
  File "/usr/local/lib/python1.5/urllib.py", line 159, in open
    return getattr(self, name)(url)
  File "/usr/local/lib/python1.5/urllib.py", line 259, in open_http
    return addinfourl(fp, headers, "http:" + url)
TypeError: illegal argument type for built-in operation

Is this saying that the "string-constant-plus-'url'-variable" line above
is not acceptable?
Am I missing something silly?

Thanks!
Curtis


PS: Thanks for the help on my last post about mapping.  Curiosity
question: Why don't dictionaries use curly braces instead of square
brackets for assignation?  e.g. <dic{key}=value> instead of
<dic[key]=value>.   My initial newbie reaction to seeing that is to
think the dictionary is a list -- especially when you use curly braces
with them otherwise.  Just wondering.

begin 644 TEXT.htm
M/"%$3T-465!%($A434P@4%5"3$E#("(M+R]7,T,O+T141"!(5$U,(#0N,"!4
M<F%N<VET:6]N86PO+T5.(CX-"CQ(5$U,/CQ(14%$/@T*/$U%5$$@8V]N=&5N
M=#TB=&5X="]H=&UL.R!C:&%R<V5T/6ES;RTX.#4Y+3$B(&AT='`M97%U:78]
M0V]N=&5N="U4>7!E/@T*/$U%5$$@8V]N=&5N=#TB35-(5$U,(#4N,#`N,C<R
M,BXQ,S`P(B!N86UE/4=%3D52051/4CX\+TA%040^#0H\0D]$62!B9T-O;&]R
M/2-F9F9F9F8@#0IS='EL93TB1D].5#H@,3!P="!!<FEA;#L@34%21TE.+4Q%
M1E0Z(#)P>#L@34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EO;F%R
M:65S('5S92!C=7)L>2!B<F%C97,@:6YS=&5A9"!O9B!S<75A<F4@8G)A8VME
M=',@9F]R(`T*87-S:6=N871I;VX_)FYB<W`[(&4N9RX@)FQT.V1I8WMK97E]
M/79A;'5E)F=T.R!I;G-T96%D(&]F(`T*)FQT.V1I8UMK97E=/79A;'5E)F=T
M.RXF;F)S<#LF;F)S<#L@37D@:6YI=&EA;"!N97=B:64@<F5A8W1I;VX@=&\@
M<V5E:6YG('1H870@:7,@#0IT;R!T:&EN:R!T:&4@9&EC=&EO;F%R>2!I<R!A
M)FYB<W`[;&ES="`M+2!E<W!E8VEA;&QY('=H96X@>6]U('5S92!C=7)L>2!B
M<F%C97,@#0IW:71H('1H96T@;W1H97)W:7-E+B9N8G-P.R!*=7-T('=O;F1E
;<FEN9RX\+T1)5CX\+T)/1%D^/"](5$U,/@T*
`
end


-----------------------------------------------------
Confidentiality Notice: This e-mail transmission 
may contain confidential or legally privileged 
information that is intended only for the individual 
or entity named in the e-mail address. If you are not 
the intended recipient, you are hereby notified that 
any disclosure, copying, distribution, or reliance 
upon the contents of this e-mail is strictly prohibited. 

If you have received this e-mail transmission in error, 
please reply to the sender, so that Covance can arrange 
for proper delivery, and then please delete the message 
from your inbox. Thank you.