Skip to content

Fix: Remove selenium-firefox wrapper and update MoviePy 2.x compatibility#204

Open
jvcByte wants to merge 2 commits into
FujiwaraChoki:mainfrom
jvcByte:main
Open

Fix: Remove selenium-firefox wrapper and update MoviePy 2.x compatibility#204
jvcByte wants to merge 2 commits into
FujiwaraChoki:mainfrom
jvcByte:main

Conversation

@jvcByte
Copy link
Copy Markdown

@jvcByte jvcByte commented Mar 27, 2026

Summary

Fixes critical import errors preventing the application from starting by removing the incompatible selenium-firefox wrapper 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-firefox wrapper package

  • Why: The selenium-firefox package (v2.0.8) is an outdated third-party wrapper incompatible with Selenium 4.x. It attempts to import FirefoxBinary which was removed in Selenium 4.0+.
  • Solution: Removed the wrapper package entirely. Selenium 4.x already includes native Firefox WebDriver support, making the wrapper unnecessary.
  • Files changed:
    • requirements.txt - Removed selenium_firefox dependency
    • src/classes/Twitter.py - Removed unused from selenium_firefox import *
    • src/classes/YouTube.py - Removed unused from selenium_firefox import *
    • src/classes/AFM.py - Removed unused from selenium_firefox import *

2. Updated MoviePy imports for v2.x compatibility

  • Why: MoviePy 2.x restructured its module organization. The moviepy.editor module no longer exists, and effects/configuration APIs changed.
  • Solution: Updated all imports and usage to match MoviePy 2.x API.
  • Files changed:
    • src/classes/YouTube.py:
      • Changed from moviepy.editor import *from moviepy import AudioFileClip, ImageClip, TextClip, ...
      • Changed from moviepy.video.fx.all import cropfrom moviepy.video.fx import Crop
      • Updated effect syntax: crop(clip, ...)clip.with_effects([Crop(...)])
      • Replaced change_settings({"IMAGEMAGICK_BINARY": ...}) with os.environ['IMAGEMAGICK_BINARY'] = ...

Additional Notes

  • Added CHANGELOG.md documenting all changes and rationale
  • No breaking changes to functionality - only dependency compatibility updates
  • The core selenium package remains unchanged and fully functional

jvcByte and others added 2 commits March 25, 2026 14:28
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant