Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 01-21-2012, 02:55 AM   #1
Anthon
Junior Member
Anthon began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Oct 2011
Location: Braunschweig, Germany
Device: Sony PRS-700
cfi.coffee to cfi.js

I updated to 0.8.36 from the repository on an Ubuntu 11.04 box.

The EPUB book viewer is not running because cfi.js cannot be found.
After searching and finding cfi.coffee I installed coffeescript which did not improve anything, no install errors, and the same viewer message.

running "coffee -c cfi.coffee" by hand showed an error (either coffee is not called by "python setup.py install" or error output is gobbled), namely that nodejs is not found.
I changed the first line of /usr/bin/coffee from "#!/usr/bin/env nodejs" to "#!/usr/bin/env node"
and got errors that seem to have to do with coffee not being the right version.
Then on the coffeescript page somewhere it says:

If installing on Ubuntu or Debian, be careful not to use the existing out-of-date package.

and points to http://opinionatedprogrammer.com/201...ian-or-ubuntu/

Is there any list of prequisites and minimal versions of external software? Could setup.py install not check on the versions (assuming cfi.js is generated at install time, I am not sure).
Anthon is offline   Reply With Quote
Old 01-21-2012, 02:57 AM   #2
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: 45,335
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
There is no need for coffee or nodejs. If you are running from repository use python setup.py develop not python setup.py install. If you want to use install, use the source tarball of the release, not the repository version.

Last edited by kovidgoyal; 01-21-2012 at 03:00 AM.
kovidgoyal is online now   Reply With Quote
Advert
Old 01-21-2012, 03:17 AM   #3
Anthon
Junior Member
Anthon began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Oct 2011
Location: Braunschweig, Germany
Device: Sony PRS-700
Installing the package from ppa:gias-kay-lee/coffeescript does not work on 11.4.
The npm route (option 2 on opiniatedprogrammer.com) gets a working coffee.
Howerever setup.py would not call it.

I had to:
pushd src/calibre/ebooks/oeb/display
coffee -c cfi.coffee
cp cfi.js cp cfi.js ../../../../../resources/display/
popd
sudo python setup.py install

After that I could read books once more.
Anthon is offline   Reply With Quote
Old 01-21-2012, 03:24 AM   #4
Anthon
Junior Member
Anthon began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Oct 2011
Location: Braunschweig, Germany
Device: Sony PRS-700
python setup.py develop comes back with:

<snip?
Compiling cfi.coffee
Traceback (most recent call last):
File "/home/avdndata/mercurial/ruamel.eu/src/calibre/src/calibre/utils/serve_coffee.py", line 25, in <module>
from PyQt4.Qt import QCoreApplication, QScriptEngine, QScriptValue
ImportError: cannot import name QScriptEngine

Compilation of cfi.coffee failed
Command '['/usr/bin/python', '/home/avdndata/mercurial/ruamel.eu/src/calibre/src/calibre/utils/serve_coffee.py', 'compile', '/home/avdndata/mercurial/ruamel.eu/src/calibre/src/calibre/ebooks/oeb/display/cfi.coffee']' returned non-zero exit status 1
make: *** [update] Error 1
Anthon is offline   Reply With Quote
Old 01-21-2012, 06:33 AM   #5
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: 45,335
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
You need to ensure you have all of Qt installed, including QScriptEngine
kovidgoyal is online now   Reply With Quote
Advert
Old 02-24-2012, 12:26 PM   #6
WayneD
Enthusiast
WayneD began at the beginning.
 
Posts: 32
Karma: 10
Join Date: Sep 2007
Device: Android phone + PRS-505
Quote:
Originally Posted by kovidgoyal View Post
You need to ensure you have all of Qt installed, including QScriptEngine
I'd sure like to know what installs QScriptEngine in Ubuntu, as I can't seem to find it anywhere. I have all these installed (plus various others):

pyqt4-dev-tools
python-qt4
python-qt4-dev

For the time being I've simply reversed the recent changes serve_coffee.py so that I can continue to build calibre.
WayneD is offline   Reply With Quote
Old 02-24-2012, 11:00 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: 45,335
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
On gentoo it's qt-script, I have no idea about Ubuntu
kovidgoyal is online now   Reply With Quote
Old 02-25-2012, 09:19 AM   #8
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: 31,037
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by kovidgoyal View Post
On gentoo it's qt-script, I have no idea about Ubuntu
Probably: libqt4-script
theducks is offline   Reply With Quote
Old 02-26-2012, 12:33 AM   #9
WayneD
Enthusiast
WayneD began at the beginning.
 
Posts: 32
Karma: 10
Join Date: Sep 2007
Device: Android phone + PRS-505
Sadly, that doesn't seem to help -- I've had that installed all along. I see the class being defined in this sip file:

python-qt4-dev: /usr/share/sip/PyQt4/QtScript/qscriptengine.sip

Aha! I need to change the source like this (in src/calibre/utils/serve_coffee.py):

-from PyQt4.Qt import QCoreApplication, QScriptEngine, QScriptValue
+from PyQt4.Qt import QCoreApplication
+from PyQt4.QtScript import QScriptEngine, QScriptValue

... then it works.

..wayne..
WayneD is offline   Reply With Quote
Old 02-26-2012, 12:48 AM   #10
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: 31,037
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Talking it through works wonders (almost every time )
theducks is offline   Reply With Quote
Old 02-26-2012, 01:00 AM   #11
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: 45,335
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
I've changed it in trunk. Though you might want to update your PyQt4 as that implies a rather old release.
kovidgoyal is online now   Reply With Quote
Old 03-16-2012, 06:05 PM   #12
t3d
Enthusiast
t3d began at the beginning.
 
Posts: 38
Karma: 10
Join Date: Nov 2009
Location: Poland
Device: kindle 1st gen, kindle dxg, kindle paperwhite2
Quote:
Originally Posted by WayneD View Post

-from PyQt4.Qt import QCoreApplication, QScriptEngine, QScriptValue
+from PyQt4.Qt import QCoreApplication
+from PyQt4.QtScript import QScriptEngine, QScriptValue

... then it works.

..wayne..
You saved my day
t3d is offline   Reply With Quote
Reply

Tags
coffeescript usage


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
coffee failed?? iomari Calibre 2 12-19-2011 06:50 AM
A question about coffee xg4bx Lounge 40 09-30-2011 04:17 PM
Best coffee in the world? GlenBarrington Lounge 98 02-18-2011 06:45 PM
Coffee or Tea? Dylrob Lounge 110 06-05-2009 08:08 AM
coffee in the kindle??? HELP!! fcmonroe Amazon Kindle 36 08-31-2008 07:24 AM


All times are GMT -4. The time now is 05:25 AM.


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