FreeSimpleGUIWeb should allow newer remi version
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 68/100
Research direction
Locate the FreeSimpleGUIWeb dependency declaration that pins remi and inspect how the package is installed. Test the newer remi version with Python 3.10, including launching a web GUI and confirming the page loads without the reported connection error; done means the dependency permits the working version without a monkeypatch.
Written by the indexing model from the issue text.
Description
I had a problem when installing FreeSimpleGUIWeb on Python 3.10... The remi version is bound to be <=2020.3.10, but there is a slightly newer version available 2022.7.27, which I am not sure of but I guess should work...
The problem at hand was as follows:
remi version 2020.3.10 has a bug, where it could not be loaded with python version >=3.4 (the catch phrase uses the wrong Exception in gui.py)
try:
# Python 2.6-2.7
from HTMLParser import HTMLParser
h = HTMLParser()
unescape = h.unescape
except ImportError:
# Python 3
try:
from html.parser import HTMLParser
h = HTMLParser()
unescape = h.unescape
except ImportError:
# Python 3.4+
import html
unescape = html.unescape
The second ImportError does not catch the correct error as h.unescape is wrong not the import to HTMLParser.
So I tried to update the library (which does not work as my dependency manager states is must be <=2020.3.10). And afterwards I tried to monkeypatch the error away with:
from unittest.mock import patch
import sys
with patch.dict(sys.modules, {"html.parser":None}):
import FreeSimpleGUI as sg
But this led to a situation, where script runs as expected, but the website isn't shown and results in a connection error...
So I updated remi to 2022.7.10 (ignoring the dependency manager) and voila it works (even without the monkeypatch)
So I have not thoroughly tested it, but I think the newer version should not break things for FreeSimpleGUIWeb and would allow to install and use it on newer python versions without dirty hacks.
- Dominant language
- Python
- Stars
- 867
- Forks
- 106
- Avg merge
- 1m
- Merged PRs (30d)
- 2
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from spyoungtech/FreeSimpleGUI
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
spyoungtech/FreeSimpleGUI#109 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 58/100
spyoungtech/FreeSimpleGUI#101 · 8 reactions ·
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
spyoungtech/FreeSimpleGUI#99 · 1 reaction ·
-
Difficulty 5/5 Over a week Newbie friendliness 20/100
spyoungtech/FreeSimpleGUI#95 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 39/100
spyoungtech/FreeSimpleGUI#93 ·
All issues in spyoungtech/FreeSimpleGUI
Similar issues
-
documentation help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
simonw/sqlite-utils#872 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100