Fix pywebview GUI errors by implementing fallback browser approach#36
Open
Shridhar7-8 wants to merge 2 commits intoe2b-dev:masterfrom
Open
Fix pywebview GUI errors by implementing fallback browser approach#36Shridhar7-8 wants to merge 2 commits intoe2b-dev:masterfrom
Shridhar7-8 wants to merge 2 commits intoe2b-dev:masterfrom
Conversation
- Replace pywebview with system browser fallback to avoid GTK/Qt dependency issues - Add browser_simple.py with webbrowser module as primary solution - Update main.py to use simplified browser implementation - Configure OpenAI providers in config.py for better compatibility Resolves issues with: - ModuleNotFoundError: No module named 'gi' (GTK backend) - QApplication import errors (Qt backend) - QtWebKitWidgets missing module errors - WebViewException: You must have either QT or GTK with Python extensions The application now opens VNC URLs in the system's default browser instead of requiring complex GUI library dependencies in the virtual environment.
- Check return value of webbrowser.open() for success/failure - Properly trigger fallback browser logic when system browser fails - Raise exception when webbrowser.open() returns False to ensure fallback execution - Improve error handling and user feedback Fixes issue where webbrowser.open() would return False (failure) but not raise an exception, causing the fallback browser logic to be skipped and leaving users without a working browser connection.
Author
|
@cursor review |
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.
Resolves issues with:
The application now opens VNC URLs in the system's default browser instead of requiring complex GUI library dependencies in the virtual environment.