Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 05-15-2015, 12:22 PM   #1
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 7,216
Karma: 11044355
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Ebook-viewer: fail when opening an ePub from Firefox

I have recently upgraded both calibre and firefox, so I'm not sure where the problem is.

If I try to open an epub file from firefox, by clicking on a link (any book in the MR library) and then selecting ebook-viewer as the application to open the file with, I get this error:

Code:
calibre, version 2.28.0
ERROR: Could not open ebook: [Errno 5] Input/output error

Traceback (most recent call last):
  File "site-packages/calibre/gui2/viewer/main.py", line 37, in run
  File "threading.py", line 763, in run
  File "site-packages/calibre/ebooks/oeb/iterator/book.py", line 100, in __enter__
  File "site-packages/calibre/customize/conversion.py", line 241, in __call__
  File "site-packages/calibre/ebooks/conversion/plugins/epub_input.py", line 228, in convert
  File "site-packages/calibre/ebooks/conversion/plugins/epub_input.py", line 105, in rationalize_cover
  File "site-packages/calibre/utils/logging.py", line 162, in __call__
  File "site-packages/calibre/utils/logging.py", line 154, in prints
  File "site-packages/calibre/utils/logging.py", line 45, in prints
  File "site-packages/calibre/__init__.py", line 227, in prints
IOError: [Errno 5] Input/output error
If I save the file instead, then I can open it with no problem. Also, this worked fine before the mentioned upgrades, and it works with other file types.
Jellby is offline   Reply With Quote
Old 05-15-2015, 04:26 PM   #2
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,371
Karma: 83238497
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
Works fine for me, on linux.
eschwartz is offline   Reply With Quote
Advert
Old 05-15-2015, 05:42 PM   #3
Glorfindel
Force-Aware Elf
Glorfindel ought to be getting tired of karma fortunes by now.Glorfindel ought to be getting tired of karma fortunes by now.Glorfindel ought to be getting tired of karma fortunes by now.Glorfindel ought to be getting tired of karma fortunes by now.Glorfindel ought to be getting tired of karma fortunes by now.Glorfindel ought to be getting tired of karma fortunes by now.Glorfindel ought to be getting tired of karma fortunes by now.Glorfindel ought to be getting tired of karma fortunes by now.Glorfindel ought to be getting tired of karma fortunes by now.Glorfindel ought to be getting tired of karma fortunes by now.Glorfindel ought to be getting tired of karma fortunes by now.
 
Glorfindel's Avatar
 
Posts: 4,752
Karma: 11557898
Join Date: Feb 2014
Location: Valinor
Device: Kindle 4 w/SO
Sounds like a problem with ff. Are you selecting 'download' and then opening it from Firefox, or selecting 'open' and letting firefox do its thing?
Glorfindel is offline   Reply With Quote
Old 05-15-2015, 07:29 PM   #4
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 25,316
Karma: 34628615
Join Date: Aug 2009
Location: The Central Coast of California
Device: K4NT(Fixed,New Bat.), Galaxy Tab A, Kobo Aura2
FF has 2 EPUB Options: Application Types, you might reset them to Ask

I just had Calibre Viewer open https://www.mobileread.com/forums/sho...d.php?t=181085
theducks is online now   Reply With Quote
Old 05-15-2015, 07:41 PM   #5
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,371
Karma: 83238497
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
FF has no options by default, it derives them from the OS associations. (Or not, as the case may be. They don't seem to have heard of freedesktop.org which means linux FF-open-with is a godawful mess.)
eschwartz is offline   Reply With Quote
Advert
Old 05-15-2015, 08:49 PM   #6
BetterRed
null operator
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 16,322
Karma: 19147306
Join Date: Mar 2012
Location: Sydney Australia
Device: none
@Jellby - I use a gadget called Flashgot, when I click on a book here I get this

Click image for larger version

Name:	Capture.JPG
Views:	129
Size:	33.3 KB
ID:	138344

The top option will open book in calibre-veiwer because that's my Windows default for EPUBS. I have this in Options :

Click image for larger version

Name:	Capture2.JPG
Views:	113
Size:	58.1 KB
ID:	138345

A while back I had lots of problems with document downloads in firefox (pdf, epub, doc, xls etc) - so much so that I used chrome to do those downloads for while. I can't recall if it was resolved by: creating a fresh profile, reinstalling firefox, or reinstalling windows (because I got an SSD).

I'm using Win 7 Pro fully up to date, Firefox 38.0.1, and calibre 2.28 [64 bit]

BR

I use Flashgot because it offers the three pathways you see, importantly to Free (standing) Download Manager, I use it to download chunky things like software, iso's etc - then I can crash/trash the browser without interrupting the downloads.

Last edited by BetterRed; 05-15-2015 at 08:57 PM. Reason: grammar
BetterRed is offline   Reply With Quote
Old 05-15-2015, 08:56 PM   #7
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 37,288
Karma: 16447605
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
That indicates that firefox is not providing a working stdout/stderr to the process it launches. All the calibre gui tools require working stdout/stderr. You can pass the --detach argument to them to have them auto-redirect to /dev/null

So use

ebook-viewer --detach file.epub

Presumably, firefox simply passes the file handles it gets to its child processes, so your real question is why does firefox not have working stdout itself.
kovidgoyal is offline   Reply With Quote
Old 05-16-2015, 02:48 AM   #8
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 7,216
Karma: 11044355
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Quote:
Originally Posted by eschwartz View Post
Works fine for me, on linux.
Linux here too. Kubuntu 14.04. Firefox 38.0

Quote:
Originally Posted by Glorfindel View Post
Sounds like a problem with ff. Are you selecting 'download' and then opening it from Firefox, or selecting 'open' and letting firefox do its thing?
I select "open", with a hand-picked program (it defaults to calibre, I have to search for /usr/bin/ebook-viewer, it usually sticks, but sometimes it defaults back to calibre, which is another annoyance).

Quote:
Originally Posted by kovidgoyal View Post
So use

ebook-viewer --detach file.epub
If I only knew how... With this damned firefox I don't see a way to specify the command line, I can't even find what the default for epub is, unless I know it's called "documento de libro electrónico".

Quote:
so your real question is why does firefox not have working stdout itself.
Ah... I may have an idea for that... but I have to restart firefox (which I had already done before), so I'll post this and come back.

I'm back, and it's fixed. So, it turns out I had started firefox from a terminal (to debug some other problem), but had closed the terminal. Since then, I had restarted firefox several times, but always from firefox itself (disabling/enabling some plugin and clicking on restart now), so it seems firefox remained in a no-valid-stdout state. Now I have closed it and opened it again from the desktop icon, and opening books works fine.

Now the question(s): Why did it work with an AZW3 file? And could the ebook-viewer application switch to "detached" mode automatically if no stdout is found, so that this doesn't happen again?

Last edited by Jellby; 05-16-2015 at 03:00 AM.
Jellby is offline   Reply With Quote
Old 05-16-2015, 03:58 AM   #9
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 37,288
Karma: 16447605
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
It will work until it tries to write enough to stdout to overflow the buffer. And there is no reliable way to detect "no stdout".
kovidgoyal is offline   Reply With Quote
Old 05-17-2015, 12:41 AM   #10
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,371
Karma: 83238497
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
for Firefox bug 296443 (a/k/a freedesktop specs? what are those?). Maybe when this is fixed so FF actually sees filetype associations, it will use the .desktop file complete with command-line parameters.

Or try mucking around with the FF profile. I think Open With is specified in mimetypes.rdf
eschwartz is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Can I use the ebook viewer without opening Calibre database? iridius Library Management 41 06-26-2018 08:24 PM
Having difficulty opening EPUB file with E-book Viewer directly swampwiz Library Management 13 09-08-2014 12:58 PM
Create MediaWiki and RTF links for opening an ePub file with Calibre viewer johnsidi Calibre 1 12-17-2011 01:31 PM
[old-topic]ebook-viewer: Open source, crossplatform viewer for EPUB, LIT, MOBI, etc kovidgoyal Calibre 68 05-30-2011 08:46 PM
EPUB Reader: Opening a big file (27 MB) takes 4.5 minutes on Firefox zdavatz EPUBReader 5 02-19-2010 02:36 AM


All times are GMT -4. The time now is 02:37 PM.


MobileRead.com is a privately owned, operated and funded community.