Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 737678 - dev-vcs/git-cola won't launch: ModuleNotFoundError: No module named 'PyQt5.QtNetwork'
Summary: dev-vcs/git-cola won't launch: ModuleNotFoundError: No module named 'PyQt5.Qt...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2020-08-17 15:35 UTC by Remco Rijnders
Modified: 2020-12-07 09:25 UTC (History)
2 users (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 Remco Rijnders 2020-08-17 15:35:20 UTC
$ git-cola
Traceback (most recent call last):
  File "/usr/bin/git-cola", line 53, in <module>
    from cola.main import main
  File "/usr/share/git-cola/lib/cola/main.py", line 6, in <module>
    from . import app
  File "/usr/share/git-cola/lib/cola/app.py", line 36, in <module>
    from .widgets import startup
  File "/usr/share/git-cola/lib/cola/widgets/startup.py", line 16, in <module>
    from .. import guicmds
  File "/usr/share/git-cola/lib/cola/guicmds.py", line 14, in <module>
    from .widgets.browse import BrowseBranch
  File "/usr/share/git-cola/lib/cola/widgets/browse.py", line 22, in <module>
    from .selectcommits import select_commits
  File "/usr/share/git-cola/lib/cola/widgets/selectcommits.py", line 13, in <module>
    from .diff import DiffTextEdit
  File "/usr/share/git-cola/lib/cola/widgets/diff.py", line 20, in <module>
    from .. import gravatar
  File "/usr/share/git-cola/lib/cola/gravatar.py", line 8, in <module>
    from qtpy import QtNetwork
  File "/usr/lib/python3.7/site-packages/qtpy/QtNetwork.py", line 17, in <module>
    from PyQt5.QtNetwork import *
ModuleNotFoundError: No module named 'PyQt5.QtNetwork'


Reproducible: Always

Steps to Reproduce:
Install and try to run git-cola using python 3.7
Comment 1 Jonas Stein gentoo-dev 2020-08-17 19:13:09 UTC
I had similar problems with python modules in python 3.7
I could not find out why it happens here, but as a work around I could force to use python 3.8. 

The situation seems to be a bit more complicate and requires some analysis.
We can not help you efficiently via bug tracker. 

I have had very good experience on the gentoo IRC [1] with questions like this. Of course there are also forums and mailing lists [2,3].
I hope you understand, that I will close the bug here therefore and wish you good luck on one of the mentioned channels [4].
Please reopen the ticket in order to provide an indication for an specific error in an ebuild or any gentoo related product.

[1] https://www.gentoo.org/get-involved/irc-channels/
[2] https://forums.gentoo.org/
[3] https://www.gentoo.org/get-involved/mailing-lists/all-lists.html
[4] https://www.gentoo.org/support/
Comment 2 Remco Rijnders 2020-08-17 19:38:58 UTC
Hi Jonas,

Thank you for the speedy reply. I understand that you as bug wrangler can not (or do not have the time to) fix this yourself for a package which has no maintainer. However, I do feel that this might still be a bug in the package ebuild. As such, should the report not stay open till either it gets resolved, or this package and/or Python 3.7 is no longer supported?
Comment 3 Martin Gysel (bearsh) 2020-10-21 07:13:04 UTC
(In reply to Remco Rijnders from comment #0)
> $ git-cola
> Traceback (most recent call last):
>   File "/usr/bin/git-cola", line 53, in <module>
>     from cola.main import main
>   File "/usr/share/git-cola/lib/cola/main.py", line 6, in <module>
>     from . import app
>   File "/usr/share/git-cola/lib/cola/app.py", line 36, in <module>
>     from .widgets import startup
>   File "/usr/share/git-cola/lib/cola/widgets/startup.py", line 16, in
> <module>
>     from .. import guicmds
>   File "/usr/share/git-cola/lib/cola/guicmds.py", line 14, in <module>
>     from .widgets.browse import BrowseBranch
>   File "/usr/share/git-cola/lib/cola/widgets/browse.py", line 22, in <module>
>     from .selectcommits import select_commits
>   File "/usr/share/git-cola/lib/cola/widgets/selectcommits.py", line 13, in
> <module>
>     from .diff import DiffTextEdit
>   File "/usr/share/git-cola/lib/cola/widgets/diff.py", line 20, in <module>
>     from .. import gravatar
>   File "/usr/share/git-cola/lib/cola/gravatar.py", line 8, in <module>
>     from qtpy import QtNetwork
>   File "/usr/lib/python3.7/site-packages/qtpy/QtNetwork.py", line 17, in
> <module>
>     from PyQt5.QtNetwork import *
> ModuleNotFoundError: No module named 'PyQt5.QtNetwork'
> 
> 
> Reproducible: Always
> 
> Steps to Reproduce:
> Install and try to run git-cola using python 3.7

is dev-python/PyQt5 installed with the network useflag?
Comment 4 drulex 2020-11-25 14:23:04 UTC
(In reply to Martin Gysel (bearsh) from comment #3)
> (In reply to Remco Rijnders from comment #0)
> > $ git-cola
> > Traceback (most recent call last):
> >   File "/usr/bin/git-cola", line 53, in <module>
> >     from cola.main import main
> >   File "/usr/share/git-cola/lib/cola/main.py", line 6, in <module>
> >     from . import app
> >   File "/usr/share/git-cola/lib/cola/app.py", line 36, in <module>
> >     from .widgets import startup
> >   File "/usr/share/git-cola/lib/cola/widgets/startup.py", line 16, in
> > <module>
> >     from .. import guicmds
> >   File "/usr/share/git-cola/lib/cola/guicmds.py", line 14, in <module>
> >     from .widgets.browse import BrowseBranch
> >   File "/usr/share/git-cola/lib/cola/widgets/browse.py", line 22, in <module>
> >     from .selectcommits import select_commits
> >   File "/usr/share/git-cola/lib/cola/widgets/selectcommits.py", line 13, in
> > <module>
> >     from .diff import DiffTextEdit
> >   File "/usr/share/git-cola/lib/cola/widgets/diff.py", line 20, in <module>
> >     from .. import gravatar
> >   File "/usr/share/git-cola/lib/cola/gravatar.py", line 8, in <module>
> >     from qtpy import QtNetwork
> >   File "/usr/lib/python3.7/site-packages/qtpy/QtNetwork.py", line 17, in
> > <module>
> >     from PyQt5.QtNetwork import *
> > ModuleNotFoundError: No module named 'PyQt5.QtNetwork'
> > 
> > 
> > Reproducible: Always
> > 
> > Steps to Reproduce:
> > Install and try to run git-cola using python 3.7
> 
> is dev-python/PyQt5 installed with the network useflag?

I had the exact same issue as OP and indeed the 'network' use flag was missing from dev-python/PyQt5. Rebuilding with 'network' fixed the issue.
Comment 5 Remco Rijnders 2020-11-30 11:41:54 UTC
> I had the exact same issue as OP and indeed the 'network' use flag was
> missing from dev-python/PyQt5. Rebuilding with 'network' fixed the issue.

Apologies for the late response. This does indeed fix the issue for me, thanks!
Comment 6 Larry the Git Cow gentoo-dev 2020-12-07 09:25:09 UTC
The bug has been closed via the following commit(s):

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

commit 619c78bf0d82c6020aca73752509cdcf32eb7717
Author:     Martin Gysel <me@bearsh.org>
AuthorDate: 2020-11-29 13:26:16 +0000
Commit:     Joonas Niilola <juippis@gentoo.org>
CommitDate: 2020-12-07 09:17:58 +0000

    dev-vcs/git-cola: add PyQt5 dep
    
    also add GIT_CONFIG_NOSYSTEM=true to tests
    
    Closes: https://bugs.gentoo.org/737678
    Closes: https://bugs.gentoo.org/739026
    
    Package-Manager: Portage-3.0.10, Repoman-3.0.2
    Signed-off-by: Martin Gysel <me@bearsh.org>
    Closes: https://github.com/gentoo/gentoo/pull/18445
    Signed-off-by: Joonas Niilola <juippis@gentoo.org>

 dev-vcs/git-cola/git-cola-3.5-r1.ebuild | 2 ++
 1 file changed, 2 insertions(+)