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

F

fyleow

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?
 
L

Luke Plant

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:

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

Luke
 
S

Serge Orlov

fyleow said:
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.
 
J

John Machin

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.
 
B

BartlebyScrivener

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.py.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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,012
Latest member
RoxanneDzm

Latest Threads

Top