[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Straw-devel] Image Bug
From: |
Scott Douglas-Watson |
Subject: |
[Straw-devel] Image Bug |
Date: |
Mon, 27 Oct 2003 15:46:54 +0000 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4.1) Gecko/20031008 |
Hi
Just some thoughts on the image bug I was getting this morning (and
still getting). The url I'm am entering into the subscribe dialog is
gotdotnet.com and the exception log is as follows:
src/lib/SummaryParserMP.py:123:parse: u"Exception Occurred: 'NoneType'
object has no attribute 'replace'"
src/lib/SummaryParserMP.py:123:parse: u"Exception Occurred: junk
characters in start tag: u'@microsoft.com \\nhref', at line 37, column 37"
src/lib/ImageCache.py:36:add_refer: something went wrong: only supports
HTTP requests
File "/usr/bin/straw", line 34, in ?
s.mainloop()
File "src/lib/Main.py", line 319, in mainloop
gtk.main()
File "src/lib/SubscribeDialog.py", line 175, in location_page_forward
self._found_feeds = self.find_site(url)
File "src/lib/SubscribeDialog.py", line 298, in find_site
ps = self.parse_feed(data, feed)
File "src/lib/SubscribeDialog.py", line 257, in parse_feed
parsed = straw.SummaryParserMP().parse(data, feed)
File "src/lib/SummaryParserMP.py", line 120, in parse
item.add_image(i)
File "src/lib/SummaryItem.py", line 51, in add_image
self._add_image(image_name, restore = False)
File "src/lib/SummaryItem.py", line 47, in _add_image
straw.ImageCache.cache.add_refer(image_name, restore, self)
File "src/lib/ImageCache.py", line 36, in add_refer
logtb("something went wrong: ", str(e))
src/lib/SummaryParserMP.py:123:parse: u'Exception Occurred: only
supports HTTP requests'
Okay, the first two messages are from malformed html (See
SummaryParserMP.py lines 115 - 124 and bug #6139) these aren't causing a
problem they are just being logged.
Now for the actual exception. In one of the feeds the person references
a local file in the description (ie
href="file://somewhere/on/my/d/drive"). This causes an exception to be
raised in ConnectionManager.request() (URLFetch.py line 58) which I
think is fine, we just need to catch it again and handle it gracefully.
I think this should either be caught in ImageCache.py (see lines 24 -
37) or in SummaryItem.py (lines 46 - 49) and the image assigned to the
broken image. I'm not quite sure where would be best as I'm not really
familar with how the ImageCache works and how images are being stored
and referenced etc.
Hope this helps.
Scott
- [Straw-devel] Image Bug,
Scott Douglas-Watson <=