videomorph icon indicating copy to clipboard operation
videomorph copied to clipboard

Fix the version string for PEP440, and some Qt6 enum accesses

Open ferdnyc opened this issue 1 month ago • 1 comments

This PR addresses two issues I encountered attempting to install and run videomorph from the repo sources:

  1. The version string 1.5-canelo doesn't conform to PEP440, and is therefore invalid. pip install will abort with a traceback due to a packaging.version.InvalidVersion exception. But, 1.5+canelo is perfectly valid, so use that instead.
  2. Some enum accesses were still relying on PyQt5 compatibility symbols that are no longer present in PyQt6. Little things like: Edit trigger names are now members of QAbstractItemView.EditTrigger instead of QAbstractItemView; Model roles are now members of Qt.ItemDataRole; The QMessageBox "OK" button is now found at QMessageBox.StandardButton.Ok.

I can't promise I got all of the enum access issues, in the second commit, there could be more. I addressed only the ones I either personally experienced, or saw were guilty of the same issue that caused problems for me.

Also, NOT addressed in this PR is another crash I hit in the converter, specifically in converter.reader.OutputReader.bitrate due to an IndexError:

Traceback (most recent call last):
  File ".../videomorph/forms/videomorph.py", line 1140, in _ready_read
    self._update_conversion_progress()
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
  File ".../videomorph/forms/videomorph.py", line 1178, in _update_conversion_progress
    self._update_status_bar()
    ~~~~~~~~~~~~~~~~~~~~~~~^^
  File ".../videomorph/forms/videomorph.py", line 1221, in _update_status_bar
    br=self.library.reader.bitrate,
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File ".../videomorph/converter/reader.py", line 63, in bitrate
    return bitrate_read[0].split("=")[-1].strip()
           ~~~~~~~~~~~~^^^
IndexError: list index out of range
[1]    3239129 IOT instruction (core dumped)  videomorph

So, it looks like additional defensive coding and sanity checks are needed there.

ferdnyc avatar Dec 03 '25 14:12 ferdnyc

Oh, and let me know if I should target the develop branch instead. (Though, if so, it would be good to set that branch as the repo's default branch so all PRs are automatically targeted there.)

ferdnyc avatar Dec 03 '25 14:12 ferdnyc