FreeSimpleGUIWeb should allow newer remi version
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 68/100
Direzione di ricerca
Individua la dichiarazione della dipendenza di FreeSimpleGUIWeb che blocca remi e verifica come viene installato il pacchetto. Testa la versione più recente di remi con Python 3.10, incluso l'avvio di una GUI web e la conferma che la pagina venga caricata senza l'errore di connessione segnalato; l'attività è completata quando la dipendenza consente di usare la versione funzionante senza un monkeypatch.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- Python
- Stelle
- 867
- Fork
- 106
- Merge medio
- 1m
- PR unite (30g)
- 2
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di spyoungtech/FreeSimpleGUI
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100
spyoungtech/FreeSimpleGUI#109 ·
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 58/100
spyoungtech/FreeSimpleGUI#101 · 8 reazioni ·
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
spyoungtech/FreeSimpleGUI#99 · 1 reazione ·
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 20/100
spyoungtech/FreeSimpleGUI#95 ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 39/100
spyoungtech/FreeSimpleGUI#93 ·
Tutte le issue di spyoungtech/FreeSimpleGUI
Issue simili
-
货币战争手改优先级配置缺少列表元素类型校验(P3) Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
syfoud/Simulated_Scepter#172 ·
-
A cancelled tests run makes the coverage comment workflow fail and reports it as a red check on main Apertaarea: ci bug perceived difficulty: 3
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
Nitjsefnie-Harness-Commons/daedalus#921 · 1 commento ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
EleutherAI/lm-evaluation-harness#4207 ·
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 92/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
ClickHouse/clickhouse-connect#1057 ·