![]() |
#1 |
Junior Member
![]() 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). |
![]() |
![]() |
![]() |
#2 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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. |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Junior Member
![]() 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. |
![]() |
![]() |
![]() |
#4 |
Junior Member
![]() 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 |
![]() |
![]() |
![]() |
#5 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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
|
![]() |
![]() |
Advert | |
|
![]() |
#6 | |
Enthusiast
![]() Posts: 32
Karma: 10
Join Date: Sep 2007
Device: Android phone + PRS-505
|
Quote:
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. |
|
![]() |
![]() |
![]() |
#7 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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
|
![]() |
![]() |
![]() |
#8 |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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
|
|
![]() |
![]() |
![]() |
#9 |
Enthusiast
![]() 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.. |
![]() |
![]() |
![]() |
#10 |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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
![]() ![]() |
![]() |
![]() |
![]() |
#11 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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.
|
![]() |
![]() |
![]() |
#12 |
Enthusiast
![]() Posts: 38
Karma: 10
Join Date: Nov 2009
Location: Poland
Device: kindle 1st gen, kindle dxg, kindle paperwhite2
|
|
![]() |
![]() |
![]() |
Tags |
coffeescript usage |
|
![]() |
||||
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 |