02-17-2016, 05:19 PM | #1 |
Member
Posts: 15
Karma: 10
Join Date: Feb 2013
Device: none
|
Foreign Affairs recipe broken
Whenever I run the Foreign Affairs recipe, it generates the following error:
Spoiler:
Is there anyone that could shed some light on the issue or help repair the recipe? Thanks in advance! |
02-17-2016, 10:26 PM | #2 |
creator of calibre
Posts: 43,856
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
|
Advert | |
|
02-18-2016, 01:28 AM | #3 | |
Member
Posts: 15
Karma: 10
Join Date: Feb 2013
Device: none
|
Quote:
Thanks for the help! |
|
03-24-2016, 06:10 PM | #4 |
Junior Member
Posts: 1
Karma: 10
Join Date: Mar 2016
Device: kindle paperwhite
|
broken again
|
03-25-2016, 03:25 AM | #5 |
creator of calibre
Posts: 43,856
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Since that is a subscription based recipe, I will need your foreign affairs username and password, send them via PM and I will take a look.
|
Advert | |
|
04-16-2016, 05:57 AM | #6 |
Member
Posts: 15
Karma: 10
Join Date: Feb 2013
Device: none
|
|
04-17-2016, 12:20 AM | #7 |
creator of calibre
Posts: 43,856
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
|
04-19-2016, 03:30 PM | #8 |
Member
Posts: 15
Karma: 10
Join Date: Feb 2013
Device: none
|
Awesome, the recipe works now. Thanks!
|
05-06-2016, 01:12 PM | #9 |
World War II buff
Posts: 55
Karma: 32130
Join Date: Nov 2011
Location: Montreal, Quebec
Device: Kindle Oasis 3, Kobo Aura One
|
Seems the recipe is broken again. I get this:
Spoiler:
|
05-06-2016, 10:38 PM | #10 |
creator of calibre
Posts: 43,856
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Works for me. Make sure you are using the builtin recipe and not a custom one.
|
05-09-2016, 10:11 PM | #11 |
World War II buff
Posts: 55
Karma: 32130
Join Date: Nov 2011
Location: Montreal, Quebec
Device: Kindle Oasis 3, Kobo Aura One
|
Well, I'm mystified. I keep getting the same error log. I have uninstalled Calibre and reinstalled, started with a fresh library, but to no avail. The error log is still saying I am using a custome recipe, but I am not, I am using the standard one.
|
05-10-2016, 01:35 PM | #12 | |
Member
Posts: 15
Karma: 10
Join Date: Feb 2013
Device: none
|
Quote:
Are you sure you're using the correct password? Another option is logging in to your account at foreignaffairs.com with your browser - Calibre wouldn't download the recipe for me without logging in at first until a couple of years ago. |
|
07-13-2016, 08:20 AM | #13 |
Junior Member
Posts: 6
Karma: 10
Join Date: Jul 2016
Device: Kobo Touch
|
I recently subscribed to Foreign Affairs Mag ($12/year digital subscription). Updated Calibre to version 2.61.0 (which contains fixed FA recipe), but am unable to download magazine using the builtin recipe.
The error message is the same as quoted above. Spoiler:
Any ideas? |
07-13-2016, 12:49 PM | #14 |
World War II buff
Posts: 55
Karma: 32130
Join Date: Nov 2011
Location: Montreal, Quebec
Device: Kindle Oasis 3, Kobo Aura One
|
In a way I am glad that somebody else is getting the very same error that I get with the Foreign Affairs recipe...
Even with version 2.62, I still get the same error details I have been getting since my initial post in this thread. Exact same error as you have (see below). I am mystified since I am getting this error even with other PCs where I am starting with a clean, fresh copy of Calibre. I am not knowledgeable enough in Python to understand what's happening here. Spoiler:
|
07-13-2016, 03:42 PM | #15 |
Member
Posts: 16
Karma: 10
Join Date: Apr 2016
Device: Tolino Vision 3HD
|
I was able to reproduce your problem. The reason seems to be that the index page is just too big for BeautifulSoup (almost 300 kB). Therefore the soup returned by index_to_soup (line 52 of the foreignaffairs.recipe) is incomplete.
Looking at the implementation of index_to_soup in news.py I see that the initial download is successful (i.e. variable _raw contains the whole page as a string). It's the final conversion in line 682 which returns a broken data structure. I suspect that the capability of BeautifulSoup to handle such big pages depends on various parameters (operating system, 32 vs 64 bit, memory, etc.), so that not all users will experience this problem. Maybe Kovid has an idea for a workaround. I guess one could reimplement parse_index without using BeautifulSoup and instead rely on another library like html5lib. |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Foreign Affairs recipe for news from the site (not the magazine) | mendesitba | Recipes | 0 | 12-08-2015 09:14 PM |
Foreign Affairs recipe update | rainrdx | Recipes | 1 | 03-25-2013 06:06 PM |
Not Working: Foreign Affairs recipe | besianm | Recipes | 1 | 03-22-2013 10:37 PM |
Foreign Affairs-Free | tdonline | Recipes | 2 | 03-11-2012 09:51 PM |
Problem: Recipe for Foreign Affairs not fetching premium articles | besianm | Recipes | 1 | 03-07-2012 04:41 AM |