problem with my urllib.urlopen() function

Gabriel Genellina gagsl-py2 at yahoo.com.ar
Thu Apr 5 02:51:38 EDT 2007


En Thu, 05 Apr 2007 02:40:38 -0300, Xell Zhang <xellzhang at gmail.com>  
escribió:

> hello all,
> I am a newbie in Python.
> In my module, if I call urllib.urlopen() function like:
> url = "http://www.google.com/"
> source = urllib.urlopen(url)
>
> Then in the output there will be an exception:
> Exception exceptions.AttributeError: "'NoneType' object has no attribute
> 'print_exc'" in <bound method FancyURLopener.__del__ of <
> urllib.FancyURLopener instance at 0x00D59AA8>> ignored
>
>
> I do not know why, if I did something wrong?

It works OK for me (I don't get any exception).
Such messages happen when any __del__ method raises any exception; it  
can't be handled normally so Python just logs the error on the console.
Can you provide a complete and small example showing the problem?

-- 
Gabriel Genellina




More information about the Python-list mailing list