![]() |
#1 |
Junior Member
![]() Posts: 5
Karma: 10
Join Date: Jan 2012
Device: many
|
ngettext error (Linux Version)
Hi:
I've been using Calibre for more than 1 year. Excellent program... keep it up! Anyway, I just refreshed my laptop build and tried to reinstall Calibre. I run Arch Linux. Calibre doesn't start. The console messages I get are as follows: [steve@SNB-ARCH12 ~]$ calibre Traceback (most recent call last): File "/usr/bin/calibre", line 18, in <module> from calibre.gui2.main import main File "/usr/lib/calibre/calibre/gui2/main.py", line 18, in <module> from calibre.library.database2 import LibraryDatabase2 File "/usr/lib/calibre/calibre/library/database2.py", line 19, in <module> from calibre.ebooks.metadata.opf2 import metadata_to_opf File "/usr/lib/calibre/calibre/ebooks/metadata/opf2.py", line 20, in <module> from calibre.ebooks.metadata.book.base import Metadata File "/usr/lib/calibre/calibre/ebooks/metadata/book/base.py", line 17, in <module> from calibre.library.field_metadata import FieldMetadata File "/usr/lib/calibre/calibre/library/field_metadata.py", line 44, in <module> class FieldMetadata(dict): File "/usr/lib/calibre/calibre/library/field_metadata.py", line 140, in FieldMetadata 'name':ngettext('Series', 'Series', 2), NameError: name 'ngettext' is not defined I've uninstalled and reinstalled a few times, trying different things. Question: Is this a bug, a missing dependency, or what? Thanks in advance for your help! Steve Brodson |
![]() |
![]() |
![]() |
#2 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,188
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
uninstall the distro version of calibre and use the official binary install from here: http://calibre-ebook.com/download_linux
|
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Junior Member
![]() Posts: 5
Karma: 10
Join Date: Jan 2012
Device: many
|
Thanks for the prompt response. I tried that one before I posted and I just tried that again. Same result. I'm using python 3.2.2.
Any other ideas? |
![]() |
![]() |
![]() |
#4 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,553
Karma: 950151
Join Date: Nov 2008
Device: Sony PRS-950, iphone/ipad (Marvin/iBooks/QuickReader)
|
I do not believe that Calibre is compatible with Python 3.x series. It currently uses the 2.7 series.
|
![]() |
![]() |
![]() |
#5 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,188
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
You need to be doing this:
sudo python -c "import sys; py3 = sys.version_info[0] > 2; u = __import__('urllib.request' if py3 else 'urllib', fromlist=1); exec(u.urlopen('http://status.calibre-ebook.com/linux_installer').read()); main()" |
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Junior Member
![]() Posts: 5
Karma: 10
Join Date: Jan 2012
Device: many
|
No joy... Same Problem. I don't see any difference from the one on the Calibre website.
I also note python2.7 installed -- not sure which one it is trying to use. Anyway, it worked until I reformatted my laptop... it must be some sort of dependency or conflict with something else installed. Looks like someone else has reported the same problem: https://bugs.archlinux.org/task/28065 |
![]() |
![]() |
![]() |
#7 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,188
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
You cannot be getting the same error in both cases. In one case the code is being run from an archlinux calibre package, in the other from the official calibre binary. If nothing else, the line numbers and file names will be different.
*Uninstall* your arch linux calibre package first. |
![]() |
![]() |
![]() |
#8 |
Junior Member
![]() Posts: 5
Karma: 10
Join Date: Jan 2012
Device: many
|
Detailed troubleshooting session
OK... Here's what I did, along with the commands.
1. Cleared off all calibre files -------------------------- 2. Installed calibre from repositories: [steve@SNB-ARCH12 bin]$ sudo pacman -S calibre resolving dependencies... looking for inter-conflicts... Targets (1): calibre-0.8.36-1 Total Installed Size: 34.18 MiB Proceed with installation? [Y/n] y (1/1) checking package integrity [######################] 100% (1/1) loading package files [######################] 100% (1/1) checking for file conflicts [######################] 100% (1/1) checking available disk space [######################] 100% (1/1) installing calibre [######################] 100% Optional dependencies for calibre ipython: to use calibre-debug --------------------------------------- 3. Tried to run calibre: [steve@SNB-ARCH12 bin]$ calibre Traceback (most recent call last): File "/usr/bin/calibre", line 18, in <module> from calibre.gui2.main import main File "/usr/lib/calibre/calibre/gui2/main.py", line 18, in <module> from calibre.library.database2 import LibraryDatabase2 File "/usr/lib/calibre/calibre/library/database2.py", line 19, in <module> from calibre.ebooks.metadata.opf2 import metadata_to_opf File "/usr/lib/calibre/calibre/ebooks/metadata/opf2.py", line 20, in <module> from calibre.ebooks.metadata.book.base import Metadata File "/usr/lib/calibre/calibre/ebooks/metadata/book/base.py", line 17, in <module> from calibre.library.field_metadata import FieldMetadata File "/usr/lib/calibre/calibre/library/field_metadata.py", line 44, in <module> class FieldMetadata(dict): File "/usr/lib/calibre/calibre/library/field_metadata.py", line 140, in FieldMetadata 'name':ngettext('Series', 'Series', 2), NameError: name 'ngettext' is not defined ----------------------------------- 4. Removed calibre [steve@SNB-ARCH12 bin]$ sudo pacman -R calibre checking dependencies... Targets (1): calibre-0.8.36-1 Total Removed Size: 34.18 MiB Do you want to remove these packages? [Y/n] (1/1) removing calibre [######################] 100% [steve@SNB-ARCH12 bin]$ -------------------------------- 5. Installed calibre through your recommended method (selected default /opt location): [steve@SNB-ARCH12 bin]$ sudo python -c "import sys; py3 = sys.version_info[0] > 2; u = __import__('urllib.request' if py3 else 'urllib', fromlist=1); exec(u.urlopen('http://status.calibre-ebook.com/linux_installer').read()); main()" Enter the installation directory for calibre [/opt]: Will download and install calibre-0.8.36-x86_64.tar.bz2 Downloading calibre-0.8.36-x86_64.tar.bz2 100% [================================================== ====================] Downloaded 50355024 bytes Checking downloaded file integrity... Extracting files to /opt/calibre ... Extracting application files... Traceback (most recent call last): File "site.py", line 56, in main File "site-packages/calibre/linux.py", line 11, in <module> File "site-packages/calibre/customize/ui.py", line 15, in <module> File "site-packages/calibre/customize/builtins.py", line 12, in <module> File "site-packages/calibre/ebooks/metadata/opf2.py", line 20, in <module> File "site-packages/calibre/ebooks/metadata/book/base.py", line 17, in <module> File "site-packages/calibre/library/field_metadata.py", line 44, in <module> File "site-packages/calibre/library/field_metadata.py", line 140, in FieldMetadata NameError: name 'ngettext' is not defined You can automate future calibre installs by specifying the installation directory in the install command itself, like this: sudo python -c "import sys; py3 = sys.version_info[0] > 2; u = __import__('urllib.request' if py3 else 'urllib', fromlist=1); exec(u.urlopen('http://status.calibre-ebook.com/linux_installer').read()); main(install_dir='/opt')" Change /opt above to whatever directory you want calibre to be automatically installed to Run "calibre" to start calibre --------------------------------------- 6. Despite above error, tried to run calibre: [steve@SNB-ARCH12 bin]$ /opt/calibre/calibre Traceback (most recent call last): File "site.py", line 56, in main File "site-packages/calibre/gui2/main.py", line 18, in <module> File "site-packages/calibre/library/database2.py", line 19, in <module> File "site-packages/calibre/ebooks/metadata/opf2.py", line 20, in <module> File "site-packages/calibre/ebooks/metadata/book/base.py", line 17, in <module> File "site-packages/calibre/library/field_metadata.py", line 44, in <module> File "site-packages/calibre/library/field_metadata.py", line 140, in FieldMetadata NameError: name 'ngettext' is not defined [steve@SNB-ARCH12 bin]$ ------------------- I must admit that I didn't look at line numbers. Does this help identify any issues? |
![]() |
![]() |
![]() |
#9 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,188
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
set the LANG variable correctly.
export LANG="en_US.UTF-8" then run calibre |
![]() |
![]() |
![]() |
#10 |
Junior Member
![]() Posts: 5
Karma: 10
Join Date: Jan 2012
Device: many
|
That did it!
Thanks for having the patience to work through this for me!
I'll be making a donation on the website! |
![]() |
![]() |
![]() |
Thread Tools | Search this Thread |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
calibre, version 0.8.8 ERROR: Error: Error communicating with device no such column: | e-bookuser | Devices | 1 | 07-03-2011 04:09 PM |
Calibre Linux: Wrong version number | samy2 | Calibre | 9 | 06-19-2011 09:59 AM |
Portable Linux version of Sigil | readx | Sigil | 9 | 09-03-2010 02:59 AM |
embedded Linux version | gr8npwrfl | Ectaco jetBook | 2 | 12-24-2009 10:04 AM |
Yellow dog linux 6.1 PPC version? | Ravenlocke | Calibre | 3 | 05-08-2009 10:49 PM |