Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Devices

Notices

Reply
 
Thread Tools Search this Thread
Old 07-04-2016, 06:15 AM   #1
therapon
Junior Member
therapon began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Jul 2016
Device: none
Calibre and WINE

When I add books to Calibre in Kubuntu, for some it expects Wine stuff in my home directory. Since my Wine prefix is /home/myname/.wine/, Calibre doesn't find it, then adds dosdevices & drive_c folders along with registry files in /home/myname/ directory. Is there any way to tell Calibre to look in the right place for Wine?

Calibre 2.60
Kubuntu 14.04
therapon is offline   Reply With Quote
Old 07-04-2016, 09:34 AM   #2
itimpi
Wizard
itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.
 
Posts: 4,552
Karma: 950151
Join Date: Nov 2008
Device: Sony PRS-950, iphone/ipad (Marvin/iBooks/QuickReader)
There should be no reason why Calibre expects WINE. Are you sure you did not install the Windows version of Calibre?
itimpi is offline   Reply With Quote
Advert
Old 07-04-2016, 01:28 PM   #3
therapon
Junior Member
therapon began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Jul 2016
Device: none
Only if this series of commands installs a windows version:

sudo -v && wget -nv -O- https://raw.githubusercontent.com/ko...x-installer.py | sudo python -c "import sys; main=lambda:sys.stderr.write('Download failed\n'); exec(sys.stdin.read()); main()"
therapon is offline   Reply With Quote
Old 07-04-2016, 01:41 PM   #4
gbm
Wizard
gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.
 
Posts: 2,082
Karma: 8796704
Join Date: Jun 2010
Device: Kobo Clara HD,Hisence Sero 7 Pro RIP, Nook STR, jetbook lite
Quote:
Originally Posted by therapon View Post
Only if this series of commands installs a windows version:

sudo -v && wget -nv -O- https://raw.githubusercontent.com/ko...x-installer.py | sudo python -c "import sys; main=lambda:sys.stderr.write('Download failed\n'); exec(sys.stdin.read()); main()"
Try using this:

Code:
sudo -v && wget -nv -O- https://raw.githubusercontent.com/kovidgoyal/calibre/master/setup/linux-installer.py | sudo python -c "import sys; main=lambda x:sys.stderr.write('Download failed\n'); exec(sys.stdin.read()); main('/opt')"
bernie
gbm is offline   Reply With Quote
Old 07-04-2016, 02:58 PM   #5
therapon
Junior Member
therapon began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Jul 2016
Device: none
Thanks, I uninstalled then reinstalled using the command you supplied. That seems to have fixed the issue.

Two questions:
1. I see the difference in the commands - "main=lambda:sys.stderr.write" vs "main=lambda x:sys.stderr.write". What is the significance of the change?

2. Will the supplied command for Binary Install on the calibre download page be changed? Or should I plan to keep using the one you supplied for updates?
therapon is offline   Reply With Quote
Advert
Old 07-04-2016, 03:20 PM   #6
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,422
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
A lambda creates an anonymous function, and needs to know how many arguments to consume in case the installation script fails to download.

It is the difference between printing:
Code:
2016-07-04 15:11:16 ERROR 404: Not Found.
Traceback (most recent call last):
  File "<string>", line 1, in <module>
TypeError: <lambda>() takes 0 positional arguments but 1 was given
and:
Code:
2016-07-04 15:10:39 ERROR 404: Not Found.
Download failed

tl;dr How many arguments did you pass into:
main()
main('/opt')
main('/opt', True)
eschwartz is offline   Reply With Quote
Old 07-04-2016, 03:49 PM   #7
gbm
Wizard
gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.
 
Posts: 2,082
Karma: 8796704
Join Date: Jun 2010
Device: Kobo Clara HD,Hisence Sero 7 Pro RIP, Nook STR, jetbook lite
Quote:
Originally Posted by therapon View Post
Thanks, I uninstalled then reinstalled using the command you supplied. That seems to have fixed the issue.

Two questions:
1. I see the difference in the commands - "main=lambda:sys.stderr.write" vs "main=lambda x:sys.stderr.write". What is the significance of the change?

2. Will the supplied command for Binary Install on the calibre download page be changed? Or should I plan to keep using the one you supplied for updates?
Quote:
Originally Posted by eschwartz View Post
A lambda creates an anonymous function, and needs to know how many arguments to consume in case the installation script fails to download.

It is the difference between printing:
Code:
2016-07-04 15:11:16 ERROR 404: Not Found.
Traceback (most recent call last):
  File "<string>", line 1, in <module>
TypeError: <lambda>() takes 0 positional arguments but 1 was given
and:
Code:
2016-07-04 15:10:39 ERROR 404: Not Found.
Download failed

tl;dr How many arguments did you pass into:
main()
main('/opt')
main('/opt', True)
What eschwartz said about lambda, the problem I suspect is not in the downloader but something to do with your system. I think your system was not parsing the main command correctly to put calibre in /opt. All we did was use the downloader that lets you change the directory calibre gets installed to. It is the second one listed under Notes on the calibre Linux page.

What version of Kubuntu are you using?

bernie

P.S.
Did calibre work?
gbm is offline   Reply With Quote
Old 07-04-2016, 05:09 PM   #8
therapon
Junior Member
therapon began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Jul 2016
Device: none
Yes, installing with the second command worked. You are correct, the first command did not put it in /opt but the second one did. I'm using Kubuntu 14.04.4
therapon is offline   Reply With Quote
Old 07-07-2016, 01:59 PM   #9
therapon
Junior Member
therapon began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Jul 2016
Device: none
Guess I spoke too quickly :-( Once again Calibre thought it needed to create WINE folders and files. This time it occurred (maybe always, I'm not sure) when I imported a PDF into Calibre. EPUB's and AZW3's seem to import fine. So... I'm still not sure what's going on.
therapon is offline   Reply With Quote
Old 07-07-2016, 02:40 PM   #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,422
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
Do you have any plugins installed, and if so, which ones?

Particularly, filetype plugins (which operate during the importation of books).

...

calibre itself certainly doesn't invoke WINE at any time (unless you run calibre from WINE for some strange reason) but thirdparty plugins can do whatever they want.
eschwartz is offline   Reply With Quote
Old 07-07-2016, 03:51 PM   #11
PeterT
Grand Sorcerer
PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.
 
PeterT's Avatar
 
Posts: 12,166
Karma: 73448616
Join Date: Nov 2007
Location: Toronto
Device: Nexus 7, Clara, Touch, Tolino EPOS
Might also be worth while running calibre in debug mode and posting the resulting log file.
PeterT is offline   Reply With Quote
Old 07-07-2016, 10:17 PM   #12
therapon
Junior Member
therapon began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Jul 2016
Device: none
Thanks for the suggestions eschwartz and PeterT. It is one of the filetype plugins that requires windows to run a python script. Guess I'll have to bug the author of the plugin to fix it.

Last edited by therapon; 07-07-2016 at 10:37 PM.
therapon is offline   Reply With Quote
Old 07-07-2016, 10:33 PM   #13
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,422
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
Hmm, now that I think about it, the DeDRM plugin (which uses WINE to decrypt EPUB/PDF via Adobe Digital Editions) is probably responsible.

It is probably calling WINE in order to attempt to run the key extraction code.

But in that case, it should be triggering on EPUBs as well.

...

AFAIK, the plugin tries DeDRMing all imported AZW*/EPUB/PDF whether they need it or not.
eschwartz is offline   Reply With Quote
Old 07-08-2016, 08:04 AM   #14
therapon
Junior Member
therapon began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Jul 2016
Device: none
Yup, you are correct eschwartz. Setting the WINEPREFIX in the plugin config seems to have remedied the problem. It would be nice, though, if it would use the linux version of ActiveState instead of requiring the Win version. Oh well
therapon is offline   Reply With Quote
Old 07-08-2016, 09:46 AM   #15
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,422
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
No, it has to run within WINE in order to use the Windows/WINE environment to scrape information from the Windows programs in question and/or config/registry info.

I mean, how else do you expect to use a Windows program (the Windows version of the DeDRM internals) on Linux?
eschwartz is offline   Reply With Quote
Reply

Tags
import, linux, wine


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Wine with updated Calibre and a shared data partition oakridge Devices 4 04-30-2015 04:56 PM
Calibre using wine And Devices 2 06-24-2011 05:55 PM
Calibre in Wine EvilWayz Calibre 8 05-23-2011 08:35 PM
Calibre on Linux, ADE on Windows/WINE - how do I manage? Beetle B. Calibre 4 11-28-2010 03:35 PM
Calibre on Linux under Wine tulsa Calibre 7 03-24-2010 05:17 AM


All times are GMT -4. The time now is 07:25 PM.


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