469,913 Members | 2,683 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,913 developers. It's quick & easy.

Help! Identical code doesn't work in Wing IDE but does in Komodo.

I create a new Python file with the following using Wing IDE.

import feedparser
d = feedparser.parse("http://feedparser.org/docs/examples/atom10.xml")
print d.feed.title

I get this error when I debug.

AssertionError:

Traceback (innermost last):

File "c:\Documents and Settings\abc\Application Data\Wing IDE
2\untitled-1.py", line 1, in ?
import feedparser
File "c:\Documents and Settings\abc\Application Data\Wing IDE
2\untitled-1.py", line 2, in ?
d =
feedparser.parse("http://feedparser.org/docs/examples/atom10.xml")
File "C:\Python24\Lib\feedparser.py", line 2611, in parse
saxparser.parse(source)
File "C:\Python24\Lib\xml\sax\expatreader.py", line 107, in parse
xmlreader.IncrementalParser.parse(self, source)
File "C:\Python24\Lib\xml\sax\xmlreader.py", line 123, in parse
self.feed(buffer)
File "C:\Python24\Lib\xml\sax\expatreader.py", line 207, in feed
self._parser.Parse(data, isFinal)
File "C:\Python24\Lib\xml\sax\expatreader.py", line 639, in EndElement
File "C:\Python24\Lib\xml\sax\expatreader.py", line 348, in
end_element_ns
self._cont_handler.endElementNS(pair, None)
File "C:\Python24\Lib\feedparser.py", line 1403, in endElementNS
self.unknown_endtag(localname)
File "C:\Python24\Lib\feedparser.py", line 476, in unknown_endtag
method()
File "C:\Python24\Lib\feedparser.py", line 1193, in _end_title
value = self.popContent('title')
File "C:\Python24\Lib\feedparser.py", line 700, in popContent
value = self.pop(tag)
File "C:\Python24\Lib\feedparser.py", line 685, in pop
contentparams = copy.deepcopy(self.contentparams)
File "C:\Python24\Lib\copy.py", line 193, in deepcopy
rv = reductor(2)
File "C:\Python24\Lib\feedparser.py", line 233, in __getattr__
assert not key.startswith('_')

With the exact same line of code in Komodo I get the correct output
which is "Sample Feed"

Any idea what's wrong?

Apr 20 '06 #1
4 1731
With the exact same line of code in Komodo I get the correct output
which is "Sample Feed"

Any idea what's wrong?


My guess would be different PYTHONPATHs. Try this on each:
import sys
print sys.path


They might even be using different python versions - but both of these
are just guesses.

Luke

Apr 20 '06 #2

fyleow wrote:
I create a new Python file with the following using Wing IDE.

import feedparser
d = feedparser.parse("http://feedparser.org/docs/examples/atom10.xml")
print d.feed.title

I get this error when I debug.

AssertionError:

Traceback (innermost last):

File "c:\Documents and Settings\abc\Application Data\Wing IDE
2\untitled-1.py", line 1, in ?
import feedparser
File "c:\Documents and Settings\abc\Application Data\Wing IDE
2\untitled-1.py", line 2, in ?
d =
feedparser.parse("http://feedparser.org/docs/examples/atom10.xml")
File "C:\Python24\Lib\feedparser.py", line 2611, in parse
saxparser.parse(source)
[snip]

The traceback is wierd. It states that the first line of untitle-1.py
is calling the second line of the same file. That doesn't make sense.
Any idea what's wrong?


Seems like it's an IDE specific bug.

Apr 20 '06 #3
On 20/04/2006 5:54 PM, fyleow wrote:
I create a new Python file with the following using Wing IDE.

import feedparser
d = feedparser.parse("http://feedparser.org/docs/examples/atom10.xml")
print d.feed.title

I get this error when I debug.
[snip]
With the exact same line of code in Komodo I get the correct output
which is "Sample Feed"


Two IDEs? Sounds like IDEitis to me. Presuming that you have a
command-line interpreter supplied with your OS: fire it up, type in
"python", type those 3 lines in, see what happens ... I'm betting that
Serge's supposition is correct.
Apr 20 '06 #4
Not sure if this would cause it, but I also have both Wing and Komodo,
and when I search for files named FeedParser, I get this:

c:/Documents and Settings\Richard Dooling\Local Settings\Application
Data\Wing IDE 2\cache\analysis\C\Python24\lib\email\FeedParser.p y.ether

c:/Program Files\ActiveState Komodo
3.5\lib\python\Lib\email\FeedParser.py

c:/Python24\Lib\email\FeedParser.py

Maybe you need to investigate and see if those versions are all the
same? Then check and see which one is running at any given time?

rick

"My mother buried three husbands, and two of them were just napping."
--Rita Rudner

Apr 20 '06 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

10 posts views Thread by Jacek Generowicz | last post: by
9 posts views Thread by Tom | last post: by
4 posts views Thread by Sarir Khamsi | last post: by
2 posts views Thread by Sudheer Kareem | last post: by
6 posts views Thread by wukexin | last post: by
3 posts views Thread by Colin J. Williams | last post: by
2 posts views Thread by John Baker | last post: by
1 post views Thread by Waqarahmed | last post: by
reply views Thread by Salome Sato | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.