Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 689882 - app-misc/anki-2.1.13: various sip-releated runtime exceptions, fails to work
Summary: app-misc/anki-2.1.13: various sip-releated runtime exceptions, fails to work
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Qt Bug Alias
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-07-15 08:09 UTC by WGH
Modified: 2019-07-16 15:57 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description WGH 2019-07-15 08:09:57 UTC
So I finally upgraded my stable Anki 2.0.x (which was deleted from portage tree some time ago), and was greeted with completely broken app.

On start, Anki successfully syncs the database, opens main view with decks, but spews Python exception in its own custom window when you try to do pretty much anything:


Anki 2.1.13 (3ba55990) Python 3.6.5 Qt 5.12.3 PyQt 5.10.1
Platform: Linux
Flags: frz=False ao=False sv=1

Caught exception:
  File "/usr/lib64/python3.6/site-packages/aqt/webview.py", line 27, in cmd
    return json.dumps(self.onCmd(str))
  File "/usr/lib64/python3.6/site-packages/aqt/webview.py", line 87, in _onCmd
    return self._onBridgeCmd(str)
  File "/usr/lib64/python3.6/site-packages/aqt/webview.py", line 356, in _onBridgeCmd
    if self._shouldIgnoreWebEvent():
  File "/usr/lib64/python3.6/site-packages/aqt/webview.py", line 349, in _shouldIgnoreWebEvent
    if sip.isdeleted(self):
<class 'TypeError'>: isdeleted() argument 1 must be sip.simplewrapper, not AnkiWebView

The next one happens when you try to close any window (main or Preferences), preventing it close:

Anki 2.1.13 (3ba55990) Python 3.6.5 Qt 5.12.3 PyQt 5.10.1
Platform: Linux
Flags: frz=False ao=False sv=1

Caught exception:
  File "/usr/lib64/python3.6/site-packages/aqt/preferences.py", line 45, in reject
    self.accept()
  File "/usr/lib64/python3.6/site-packages/aqt/preferences.py", line 39, in accept
    self.mw.pm.save()
  File "/usr/lib64/python3.6/site-packages/aqt/profiles.py", line 183, in save
    self.db.execute(sql, self._pickle(self.profile), self.name)
  File "/usr/lib64/python3.6/site-packages/aqt/profiles.py", line 162, in _pickle
    return pickle.dumps(obj, protocol=0)
<class '_pickle.PicklingError'>: Can't pickle <built-in function _unpickle_type>: it's not the same object as sip._unpickle_type

Reproducible: Always




dev-python/PyQt5-5.10.1-r
dev-python/sip-4.19.1
dev-qt/qtcore-5.12.3
dev-qt/qtwebkit-5.212.0_pre20180120


Portage 2.3.66 (python 3.6.5-final-0, default/linux/amd64/17.0, gcc-8.3.0, glibc-2.29-r2, 4.19.56-gentoo x86_64)
=================================================================
System uname: Linux-4.19.56-gentoo-x86_64-Intel-R-_Core-TM-_i3-4010U_CPU_@_1.70GHz-with-gentoo-2.6
KiB Mem:     8056860 total,    441804 free
KiB Swap:   16777212 total,  16156344 free
Timestamp of repository gentoo: Wed, 10 Jul 2019 15:15:01 +0000
Head commit of repository gentoo: fa27222e4717fd840b5034b1170321265b7c2079
sh bash 4.4_p23-r1
ld GNU ld (Gentoo 2.32 p2) 2.32.0
distcc 3.3.2 x86_64-pc-linux-gnu [disabled]
ccache version 3.6 [disabled]
app-shells/bash:          4.4_p23-r1::gentoo
dev-java/java-config:     2.2.0-r4::gentoo
dev-lang/perl:            5.30.0::gentoo
dev-lang/python:          2.7.15-r100::sage-on-gentoo, 3.6.5::gentoo
dev-util/ccache:          3.6::gentoo
dev-util/cmake:           3.14.3::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.6-r1::gentoo
sys-apps/sandbox:         2.13::gentoo
sys-devel/autoconf:       2.13-r1::gentoo, 2.69-r4::gentoo
sys-devel/automake:       1.11.6-r3::gentoo, 1.13.4-r2::gentoo, 1.15.1-r2::gentoo, 1.16.1-r1::gentoo
sys-devel/binutils:       2.32-r1::gentoo
sys-devel/gcc:            8.3.0-r1::gentoo
sys-devel/gcc-config:     2.0::gentoo
sys-devel/libtool:        2.4.6-r3::gentoo
sys-devel/make:           4.2.1-r4::gentoo
sys-kernel/linux-headers: 4.20::gentoo (virtual/os-headers)
sys-libs/glibc:           2.29-r2::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://mirror.yandex.ru/gentoo-portage
    priority: -1000
    sync-rsync-verify-max-age: 24
    sync-rsync-extra-opts: 
    sync-rsync-verify-metamanifest: yes
    sync-rsync-verify-jobs: 1

LocalOverlay
    location: /usr/local/portage
    masters: gentoo

crossdev
    location: /usr/local/portage-crossdev
    masters: gentoo

brother-overlay
    location: /var/lib/layman/brother-overlay
    sync-type: laymansync
    sync-uri: git://github.com/stefan-langenmaier/brother-overlay.git
    masters: gentoo
    priority: 50

johu
    location: /var/lib/layman/johu
    sync-type: laymansync
    sync-uri: https://anongit.gentoo.org/git/dev/johu.git
    masters: gentoo
    priority: 50

mrueg
    location: /var/lib/layman/mrueg
    sync-type: laymansync
    sync-uri: https://github.com/mrueg/mrueg-overlay.git
    masters: gentoo
    priority: 50

pentoo
    location: /var/lib/layman/pentoo
    sync-type: laymansync
    sync-uri: https://github.com/pentoo/pentoo-overlay.git
    masters: gentoo
    priority: 50

qt
    location: /var/lib/layman/qt
    sync-type: laymansync
    sync-uri: https://anongit.gentoo.org/git/proj/qt.git
    masters: gentoo
    priority: 50

sage-on-gentoo
    location: /var/lib/layman/sage-on-gentoo
    sync-type: laymansync
    sync-uri: git://github.com/cschwan/sage-on-gentoo.git
    masters: gentoo science
    priority: 50

science
    location: /var/lib/layman/science
    sync-type: laymansync
    sync-uri: https://anongit.gentoo.org/git/proj/sci.git
    masters: gentoo
    priority: 50

steam-overlay
    location: /var/lib/layman/steam-overlay
    sync-type: laymansync
    sync-uri: git://github.com/anyc/steam-overlay.git
    masters: gentoo
    priority: 50

stuff
    location: /var/lib/layman/stuff
    sync-type: laymansync
    sync-uri: https://github.com/istitov/stuff.git
    masters: gentoo
    priority: 50

wjn-overlay
    location: /var/lib/layman/wjn-overlay
    sync-type: laymansync
    sync-uri: https://bitbucket.org/wjn/wjn-overlay.git
    masters: gentoo
    priority: 50

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="@FREE"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=core-avx2 -O2 -pipe -msahf -mmovbe --param=l1-cache-size=32 --param=l1-cache-line-size=64 --param=l2-cache-size=3072 -mtune=core-avx2 -fstack-protector"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/easy-rsa /usr/share/gnupg/qualified.txt /usr/share/maven-bin-3.3/conf /usr/share/maven-bin-3.6/conf"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.6/ext-active/ /etc/php/apache2-php7.2/ext-active/ /etc/php/apache2-php7.3/ext-active/ /etc/php/cgi-php5.6/ext-active/ /etc/php/cgi-php7.2/ext-active/ /etc/php/cgi-php7.3/ext-active/ /etc/php/cli-php5.6/ext-active/ /etc/php/cli-php7.2/ext-active/ /etc/php/cli-php7.3/ext-active/ /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=core-avx2 -O2 -pipe -msahf -mmovbe --param=l1-cache-size=32 --param=l1-cache-line-size=64 --param=l2-cache-size=3072 -mtune=core-avx2 -fstack-protector"
DISTDIR="/usr/portage/distfiles"
ENV_UNSET="DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN 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="-O2 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync metadata-transfer multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS=" http://mirror.yandex.ru/gentoo-distfiles/"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j4"
PKGDIR="/usr/portage/packages"
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"
USE="acl amd64 berkdb bindist bzip2 cli crypt cxx dri fortran gdbm glamor iconv ipv6 libtirpc multilib ncurses nls nptl openmp pam pcre pulseaudio readline seccomp ssl systemd tcpd unicode vaapi xattr zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" 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="aes avx avx2 fma3 mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="keyboard synaptics evdev mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" NETBEANS_MODULES="apisupport cnd groovy gsf harness ide identity j2ee java mobility nb php profiler soa visualweb webcommon websvccommon xml" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6" POSTGRES_TARGETS="postgres10 postgres11" PYTHON_SINGLE_TARGET="python3_6" PYTHON_TARGETS="python2_7 python3_6" RUBY_TARGETS="ruby24" USERLAND="GNU" VIDEO_CARDS="intel i965" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, LINGUAS, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Jouni Kosonen 2019-07-15 22:42:30 UTC
I'd suggest trying again with dev-python/PyQt5-5.12.2, it's stable after all.

It should always be safe to use a later PyQt5 with a minor-matching or earlier Qt, but there's no guarantee for it working the other way around.
Comment 2 WGH 2019-07-15 23:12:28 UTC
> I'd suggest trying again with dev-python/PyQt5-5.12.2, it's stable after all.

app-misc/anki-2.1.13 requires dev-python/PyQt5[webengine], but dev-python/PyQt5-5.12.2 has no webengine use flag. In fact, when I emerged Anki, this very constraint caused a downgrade from dev-python/PyQt5-5.12.2 to dev-python/PyQt5-5.10.1-r1 on my system.
Comment 3 WGH 2019-07-16 08:09:25 UTC
So I did 'emerge --depclean', which removed dev-python/PyQt5-sip-4.19.17 (and nothing else, dev-python/sip-4.19.17 had been installed before and remained so) and Anki mysteriously started to work. Just out of curiousity, I reinstalled dev-python/PyQt5-sip, and Anki broke again. Removed, works again.

What's going on? Is it related to bug 689514?
Comment 4 Davide Pesavento (RETIRED) gentoo-dev 2019-07-16 15:40:53 UTC
oh, you're using an older PyQt5 with PyQt5-sip still installed. I didn't consider that scenario (downgrades). What I think is happening is that the "import sip" statements in PyQt5 will prefer the (still installed) private PyQt5.sip module which is not compatible with older PyQt5 versions. We need a blocker.
Comment 5 Larry the Git Cow gentoo-dev 2019-07-16 15:56:35 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=63863009e6b9a4db36b5077d4840f38b66d155fe

commit 63863009e6b9a4db36b5077d4840f38b66d155fe
Author:     Davide Pesavento <pesa@gentoo.org>
AuthorDate: 2019-07-16 15:56:09 +0000
Commit:     Davide Pesavento <pesa@gentoo.org>
CommitDate: 2019-07-16 15:56:25 +0000

    dev-python/PyQt5-sip: block old PyQt5 versions
    
    Bug: https://bugs.gentoo.org/689882
    Package-Manager: Portage-2.3.69, Repoman-2.3.16
    Signed-off-by: Davide Pesavento <pesa@gentoo.org>

 dev-python/PyQt5-sip/PyQt5-sip-4.19.17.ebuild | 4 +++-
 dev-python/PyQt5-sip/PyQt5-sip-4.19.18.ebuild | 4 +++-
 2 files changed, 6 insertions(+), 2 deletions(-)

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=db87617bc72ca26c4a18caba9f7ef1034688273a

commit db87617bc72ca26c4a18caba9f7ef1034688273a
Author:     Davide Pesavento <pesa@gentoo.org>
AuthorDate: 2019-07-16 15:45:54 +0000
Commit:     Davide Pesavento <pesa@gentoo.org>
CommitDate: 2019-07-16 15:56:25 +0000

    dev-python/PyQt5: older versions should block PyQt5-sip
    
    Bug: https://bugs.gentoo.org/689882
    Package-Manager: Portage-2.3.69, Repoman-2.3.16
    Signed-off-by: Davide Pesavento <pesa@gentoo.org>

 dev-python/PyQt5/PyQt5-5.10.1-r1.ebuild | 1 +
 1 file changed, 1 insertion(+)