Broken Library Code, suggested course of action
Bruno Desthuilliers
bdesth.quelquechose at free.quelquepart.fr
Mon Feb 5 18:20:01 EST 2007
Melih Onvural a écrit :
> I've been trying to use the URLParse library, and I thought I had all
> of the kinks worked out when I ran into this:
>
> Traceback (most recent call last):
> File "./run.py", line 130, in ?
> main()
> File "./run.py", line 126, in main
> r = crawl.crawl(p, x)
> File "/home/monvural/src/crawl.py", line 74, in crawl
> root = parser.legiturl(url)
> File "/home/monvural/src/crawl.py", line 22, in legiturl
insert this line here:
print "url : ", url, type(url)
> t = urlparse.urlparse(url)
> File "/usr/lib/python2.4/urlparse.py", line 50, in urlparse
> tuple = urlsplit(url, scheme, allow_fragments)
> File "/usr/lib/python2.4/urlparse.py", line 89, in urlsplit
> i = url.find(':')
> AttributeError: 'tuple' object has no attribute 'find'
I guess you'll find that you pass a tuple instead of a string.
More information about the Python-list
mailing list