FabriceSalvaire / CodeReview

CodeReview is a Git GUI tool to perform code review (Diff Viewer) written in Python3 and Qt5.
http://fabricesalvaire.github.io/CodeReview
408 stars 95 forks source link

AttributeError: module 'platform' has no attribute 'dist' #48

Closed Nudin closed 1 year ago

Nudin commented 4 years ago

When I execute pyqgit I get an exception followed by a segfault.

/usr/lib/python3.8/site-packages/CodeReview/Logging/Logging.py:52: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details.
  logging_config = yaml.load(open(logging_config_file_name, 'r'))
2020-01-28 00:11:05,226 - pyqgit - Logging.setup_logging - INFO - Start pyqgit
2020-01-28 00:11:05,248 - CodeReview.GUI.LogBrowser.LogBrowserApplication - ApplicationBase.__init__ - DEBUG - Namespace(path='/home/michi', user_script=None, user_script_args='') {}
Traceback (most recent call last):
  File "/usr/bin/pyqgit", line 67, in <module>
    application = LogBrowserApplication(args)
  File "/usr/lib/python3.8/site-packages/CodeReview/GUI/LogBrowser/LogBrowserApplication.py", line 47, in __init__
    super(LogBrowserApplication, self).__init__(args=args)
  File "/usr/lib/python3.8/site-packages/CodeReview/GUI/Base/GuiApplicationBase.py", line 58, in __init__
    super(GuiApplicationBase, self).__init__(args=args, **kwargs)
  File "/usr/lib/python3.8/site-packages/CodeReview/Application/ApplicationBase.py", line 49, in __init__
    self._platform = Platform()
  File "/usr/lib/python3.8/site-packages/CodeReview/Tools/Platform.py", line 50, in __init__
    self.distribution = ' '.join(platform.dist())
AttributeError: module 'platform' has no attribute 'dist'
QWidget: Must construct a QApplication before a QWidget
Abgebrochen (Speicherabzug geschrieben)

My system:

Please let me know if I can provide you more information needed. Thanks a lot! (Haven't tried it yet but screenshots look promising)

Nudin commented 4 years ago

Commenting out the call of platform.dist() fixes the issue.

lukaepti commented 3 years ago

Was able to build from source but the official pypi repo seems to be outdated and the build has the above-mentioned problem