Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 12-02-2008, 12:07 PM   #1
ould
Zealot
ould ought to be getting tired of karma fortunes by now.ould ought to be getting tired of karma fortunes by now.ould ought to be getting tired of karma fortunes by now.ould ought to be getting tired of karma fortunes by now.ould ought to be getting tired of karma fortunes by now.ould ought to be getting tired of karma fortunes by now.ould ought to be getting tired of karma fortunes by now.ould ought to be getting tired of karma fortunes by now.ould ought to be getting tired of karma fortunes by now.ould ought to be getting tired of karma fortunes by now.ould ought to be getting tired of karma fortunes by now.
 
Posts: 100
Karma: 1000399
Join Date: Sep 2008
Location: Toronto, Ontario
Device: Sony PRS-500
Having some trouble with Calibre 0.4.109(python upgrade)

Hi kovid,

I am having some trouble with the latest version. I upgraded as my previous version 0.4.88 decided to stop running as well. It was only after building the newest version that I realized my system had updated to Python 2.6 and that this may be cause of both versions not running. Here is the output I am getting from console, this is on Linux btw.

Code:
/usr/lib/python2.6/site-packages/mechanize/_auth.py:14: DeprecationWarning: the md5 module is deprecated; use hashlib instead
  import re, base64, urlparse, posixpath, md5, os, random, sha, time, copy
/usr/lib/python2.6/site-packages/mechanize/_auth.py:14: DeprecationWarning: the sha module is deprecated; use the hashlib module instead
  import re, base64, urlparse, posixpath, md5, os, random, sha, time, copy
/usr/lib/python2.6/site-packages/pyPdf/pdf.py:52: DeprecationWarning: the sets module is deprecated
  from sets import ImmutableSet
Traceback (most recent call last):
  File "/usr/bin/calibre", line 8, in <module>
    load_entry_point('calibre==0.4.109', 'gui_scripts', 'calibre')()
  File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 277, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 2180, in load_entry_point
    return ep.load()
  File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 1913, in load
    entry = __import__(self.module_name, globals(),globals(), ['__name__'])
  File "/usr/lib/python2.6/site-packages/calibre/gui2/main.py", line 26, in <module>
    from calibre.library.database import LibraryDatabase
  File "/usr/lib/python2.6/site-packages/calibre/library/database.py", line 15, in <module>
    from calibre.web.feeds.recipes import migrate_automatic_profile_to_automatic_recipe
  File "/usr/lib/python2.6/site-packages/calibre/web/feeds/recipes/__init__.py", line 23, in <module>
    from calibre.ebooks.lrf.web.profiles import DefaultProfile, FullContentProfile
  File "/usr/lib/python2.6/site-packages/calibre/ebooks/lrf/web/__init__.py", line 26, in <module>
    from calibre.ebooks.lrf.web.profiles.nasa          import NASA
  File "/usr/lib/python2.6/site-packages/calibre/ebooks/lrf/web/profiles/nasa.py", line 33, in <module>
    class NASA(DefaultProfile):
  File "/usr/lib/python2.6/site-packages/calibre/ebooks/lrf/web/profiles/nasa.py", line 64, in NASA
    (re.compile(r'<div id="download_image_box_print">.*?<div id="caption_region_print">', re.IGNORECASE | re.DOTALL), lambda match : '<New Stuff>'),
  File "/usr/lib/python2.6/re.py", line 188, in compile
    return _compile(pattern, flags)
  File "/usr/lib/python2.6/re.py", line 236, in _compile
    raise ValueError('Cannot process flags argument with a compiled pattern')
ValueError: Cannot process flags argument with a compiled pattern
Any ideas? Is calibre able to run with Python 2.6?

Thanks kovid,

Kevin
ould is offline   Reply With Quote
Old 12-02-2008, 02:10 PM   #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: 43,844
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
calibre isn't 2.6 ready. You should be able to have both 2.5 and 2.6 on your system. Just install calibre using easy_install-2.5
kovidgoyal is offline   Reply With Quote
Advert
Old 12-02-2008, 09:12 PM   #3
ould
Zealot
ould ought to be getting tired of karma fortunes by now.ould ought to be getting tired of karma fortunes by now.ould ought to be getting tired of karma fortunes by now.ould ought to be getting tired of karma fortunes by now.ould ought to be getting tired of karma fortunes by now.ould ought to be getting tired of karma fortunes by now.ould ought to be getting tired of karma fortunes by now.ould ought to be getting tired of karma fortunes by now.ould ought to be getting tired of karma fortunes by now.ould ought to be getting tired of karma fortunes by now.ould ought to be getting tired of karma fortunes by now.
 
Posts: 100
Karma: 1000399
Join Date: Sep 2008
Location: Toronto, Ontario
Device: Sony PRS-500
I tried installing Python 2.5 alongside 2.6 and I had a bit of a mess but I think I got the requirements reinstalled. However, when I try to build I get this error:

Code:
usr/bin/sip -c /home/kevin/builds/calibre/calibre-0.4.92/build/temp.linux-i686-2.5/calibre.plugins.pictureflow -b /home/kevin/builds/calibre/calibre-0.4.92/build/temp.linux-i686-2.5/calibre.plugins.pictureflow/pictureflow.sbf -I /usr/share/sip -x VendorID -t WS_X11 -x PyQt_NoPrintRangeBug -t Qt_4_4_1 -g src/calibre/gui2/pictureflow/pictureflow.sip
sip: QChar has ctors with the same Python signature
error: command '/usr/bin/sip' failed with exit status 1
Any ideas?

Kevin
ould is offline   Reply With Quote
Old 12-02-2008, 09:59 PM   #4
ould
Zealot
ould ought to be getting tired of karma fortunes by now.ould ought to be getting tired of karma fortunes by now.ould ought to be getting tired of karma fortunes by now.ould ought to be getting tired of karma fortunes by now.ould ought to be getting tired of karma fortunes by now.ould ought to be getting tired of karma fortunes by now.ould ought to be getting tired of karma fortunes by now.ould ought to be getting tired of karma fortunes by now.ould ought to be getting tired of karma fortunes by now.ould ought to be getting tired of karma fortunes by now.ould ought to be getting tired of karma fortunes by now.
 
Posts: 100
Karma: 1000399
Join Date: Sep 2008
Location: Toronto, Ontario
Device: Sony PRS-500
I managed to get a little further and actually was able to build and install it but now at the end of the install I am getting this output:

Code:
Setting up bash completion...
Traceback (most recent call last):
  File "/usr/bin/calibre_postinstall", line 8, in <module>
    load_entry_point('calibre==0.4.109', 'console_scripts', 'calibre_postinstall')()
  File "build/bdist.linux-i686/egg/calibre/linux.py", line 446, in post_install
  File "build/bdist.linux-i686/egg/calibre/linux.py", line 172, in setup_completion
  File "/usr/lib/python2.5/site-packages/PIL/__init__.py", line 59, in <module>

  File "/usr/lib/python2.5/site-packages/PIL/__init__.py", line 32, in _config

TypeError: argument 1 of QSize() has an invalid type
Traceback (most recent call last):
  File "setup.py", line 465, in <module>
    subprocess.check_call('calibre_postinstall', shell=True)
  File "/usr/lib/python2.5/subprocess.py", line 462, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command 'calibre_postinstall' returned non-zero exit status 1
I get pretty much the same thing if I try and run calibre as well.

Thanks Kovid,

Kevin
ould is offline   Reply With Quote
Old 12-02-2008, 10:31 PM   #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: 43,844
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Hmm that seems to be a bad intercation between PIL and pyqt does

Code:
python2.5 -c "from PIL import Image"
work?
kovidgoyal is offline   Reply With Quote
Advert
Old 12-03-2008, 06:01 AM   #6
ould
Zealot
ould ought to be getting tired of karma fortunes by now.ould ought to be getting tired of karma fortunes by now.ould ought to be getting tired of karma fortunes by now.ould ought to be getting tired of karma fortunes by now.ould ought to be getting tired of karma fortunes by now.ould ought to be getting tired of karma fortunes by now.ould ought to be getting tired of karma fortunes by now.ould ought to be getting tired of karma fortunes by now.ould ought to be getting tired of karma fortunes by now.ould ought to be getting tired of karma fortunes by now.ould ought to be getting tired of karma fortunes by now.
 
Posts: 100
Karma: 1000399
Join Date: Sep 2008
Location: Toronto, Ontario
Device: Sony PRS-500
Quote:
Originally Posted by kovidgoyal View Post
Hmm that seems to be a bad intercation between PIL and pyqt does

Code:
python2.5 -c "from PIL import Image"
work?
Yep that seemed to work. No output, no error messages. My PyQt version is 4.4.4 if that makes a difference. PIL is 1.1.6.

Thanks again,

Kevin

Last edited by ould; 12-03-2008 at 06:15 AM.
ould is offline   Reply With Quote
Old 12-03-2008, 01:07 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: 43,844
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Try installing the latest version of calibre as debugging an older version is too much work for me.
kovidgoyal is offline   Reply With Quote
Old 12-03-2008, 02:55 PM   #8
ould
Zealot
ould ought to be getting tired of karma fortunes by now.ould ought to be getting tired of karma fortunes by now.ould ought to be getting tired of karma fortunes by now.ould ought to be getting tired of karma fortunes by now.ould ought to be getting tired of karma fortunes by now.ould ought to be getting tired of karma fortunes by now.ould ought to be getting tired of karma fortunes by now.ould ought to be getting tired of karma fortunes by now.ould ought to be getting tired of karma fortunes by now.ould ought to be getting tired of karma fortunes by now.ould ought to be getting tired of karma fortunes by now.
 
Posts: 100
Karma: 1000399
Join Date: Sep 2008
Location: Toronto, Ontario
Device: Sony PRS-500
This was with the latest version 0.4.109.
ould is offline   Reply With Quote
Old 12-03-2008, 02:59 PM   #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: 43,844
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Hmm that traceback doesn't make sense. There is no line 32 in PIL/__init__.py (atleast not in my system). What distro are you using and how did you install PIL?
kovidgoyal is offline   Reply With Quote
Old 12-03-2008, 03:35 PM   #10
ould
Zealot
ould ought to be getting tired of karma fortunes by now.ould ought to be getting tired of karma fortunes by now.ould ought to be getting tired of karma fortunes by now.ould ought to be getting tired of karma fortunes by now.ould ought to be getting tired of karma fortunes by now.ould ought to be getting tired of karma fortunes by now.ould ought to be getting tired of karma fortunes by now.ould ought to be getting tired of karma fortunes by now.ould ought to be getting tired of karma fortunes by now.ould ought to be getting tired of karma fortunes by now.ould ought to be getting tired of karma fortunes by now.
 
Posts: 100
Karma: 1000399
Join Date: Sep 2008
Location: Toronto, Ontario
Device: Sony PRS-500
I am using Arch Linux. I installed PIL by basically doing this:

Code:
python2.5 setup.py build_ext
  python2.5 setup.py install
I checked my PIL/__init.py__ and it doesn't really have anything in it other than some comments.

Weird indeed.
ould is offline   Reply With Quote
Old 12-03-2008, 04:00 PM   #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: 43,844
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Most likely there is crosstalk between your python2.5 and 2.6 instances. I'm afraid you're on your own debugging that. Alternatively, use the calibre binary installer
kovidgoyal is offline   Reply With Quote
Old 12-03-2008, 07:41 PM   #12
ould
Zealot
ould ought to be getting tired of karma fortunes by now.ould ought to be getting tired of karma fortunes by now.ould ought to be getting tired of karma fortunes by now.ould ought to be getting tired of karma fortunes by now.ould ought to be getting tired of karma fortunes by now.ould ought to be getting tired of karma fortunes by now.ould ought to be getting tired of karma fortunes by now.ould ought to be getting tired of karma fortunes by now.ould ought to be getting tired of karma fortunes by now.ould ought to be getting tired of karma fortunes by now.ould ought to be getting tired of karma fortunes by now.
 
Posts: 100
Karma: 1000399
Join Date: Sep 2008
Location: Toronto, Ontario
Device: Sony PRS-500
I managed to get it working but I had to take some drastic measures. I had to completely remove python 2.6 and all related packages. I then installed python2.5 from an older package and had to manually reinstall all the req'd python packages. I also had to tell my package manager not to update python but that could mean I won't be able to update my OS. Any idea on a timeline to python 2.6 compatibility??

Secondly is it normal that every time I upgrade the database seems to not work and I have to remove my metadata.db and in doing so I lose all the info? It's rather annoying but maybe it is me doing something wrong?? **Disregard, luckily I didn't remove the metadata.db and only renamed it temporarily, after running calibre one time and exiting I moved the original metadata.db in place of the newly created empty one and my database was back to it's original state**

Thanks,

Kevin

Last edited by ould; 12-03-2008 at 07:44 PM.
ould is offline   Reply With Quote
Old 12-03-2008, 07:51 PM   #13
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: 43,844
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
python 2.6 compatibility should happen over the next few releases. You certainly shouldn't lose metadata.db on every install.
kovidgoyal is offline   Reply With Quote
Old 12-04-2008, 03:28 PM   #14
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: 43,844
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
I just switched my dev box to python 2.6 so calibre 0.4.110 should work with 2.6, though its various parts will need testing.
kovidgoyal is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Python/Calibre question horsegoalie Calibre 0 12-15-2009 08:25 PM
Calibre custom news feed and python help. harrynewman Calibre 4 10-08-2009 09:26 AM
Python 2.5 and Calibre FizzyWater Calibre 1 03-27-2009 02:15 AM
upgrade failed - but not python-lxml fault alexxxm Calibre 7 10-06-2008 09:36 AM
Calibre and Python: do they get along? zander_nyrond Calibre 7 07-20-2008 06:54 PM


All times are GMT -4. The time now is 09:58 PM.


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