calibre throws the following exception when trying to start: calibre, version 5.43.0 ERROR: Bad database location: Bad database location '/home/user/EBooks'. Will start with a new, empty calibre library Traceback (most recent call last): File "/usr/lib64/calibre/calibre/gui2/main.py", line 330, in initialize_db db = LibraryDatabase(self.library_path) File "/usr/lib64/calibre/calibre/db/legacy.py", line 187, in __init__ backend = self.backend = create_backend(library_path, default_prefs=default_prefs, File "/usr/lib64/calibre/calibre/db/legacy.py", line 44, in create_backend return DB(library_path, default_prefs=default_prefs, File "/usr/lib64/calibre/calibre/db/backend.py", line 460, in __init__ if self.user_version == 0: File "/usr/lib64/calibre/calibre/db/backend.py", line 1212, in user_version return self.conn.get('pragma user_version;', all=False) File "/usr/lib64/calibre/calibre/db/backend.py", line 925, in conn self._conn = Connection(self.dbpath) File "/usr/lib64/calibre/calibre/db/backend.py", line 339, in __init__ plugins.load_apsw_extension(self, 'sqlite_extension') File "/usr/lib64/calibre/calibre/constants.py", line 325, in load_apsw_extension conn.enableloadextension(True) AttributeError: 'Connection' object has no attribute 'enableloadextension' This happens even when running: python3 -m sysconfig | grep sqlite-extensions signals python was compiled with flag --enable-loadable-sqlite-extensions Reproducible: Sometimes Steps to Reproduce: 1. Upgrade Gentoo's python version to 3.10 2. Start calibre Actual Results: calibre shows an error related to a bad database location, however, database was working before upgrading python version. Expected Results: calibre opens database and runs as usual Portage 3.0.30 (python 3.10.5-final-0, default/linux/amd64/17.1/desktop/gnome, gcc-11.3.0, glibc-2.34-r13, 5.15.26-gentoo-x86_64 x86_64) ================================================================= System uname: Linux-5.15.26-gentoo-x86_64-x86_64-Intel-R-_Core-TM-_i5-3230M_CPU_@_2.60GHz-with-glibc2.34 KiB Mem: 12072684 total, 173564 free KiB Swap: 0 total, 0 free Timestamp of repository gentoo: Mon, 04 Jul 2022 16:30:01 +0000 Head commit of repository gentoo: 0879cdd7c0900fd821a40296e7f362ff43079b92 sh bash 5.1_p16 ld GNU ld (Gentoo 2.37_p1 p2) 2.37 app-misc/pax-utils: 1.3.4::gentoo app-shells/bash: 5.1_p16::gentoo dev-java/java-config: 2.3.1::gentoo dev-lang/perl: 5.34.1-r3::gentoo dev-lang/python: 3.10.5::gentoo dev-lang/rust: 1.60.0::gentoo dev-util/cmake: 3.22.4::gentoo dev-util/meson: 0.61.4-r2::gentoo sys-apps/baselayout: 2.8::gentoo sys-apps/openrc: 0.44.10::gentoo sys-apps/sandbox: 2.29::gentoo sys-devel/autoconf: 2.13-r2::gentoo, 2.71-r1::gentoo sys-devel/automake: 1.16.5::gentoo sys-devel/binutils: 2.37_p1-r2::gentoo sys-devel/binutils-config: 5.4.1::gentoo sys-devel/clang: 14.0.4::gentoo sys-devel/gcc: 11.3.0::gentoo sys-devel/gcc-config: 2.5-r1::gentoo sys-devel/libtool: 2.4.7::gentoo sys-devel/llvm: 14.0.4::gentoo sys-devel/make: 4.3::gentoo sys-kernel/linux-headers: 5.15-r3::gentoo (virtual/os-headers) sys-libs/glibc: 2.34-r13::gentoo Repositories: gentoo location: /var/db/repos/gentoo sync-type: rsync sync-uri: rsync://rsync.gentoo.org/gentoo-portage priority: -1000 sync-rsync-extra-opts: sync-rsync-verify-max-age: 24 sync-rsync-verify-jobs: 1 sync-rsync-verify-metamanifest: yes pascalin location: /var/db/repos/pascalin masters: gentoo ACCEPT_KEYWORDS="amd64" ACCEPT_LICENSE="@FREE" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-march=core2 -O3 -pipe" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/share/config /usr/share/easy-rsa /usr/share/gnupg/qualified.txt" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c" CXXFLAGS="-march=core2 -O3 -pipe" DISTDIR="/var/cache/distfiles" ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR" FCFLAGS="-march=core2 -O3 -pipe" FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs buildpkg-live config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr" FFLAGS="-march=core2 -O3 -pipe" GENTOO_MIRRORS="http://mirror.rackspace.com/gentoo/ http://gentoo.mirrors.ovh.net/gentoo-distfiles/ http://mirrors.aliyun.com/gentoo/" LANG="es_MX.utf8" LDFLAGS="-Wl,-O1 -Wl,--as-needed" LINGUAS="es es_MX es_ES en de_DE de" MAKEOPTS="-j1" PKGDIR="/var/cache/binpkgs" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git" PORTAGE_TMPDIR="/var/tmp" SHELL="/bin/bash" USE="X a52 aac acl acpi alsa amd64 bluetooth branding bzip2 cairo cdda cdr chromecast cli colord crypt cups dbus dri dts dvd dvdr eds elogind encode evo exif firmware flac fortran gdbm gif gnome gnome-keyring gnome-online-accounts gpm gstreamer gtk gui iconv icu introspection ipv6 jpeg laptop lcms libglvnd libnotify libsecret libtirpc mad mmx mng mp3 mp4 mpeg multilib nautilus ncurses networkmanager nls nptl ogg opengl openmp pam pango pcre pdf png policykit ppds pulseaudio qt5 readline screencast sdl seccomp spell split-usr sse sse2 ssl startup-notification svg sysprof threads tiff tracker truetype udev udisks unicode upower usb v4l vorbis wayland wxwidgets x264 xattr xcb xml xv xvid zlib" ABI_X86="64" ADA_TARGET="gnat_2020" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext sse sse2" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="libinput synaptics" KERNEL="linux" L10N="en es es-ES es-MX de de-DE" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-4 php8-0" POSTGRES_TARGETS="postgres12 postgres13" PYTHON_SINGLE_TARGET="python3_10" PYTHON_TARGETS="python3_10" RUBY_TARGETS="ruby27" USERLAND="GNU" VIDEO_CARDS="apm intel i915 v4l vesa vga" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq proto steal rawnat logmark ipmark dhcpmac delude chaos account" Unset: ADDR2LINE, AR, ARFLAGS, AS, ASFLAGS, CC, CCLD, CONFIG_SHELL, CPP, CPPFLAGS, CTARGET, CXX, CXXFILT, ELFEDIT, EMERGE_DEFAULT_OPTS, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, INSTALL_MASK, LC_ALL, LD, LEX, LFLAGS, LIBTOOL, MAKE, MAKEFLAGS, NM, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, RANLIB, READELF, RUSTFLAGS, SIZE, STRINGS, STRIP, YACC, YFLAGS
I could've sworn we'd fixed this.
I think you need to emerge --sync and do a world upgrade. It's fixed in dev-python/apsw-3.38.5_p1-r1. *** This bug has been marked as a duplicate of bug 851741 ***