jeanslack / Videomass

Videomass is a free, open source and cross-platform GUI for FFmpeg and yt-dlp
https://jeanslack.github.io/Videomass/
GNU General Public License v3.0
1.06k stars 49 forks source link

TypeError using Python3.10.8 wxPython4.2.0 #178

Closed jeanslack closed 1 year ago

jeanslack commented 1 year ago

What operating system are you using?
Manjaro 22.0-221224 xfce Python 3.10.8 wxPython 4.2.0

What version of Videomass are you using and how did you install or run it?
From source code, v4.0.5 (unreleased)

Describe the bug
Using crop/rotate video filters get: TypeError: Image.Scale(): argument 1 has unexpected type 'float'

related references: https://discuss.wxpython.org/t/float-values-no-longer-accepted-in-wxpython-4-1-2a1-dev5259/35731

From wxPython 4.2.0 changelog:

Fix a large number of Python 3.10 issues. In Python 3.10, a change was implemented where extension functions that take integer arguments will no longer silently accept non-integer arguments (e.g., floats) that can only be converted to integers with a loss of precision. Fixed most of these issues in the pure-Python classes and demos by explicitly converting the parameters to int before passing them to wxWidgets. There is loss of precision, but this was happening before (automatically) anyway as most wxWidgets DeviceContext functions operate using integers.