FreeSimpleGUIWeb should allow newer remi version
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 68/100
Hướng nghiên cứu
Xác định khai báo dependency của FreeSimpleGUIWeb ghim remi và kiểm tra cách package được cài đặt. Kiểm thử phiên bản remi mới hơn với Python 3.10, bao gồm việc khởi chạy một web GUI và xác nhận trang tải mà không gặp lỗi kết nối đã được báo cáo; hoàn thành nghĩa là dependency cho phép sử dụng phiên bản hoạt động mà không cần monkeypatch.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- Python
- Star
- 867
- Fork
- 106
- Merge trung bình
- 1 phút
- Pull request đã merge (30 ngày)
- 2
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của spyoungtech/FreeSimpleGUI
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
spyoungtech/FreeSimpleGUI#109 ·
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 58/100
spyoungtech/FreeSimpleGUI#101 · 8 reaction ·
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
spyoungtech/FreeSimpleGUI#99 · 1 reaction ·
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 20/100
spyoungtech/FreeSimpleGUI#95 ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 39/100
spyoungtech/FreeSimpleGUI#93 ·
Tất cả issue của spyoungtech/FreeSimpleGUI
Issue tương tự
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
use-agent-os/agent-os#3314 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
BasedHardware/omi#15662 · 1 bình luận ·
-
documentation help wanted
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 90/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
AiursoftWeb/AnduinOS-2#19 ·