Launching "git cola" fails with the following exception: Traceback (most recent call last): File "/usr/bin/git-cola", line 53, in <module> from cola.main import main ImportError: cannot import name main I have the following python configuration: PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_4" Installed python versions: - 2.7.10 - 3.4.3 # equery files git-cola | grep main.py$ /usr/share/git-cola/lib/cola/main.py /usr/share/git-cola/lib/cola/models/main.py /usr/share/git-cola/lib/cola/widgets/main.py
Please provide the output of emerge --info and emerge -pvq git-cola.
emerge -pvq git-cola [ebuild N ] dev-vcs/git-cola-2.3 USE="-doc {-test}" PYTHON_SINGLE_TARGET="python2_7 -python3_3 -python3_4" PYTHON_TARGETS="python2_7 python3_4 -python3_3" emerge --info Portage 2.2.20.1 (python 2.7.10-final-0, default/linux/amd64/13.0/desktop, gcc-4.9.3, glibc-2.21-r1, 4.2.3 x86_64) ================================================================= System uname: Linux-4.2.3-x86_64-Intel-R-_Core-TM-_i5-2400S_CPU_@_2.50GHz-with-gentoo-2.2 KiB Mem: 8159328 total, 703080 free KiB Swap: 0 total, 0 free Timestamp of repository gentoo: Mon, 09 Nov 2015 18:15:01 +0000 sh bash 4.3_p39 ld GNU ld (Gentoo 2.25.1 p1.1) 2.25.1 ccache version 3.1.9 [disabled] app-shells/bash: 4.3_p39::gentoo dev-java/java-config: 2.2.0::gentoo dev-lang/perl: 5.20.2::gentoo dev-lang/python: 2.7.10::gentoo, 3.4.3::gentoo dev-util/ccache: 3.1.9-r4::gentoo dev-util/cmake: 3.3.1-r1::gentoo dev-util/pkgconfig: 0.28-r2::gentoo sys-apps/baselayout: 2.2::gentoo sys-apps/openrc: 0.17::gentoo sys-apps/sandbox: 2.6-r1::gentoo sys-devel/autoconf: 2.13::gentoo, 2.69::gentoo sys-devel/automake: 1.11.6-r1::gentoo, 1.13.4::gentoo, 1.14.1::gentoo, 1.15::gentoo sys-devel/binutils: 2.25.1-r1::gentoo sys-devel/gcc: 4.9.3::gentoo sys-devel/gcc-config: 1.7.3::gentoo sys-devel/libtool: 2.4.6::gentoo sys-devel/make: 4.1-r1::gentoo sys-kernel/linux-headers: 4.3::gentoo (virtual/os-headers) sys-libs/glibc: 2.21-r1::gentoo Repositories: gentoo location: /usr/portage sync-type: rsync sync-uri: rsync://rsync.de.gentoo.org/gentoo-portage priority: -1000 mrueg location: /var/lib/layman/mrueg masters: gentoo priority: 0 ebuilds-generated-by-g-cpan location: /usr/portage/local/perl masters: gentoo priority: 1 own-ebuilds location: /usr/portage/local/my masters: gentoo priority: 2 ACCEPT_KEYWORDS="amd64" ACCEPT_LICENSE="* -@EULA PUEL dlj-1.1" CBUILD="x86_64-pc-linux-gnu" CC="gcc" CFLAGS="-O2 -pipe -march=native" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/maven-bin-2.2/conf /usr/share/maven-bin-3.0/conf /var/lib/hsqldb" 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="-O2 -pipe -march=native" DISTDIR="/usr/portage/distfiles" FCFLAGS="-O2 -pipe" FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch 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.bytemark.co.uk/gentoo/ ftp://mirror.switch.ch/mirror/gentoo/ http://gentoo.supp.name/" LANG="de_DE.utf8" LDFLAGS="-Wl,-O1 -Wl,--as-needed" MAKEOPTS="-j2" 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" PORTAGE_TMPDIR="/var/tmp" USE="X a52 aac acl acpi alsa amd64 berkdb bluray branding bzip2 cairo cdda cdr cli consolekit cracklib crypt cups cxx dbus dri dts dvd dvdr emboss encode exif fam firefox flac fortran gdbm gif glamor gpm gtk iconv idn ipv6 jpeg lcms ldap libcanberra libnotify mad mmx mmxext mng modules mp3 mp4 mpeg multilib ncurses nls nptl ogg opengl openmp pam pango pcre pdf png policykit ppds pulseaudio qt3support qt4 readline sdl seccomp session spell sse sse2 ssl startup-notification svg systemd tcpd tiff truetype udev udisks unicode upower usb vaapi vim-syntax vorbis wxwidgets x264 xattr xcb xml xv xvid xvmc zlib zsh-completion" 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="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmx2 mmxext sse sse2" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_4" RUBY_TARGETS="ruby21" USERLAND="GNU" VIDEO_CARDS="intel i915" 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: CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Sorry, had temporarily uninstalled git-cola. That’s the actual output of emerge -pvq git-cola: [ebuild R ] dev-vcs/git-cola-2.3 USE="-doc {-test}" PYTHON_SINGLE_TARGET="python2_7 -python3_3 -python3_4" PYTHON_TARGETS="python2_7 python3_4 -python3_3"
What is the output of "head /usr/bin/git-cola" ?
head /usr/bin/git-cola #!/usr/bin/python2.7 # -*- python-mode -*- """git-cola: The highly caffeinated Git GUI """ from __future__ import division, absolute_import, unicode_literals __copyright__ = """ Copyright (C) 2007-2015 David Aguilar <davvid@gmail.com> and contributors
Could you please try version 2.4?
Same error with git-cola 2.4.
Created attachment 416760 [details] test script Could you please run this script and paste the output here?
/tmp/test.py syspath before: /tmp /usr/lib64/python27.zip /usr/lib64/python2.7 /usr/lib64/python2.7/plat-linux2 /usr/lib64/python2.7/lib-tk /usr/lib64/python2.7/lib-old /usr/lib64/python2.7/lib-dynload /usr/lib64/python2.7/site-packages /usr/lib64/python2.7/site-packages/gtk-2.0 /usr/lib64/python2.7/site-packages/wx-3.0-gtk2 cola mod: /cola/__init__.py install lib: /share/git-cola/lib syspath after:/tmp /share/git-cola/lib /usr/lib64/python27.zip /usr/lib64/python2.7 /usr/lib64/python2.7/plat-linux2 /usr/lib64/python2.7/lib-tk /usr/lib64/python2.7/lib-old /usr/lib64/python2.7/lib-dynload /usr/lib64/python2.7/site-packages /usr/lib64/python2.7/site-packages/gtk-2.0 /usr/lib64/python2.7/site-packages/wx-3.0-gtk2
I really don't understand where your problem comes from. Do you have any hint what might be different on your machine?
Manually removing all *.pyc and *.pyo files in /usr/share/git-cola/lib/ did the trick. Anyway, I’m wondering that those files weren’t cleaned automatically.