![]() |
#1 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 608
Karma: 85520
Join Date: May 2021
Device: kindle
|
Viewer has problems when reading fetched news epubs
I keep getting these errors (screenshots attached) when moving on to the next article/chapter in the fetched news epub, viewer gets stuck here & I'd have to close the viewer and reopen file.
"it may have been moved, edited or deleted" error happens a lot. Last edited by unkn0wn; 11-08-2022 at 09:11 AM. |
![]() |
![]() |
![]() |
#2 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,251
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
There is likely some mess in the html the recipe downloads open it in the editor to check. It can be cleaned up by removing <script> tags or using preprocess_regexps depending on the exact problem. Which recipe is this?
|
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 608
Karma: 85520
Join Date: May 2021
Device: kindle
|
The Hindu. (I saw this happen with other recipes too .. live mint!)
I'll add dict(name='script') to remove_tags and check. Or should I .extract() it in preprocess html? Last edited by unkn0wn; 11-09-2022 at 12:09 AM. |
![]() |
![]() |
![]() |
#4 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,251
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
script tags are already auto-removed unless you have remove_javascript = False most likely you will need to use prepocess_regexps
|
![]() |
![]() |
![]() |
#5 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 608
Karma: 85520
Join Date: May 2021
Device: kindle
|
Okay. i'll check it in editor, if I come across this problem again, maybe also fix these recipes.
|
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Member
![]() Posts: 13
Karma: 10
Join Date: May 2025
Device: sony PRS T3
|
I have this problem. But I dont think it is a recipe related problem because if I rename the file (i.e., from file1.epub to file2.epub) the calibre-viewer works properly (al least for the problematic article, it could fail for others articles).
Using the Inspector (CTRL+I), I have realized that, for the problematic article, the navigation bar looks like: ... <div class="calibre_navbar"> | <a href="../article_22/index_u146.html">Next</a> | <a href="javascript:void(0)" data-qkhw5mephqnk3z8xyjxwfc="{"name": "feed_0/index_u231.html", "frag": "article_21"} ... But for file2.epub (viewer working correctly), the navigation bar is: ... <div class="calibre_navbar"> | <a href="javascript:void(0)" data-7fzo7bdftcnicvpkgwp84f="{"name": "feed_0/article_22/index_u146.html", "frag": ""}">Next</a> | <a href="javascript:void(0)" data-7fzo7bdftcnicvpkgwp84f="{"name": "feed_0/index_u231.html", "frag": "article_21"} ... |
![]() |
![]() |
![]() |
#7 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,251
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
You cant use the inspector for this, it shows you HTML post it being processed by the viewer.
|
![]() |
![]() |
![]() |
#8 |
Member
![]() Posts: 13
Karma: 10
Join Date: May 2025
Device: sony PRS T3
|
Thanks Kovid.
But, maybe, I didnt explained correctly. Let me clarify. I'm using Windows 10 and Calibre 8.3.0. I have prepared a simple recipe (HelloWorld.recipe). As you can see, it creates an epub file containing 20 feeds. Each feed contains 50 articles, all of them identical and fetching a quite simple and local html file (HelloWorld.html). When I open the epub file using calibre-viewer, it fails for feed-1 (article-20) and feed-3 (article-17 and article-22). The failure appears to be random: not related to the recipe neither to the html file. If I rename HelloWorld.epub to HelloWorld-2.epub (not a new generation, only changing the name), the calibre-viewer fail again, but for different articles: feed-0 (article-27), feed-1 (article-14 and article-45) and feed-2 (article-47) It seems to me that calibre-viewer generates a different cache information, for the same physical epub file, because the name has changed. The only clue I can provide is the abovementioned: for the failed articles, the inspector displays '<a href="../article_xx/index_uyyy.html"' instead of '<a href="javascript:void(0)"' Please, find attached files (HelloWorld.recipe, HelloWorld.html and HelloWorld.epub). |
![]() |
![]() |
![]() |
#9 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,251
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Is it happening reliably for you? I tried opening your file in the viewer and scrolled to the whole thing got no failures. Unfortunately my windows computer just died a couple of days so I only tested on LInux, but shouldnt make any difference. Does it happen if you reboot in safe mode?
|
![]() |
![]() |
![]() |
#10 |
Bibliophagist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,292
Karma: 168808723
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
For what it may be worth, I scrolled through the epub twice on my Windows computer (Windows 11, version 24H2 (OS Build 26100.3915), calibre 8.3.100 running from source). No errors occurred.
|
![]() |
![]() |
![]() |
#11 |
Member
![]() Posts: 13
Karma: 10
Join Date: May 2025
Device: sony PRS T3
|
I should clarify that there is not problem when navigating using the scroll bar.
The problem appears when clicking in "Next" button in top navigation bar. |
![]() |
![]() |
![]() |
#12 |
Member
![]() Posts: 13
Karma: 10
Join Date: May 2025
Device: sony PRS T3
|
I have started in safe mode and the results were the same when using the previous names (HelloWorld.epub and Helloworld2.epub): calibre-viewer failed for the same articles.
That is what I expected because I guess the viewer use in safe mode the cache previously generated in normal mode. So, I renamed the file (in safe mode) to Helloworld3.epub and the results were similar to normal mode: the viewer failed for feed-0 (article-43), feed-1 (article-34) and feed-3 (article-18 and article-32). I have checked for realistic recipes and the failure rate is similar: about 2% or 3% of the articles in the epub file are wrong (the "next" button fail and, as unkn0wn mentioned above in his first post, the viewer gets stuck and you have to close the viewer and reopen file) Please find attached cache files for HelloWorld, HelloWorld2 and HelloWorld3, in case you think they are useful. |
![]() |
![]() |
![]() |
#13 |
Bibliophagist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,292
Karma: 168808723
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
Tried clicking on Siguiente and got a screenful of code at random intervals. I've attached an image of the screen.
|
![]() |
![]() |
![]() |
#14 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,251
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
OK then I will take a look at it when I have a moment.
|
![]() |
![]() |
![]() |
#15 |
Member
![]() Posts: 13
Karma: 10
Join Date: May 2025
Device: sony PRS T3
|
Thank you, Kovid!
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
which is most popular and most fetched news? | darrenma | Recipes | 4 | 06-25-2021 09:15 AM |
Fetched news only shows 10 articles | kemala.ang | Recipes | 3 | 01-30-2020 05:32 AM |
Regarding Tag of fetched news | say2alok | Recipes | 1 | 12-13-2014 09:29 PM |
Only send fetched news to Dropbox | Shack70 | Library Management | 0 | 03-25-2012 08:11 PM |
Table of Contents in News Fetched | fab4.ilam | Calibre | 0 | 09-24-2011 02:10 AM |