| 
			
			 | 
		#1 | 
| 
			
			
			
			 frumious Bandersnatch 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,570 
				Karma: 20150435 
				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  | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#2 | 
| 
			
			
			
			 Ex-Helpdesk Junkie 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 19,421 
				Karma: 85400180 
				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.
		 
		
	
		
		
		
		
		
		
		
		
		
		
	
	 | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#3 | 
| 
			
			
			
			 Force-Aware Elf 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,762 
				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?
		 
		
	
		
		
		
		
		
		
		
		
		
		
	
	 | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#4 | 
| 
			
			
			
			 Well trained by Cats 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 31,267 
				Karma: 61916422 
				Join Date: Aug 2009 
				Location: The Central Coast of California 
				
				
				Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A 
				
				
				 | 
	
	
	
		
		
		
		
		 
			
			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  | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#5 | 
| 
			
			
			
			 Ex-Helpdesk Junkie 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 19,421 
				Karma: 85400180 
				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.)
		 
		
	
		
		
		
		
		
		
		
		
		
		
	
	 | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#6 | 
| 
			
			
			
			 null operator (he/him) 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 22,018 
				Karma: 30277294 
				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 
		
	
		
		
			The top option will open book in calibre-veiwer because that's my Windows default for EPUBS. I have this in Options : 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 09:57 PM. Reason: grammar  | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#7 | 
| 
			
			
			
			 creator of calibre 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,609 
				Karma: 28549044 
				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.  | 
| 
		
 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#8 | ||
| 
			
			
			
			 frumious Bandersnatch 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,570 
				Karma: 20150435 
				Join Date: Jan 2008 
				Location: Spaniard in Sweden 
				
				
				Device: Cybook Orizon, Kobo Aura 
				
				
				 | 
	
	
	
		
		
		
		
		 
			
			Linux here too. Kubuntu 14.04. Firefox 38.0 
		
	
		
		
		
		
		
		
		
		
		
		
		
			Quote: 
	
 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: 
	
 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 04:00 AM.  | 
||
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#9 | 
| 
			
			
			
			 creator of calibre 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,609 
				Karma: 28549044 
				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".
		 
		
	
		
		
		
		
		
		
		
		
		
		
	
	 | 
| 
		
 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#10 | 
| 
			
			
			
			 Ex-Helpdesk Junkie 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 19,421 
				Karma: 85400180 
				Join Date: Nov 2012 
				Location: The Beaten Path, USA, Roundworld, This Side of Infinity 
				
				
				Device: Kindle Touch fw5.3.7 (Wifi only) 
				
				
				 | 
	
	
	
		
		
		
		
		 Or try mucking around with the FF profile. I think Open With is specified in mimetypes.rdf  | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
![]()  | 
            
        
    
            
  | 
    
			 
			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 09:24 PM | 
| Having difficulty opening EPUB file with E-book Viewer directly | swampwiz | Library Management | 13 | 09-08-2014 01:58 PM | 
| Create MediaWiki and RTF links for opening an ePub file with Calibre viewer | johnsidi | Calibre | 1 | 12-17-2011 02:31 PM | 
| [old-topic]ebook-viewer: Open source, crossplatform viewer for EPUB, LIT, MOBI, etc | kovidgoyal | Calibre | 68 | 05-30-2011 09:46 PM | 
| EPUB Reader: Opening a big file (27 MB) takes 4.5 minutes on Firefox | zdavatz | EPUBReader | 5 | 02-19-2010 03:36 AM |