Fix: Remove selenium-firefox wrapper and update MoviePy 2.x compatibility#204
Open
jvcByte wants to merge 2 commits into
Open
Fix: Remove selenium-firefox wrapper and update MoviePy 2.x compatibility#204jvcByte wants to merge 2 commits into
jvcByte wants to merge 2 commits into
Conversation
fix(outreach): close email body file handle (FujiwaraChoki#188)
- Remove selenium-firefox package (incompatible with Selenium 4.x) - Uninstalled selenium-firefox v2.0.8 which attempted to import removed FirefoxBinary class - Removed from requirements.txt - Removed unused imports from Twitter.py, YouTube.py, and AFM.py - Selenium 4.x includes native Firefox support, wrapper package unnecessary - Update MoviePy imports for v2.x compatibility - Replace 'from moviepy.editor import *' with explicit imports from 'moviepy' - Update 'from moviepy.video.fx.all import crop' to 'from moviepy.video.fx import Crop' - Change crop() function calls to clip.with_effects([Crop(...)]) syntax - Replace change_settings() with os.environ for ImageMagick configuration - MoviePy 2.x restructured modules and changed effect application API Files modified: - requirements.txt: Removed selenium_firefox dependency - src/classes/Twitter.py: Removed selenium_firefox import - src/classes/YouTube.py: Updated MoviePy imports, effect syntax, and config method - src/classes/AFM.py: Removed selenium_firefox import - CHANGELOG.md: Added detailed documentation of all changes and reasons
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes critical import errors preventing the application from starting by removing the incompatible
selenium-firefoxwrapper package and updating code for MoviePy 2.x compatibility.Issues Fixed
ModuleNotFoundError: No module named 'selenium.webdriver.firefox.firefox_binary'ModuleNotFoundError: No module named 'moviepy.editor'ModuleNotFoundError: No module named 'moviepy.video.fx.all'ImportError: cannot import name 'change_settings' from 'moviepy.config'Changes Made
1. Removed
selenium-firefoxwrapper packageselenium-firefoxpackage (v2.0.8) is an outdated third-party wrapper incompatible with Selenium 4.x. It attempts to importFirefoxBinarywhich was removed in Selenium 4.0+.requirements.txt- Removedselenium_firefoxdependencysrc/classes/Twitter.py- Removed unusedfrom selenium_firefox import *src/classes/YouTube.py- Removed unusedfrom selenium_firefox import *src/classes/AFM.py- Removed unusedfrom selenium_firefox import *2. Updated MoviePy imports for v2.x compatibility
moviepy.editormodule no longer exists, and effects/configuration APIs changed.src/classes/YouTube.py:from moviepy.editor import *→from moviepy import AudioFileClip, ImageClip, TextClip, ...from moviepy.video.fx.all import crop→from moviepy.video.fx import Cropcrop(clip, ...)→clip.with_effects([Crop(...)])change_settings({"IMAGEMAGICK_BINARY": ...})withos.environ['IMAGEMAGICK_BINARY'] = ...Additional Notes
CHANGELOG.mddocumenting all changes and rationaleseleniumpackage remains unchanged and fully functional