Bug 868108 - Calibre: feedparse.py is an empty file
Summary: Calibre: feedparse.py is an empty file
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: calibre
Version: 17
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Kevin Fenzi
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-10-19 05:01 UTC by Claudio Saavedra
Modified: 2012-12-15 18:01 UTC (History)
8 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2012-11-23 08:14:49 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Claudio Saavedra 2012-10-19 05:01:47 UTC
Calibre gives this error when trying to fetch news:

Traceback (most recent call last):
  File "/usr/lib64/calibre/calibre/web/feeds/news.py", line 1462, in parse_feeds
    get_article_url=self.get_article_url))
  File "/usr/lib64/calibre/calibre/web/feeds/__init__.py", line 320, in feed_from_xml
    from feedparser import parse
ImportError: cannot import name parse

However, this module is installed:

[claudio@localhost ~]$ python 
Python 2.7.3 (default, Jul 24 2012, 10:05:38) 
[GCC 4.7.0 20120507 (Red Hat 4.7.0-5)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from feedparser import parse
>>> 

[claudio@localhost ~]$ rpm -qa | grep feedparser
python-feedparser-5.1.2-2.fc17.noarch
python3-feedparser-5.1.2-2.fc17.noarch
[claudio@localhost ~]$ rpm -qa | grep calibre
calibre-0.9.1-1.fc17.x86_64

Comment 1 Kevin Fenzi 2012-10-19 20:01:26 UTC
Strange. 

I'll see if I can duplicate here...

Comment 2 Claudio Saavedra 2012-10-23 03:50:20 UTC
I've noticed that the "fetch news" feature works for some sources, like The Guardian. But I don't know whether that's because for this it doesn't use the feedparser. An example of one that fails is "Chile -> El Mostrador."

Hope this helps.

Comment 3 Gerhard Stenzel 2012-10-25 09:12:05 UTC
FWIW .. at least in my system the latest calibre RPM is faulty.

# ls -l /usr/lib64/calibre/calibre/web/feeds/feedparser.py
-rw-r--r-- 1 root root   0 Oct  6 19:45 /usr/lib64/calibre/calibre/web/feeds/feedparser.py

Note the "0"

One of many workarounds:

# yumdownloader --source calibre
# rpm -ivh calibre-0.9.1-1.fc17.src.rpm
# rpmbuild -ba ~/rpmbuild/SPECS/calibre.spec

Installed required devel rpms and repeat previous stop

# cp ~/rpmbuild/BUILD/calibre/src/calibre/web/feeds/feedparser.py.unbundle-feedparser /usr/lib64/calibre/calibre/web/feeds/feedparser.py

Try again to fetch news .. above worked for me

Comment 4 Claudio Saavedra 2012-10-25 20:32:14 UTC
Yes, that seems to be the problem. feedparser.py is an empty file.

Comment 5 Claudio Saavedra 2012-10-25 20:38:05 UTC
Then again, I think calibre is trying to use the system-installed feedparser (which is installed for me). For whatever reason is not finding it (python path issues?).

Comment 6 Kevin Fenzi 2012-10-30 23:16:54 UTC
Sorry for the delay here... I was off traveling. ;( 

If folks seeing this could try: 

install the fedora calibre package
rm -f /usr/lib*/calibre/calibre/web/feeds/feedparser.*

then run it and see if you can duplicate the crash. 

I'm wondering if the 0 length file is causing it problems...

Comment 7 Pete Travis 2012-10-31 03:51:44 UTC
Removing the feedparser packaged with calibre, as in comment #6, resolved this for me.

Comment 8 Fedora Update System 2012-10-31 04:57:57 UTC
calibre-0.9.4-1.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/calibre-0.9.4-1.fc18

Comment 9 Fedora Update System 2012-10-31 05:13:29 UTC
calibre-0.9.4-1.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/calibre-0.9.4-1.fc17

Comment 10 Fedora Update System 2012-10-31 18:12:45 UTC
Package calibre-0.9.4-1.fc18:
* should fix your issue,
* was pushed to the Fedora 18 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing calibre-0.9.4-1.fc18'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-17364/calibre-0.9.4-1.fc18
then log in and leave karma (feedback).

Comment 11 Martin Tarenskeen 2012-11-13 07:43:00 UTC
I'm still having problems related, I think, to this issue.
I have calibre-0.9.5-2.fc17 installed.
When I try to fetch news my system does not crash. That's the good news. The bad news is that when I open the fetched news to read it, I only see (almost) empty pages saying something like 

"Failed feed: Nieuws
No module named feedparser"

I have python-feedparser-5.1.2-2.fc17 installed however, but calibre can't find it?

Comment 12 Martin Tarenskeen 2012-11-13 07:55:39 UTC
(In reply to comment #11)

> No module named feedparser"
> 
> I have python-feedparser-5.1.2-2.fc17 installed however, but calibre can't
> find it?

As a temporary fix I did

sudo cp /usr/lib/python27/site-packages/feedparser.py* /usr/lib/calibre/calibre/web/feeds/

and this works. So it indeed seems calibre is not finding feedparser

Comment 13 Kevin Fenzi 2012-11-15 20:27:27 UTC
Martin: If you 'rm -f /usr/lib/calibre/calibre/web/feeds/feedparser*' you get the 'no module' error?

Are you sure you restarted calibre after upgrading?

Comment 14 Martin Tarenskeen 2012-11-15 22:29:46 UTC
I don't think it will make much difference to do 'rm -f /usr/lib/calibre/calibre/web/feeds/feedparser*'. These files are already removed in calibre-0.9.5-2.fc15.rpm

But yes, still "no module named named feedparser".

Comment 15 Kevin Fenzi 2012-11-18 19:28:05 UTC
ok, can you try this scratch build and see if it works correctly for you?

http://koji.fedoraproject.org/koji/taskinfo?taskID=4701207

Comment 16 Martin Tarenskeen 2012-11-18 20:09:31 UTC
(In reply to comment #15)
> ok, can you try this scratch build and see if it works correctly for you?
> 
> http://koji.fedoraproject.org/koji/taskinfo?taskID=4701207

This one seems to be working fine. Feeds are fetched as expected. Thank you.

Comment 17 Kevin Fenzi 2012-11-18 20:46:19 UTC
Excellent. Thanks for your testing (and patience). 

New updates on the way...

Comment 18 Fedora Update System 2012-11-18 20:50:09 UTC
calibre-0.9.6-2.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/calibre-0.9.6-2.fc18

Comment 19 Fedora Update System 2012-11-18 21:04:41 UTC
calibre-0.9.6-2.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/calibre-0.9.6-2.fc17

Comment 20 Fedora Update System 2012-11-23 08:14:51 UTC
calibre-0.9.6-2.fc18 has been pushed to the Fedora 18 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 21 Fedora Update System 2012-12-15 18:01:01 UTC
calibre-0.9.6-2.fc17 has been pushed to the Fedora 17 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.