[Tutor] AttributeError: 'str' object has no attribute 'geturl'

Joseph Quigley cpu.crazy at gmail.com
Sun Oct 9 16:54:54 CEST 2005


Javier wrote:

>  Class Data has a class attribute, 'f', defined as an empty string. Check if Data.f is initialized before calling getImg.
>  Also, why initialize with an empty str? Put a None in there or don't define the attribute at all.
>  A tip: in line 126 there is a print Data.f. This will show nothing in this case. When printing for debugging, error reporting or user input, always place quotes around values so that it is easier to spot empty strings or non printable characters.
>  Finally, keep in mind that you can always use pdb to see what's up.
>
>Javier
>  
>

Thanks,
    I'll try to clean up what had gotten past me.



More information about the Tutor mailing list