VoxelCubes / PanelCleaner

An AI-powered tool to clean manga panels.
GNU General Public License v3.0
202 stars 16 forks source link

[Fedora] Impossible to download assets (SSLError) #83

Open xAlcahest opened 4 months ago

xAlcahest commented 4 months ago
2024-04-07 14:35:15.811 | INFO     | pcleaner.gui.launcher:launch:65 - 
- Program Information -
Program: Panel Cleaner 2.6.1
Executing from: /home/<username>/Desktop/PanelCleaner/_internal/pcleaner/gui/launcher.pyc
Log file: /home/<username>/.cache/pcleaner/pcleaner.log
Config file: /home/<username>/.config/pcleaner/pcleanerrc
Cache directory: /home/<username>/.cache/pcleaner
- System Information -
Operating System: Linux 6.8.4-200.fc39.x86_64
Desktop Environment: KDE
Machine: x86_64
Python Version: 3.11.7 (main, Jan 29 2024, 16:03:57) [GCC 13.2.1 20230801]
PySide (Qt) Version: 6.6.2
Available Qt Themes: Windows, Fusion
System locale: en_US
CPU Cores: 16
GPU: None (CUDA not available)

2024-04-07 14:35:15.818 | INFO     | pcleaner.gui.launcher:launch:79 - Using locale en_US.
2024-04-07 14:35:15.821 | DEBUG    | pcleaner.gui.launcher:launch:88 - Loaded built-in Qt translations for en_US.
2024-04-07 14:35:15.822 | DEBUG    | pcleaner.gui.launcher:launch:96 - Loaded built-in Qt base translations for en_US.
2024-04-07 14:35:15.822 | DEBUG    | pcleaner.gui.launcher:launch:106 - Loaded App translations for en_US.
2024-04-07 14:35:15.841 | WARNING  | pcleaner.gui.image_tab:update_tabs:122 - Updating tabs with step None.
2024-04-07 14:35:17.300 | CRITICAL | pcleaner.gui.model_downloader_driver:inpainting_error:338 - HTTPSConnectionPool(host='github.com', port=443): Max retries exceeded with url: /enesmsahin/simple-lama-inpainting/releases/download/v0.1.0/big-lama.pt (Caused by SSLError(SSLError(0, 'unknown error (_ssl.c:3098)')))
Traceback (most recent call last):

  File "urllib3/connectionpool.py", line 467, in _make_request

  File "urllib3/connectionpool.py", line 1099, in _validate_conn

  File "urllib3/connection.py", line 653, in connect

  File "urllib3/connection.py", line 759, in _ssl_wrap_socket_and_match_hostname

  File "urllib3/util/ssl_.py", line 285, in create_urllib3_context

  File "ssl.py", line 500, in __new__

ssl.SSLError: unknown error (_ssl.c:3098)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

  File "urllib3/connectionpool.py", line 793, in urlopen

  File "urllib3/connectionpool.py", line 491, in _make_request

urllib3.exceptions.SSLError: unknown error (_ssl.c:3098)

The above exception was the direct cause of the following exception:

Traceback (most recent call last):

  File "requests/adapters.py", line 486, in send

  File "urllib3/connectionpool.py", line 847, in urlopen

  File "urllib3/util/retry.py", line 515, in increment

urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='github.com', port=443): Max retries exceeded with url: /enesmsahin/simple-lama-inpainting/releases/download/v0.1.0/big-lama.pt (Caused by SSLError(SSLError(0, 'unknown error (_ssl.c:3098)')))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

> File "pcleaner/gui/worker_thread.py", line 141, in run

  File "pcleaner/gui/model_downloader_driver.py", line 368, in download_file

  File "requests/api.py", line 73, in get

  File "requests/api.py", line 59, in request

  File "requests/sessions.py", line 589, in request

  File "requests/sessions.py", line 703, in send

  File "requests/adapters.py", line 517, in send

requests.exceptions.SSLError: HTTPSConnectionPool(host='github.com', port=443): Max retries exceeded with url: /enesmsahin/simple-lama-inpainting/releases/download/v0.1.0/big-lama.pt (Caused by SSLError(SSLError(0, 'unknown error (_ssl.c:3098)')))

How do I download it? It's only me?

xAlcahest commented 4 months ago

hello? someone here?

VoxelCubes commented 4 months ago

Thanks for your patience. It's just me working on this.

Thanks a lot for the log!

I can't replicate the issue unfortunately. Have you tried again since? It seems like your computer couldn't connect to github for some reason. It appears to be something related to Fedora's OpenSSL package. I have head of this working for people on Fedora, so if it doesn't hopefully fix itself, you can do the following workaround:

Download the file (big-lama.pt) yourself from the lama inpainter repository or use the direct link: https://www.github.com/enesmsahin/simple-lama-inpainting/releases/download/v0.1.0/big-lama.pt

Place this file at: /home/<username>/.cache/pcleaner/model/big-lama.pt

That is all.

PS. Cool to see people using KDE Plasma, awesome!

xAlcahest commented 4 months ago

Still the same issue, but the problem persists even with the other files

I will try to download them manually and i'll update here if anything good or bad happen

On Mon, Apr 8, 2024 at 3:21 PM Voxel @.***> wrote:

Thanks for your patience. It's just me working on this.

Thanks a lot for the log!

I can't replicate the issue unfortunately. Have you tried again since? It seems like your computer couldn't connect to github for some reason. It appears to be something related to Fedora's OpenSSL package. I have head of this working for people on Fedora, so if it doesn't hopefully fix itself, you can do the following workaround:

Download the file (big-lama.pt) yourself from the lama inpainter repository https://www.github.com/enesmsahin/simple-lama-inpainting/releases or use the direct link: https://www.github.com/enesmsahin/simple-lama-inpainting/releases/download/v0.1.0/big-lama.pt

Place this file at: /home//.cache/pcleaner/model/big-lama.pt

That is all.

— Reply to this email directly, view it on GitHub https://github.com/VoxelCubes/PanelCleaner/issues/83#issuecomment-2042744922, or unsubscribe https://github.com/notifications/unsubscribe-auth/AO5UZDCJGMSAZMV6VWUBGB3Y4KKUNAVCNFSM6AAAAABF3JLHDOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBSG42DIOJSGI . You are receiving this because you authored the thread.Message ID: @.***>

VoxelCubes commented 4 months ago

Oh, it wasn't just the inpainter that failed? For the text detection model you put it in the same place as the lama model (you'll want the .pt.onnx version, not .pt for the text detection because it's optimized for cpu). That one needs an extra step: Update the config file at /home/<username>/.config/pcleaner/pcleanerrc so that this line looks like this:

# This is the path to the default cv2 model.
# It is downloaded automatically if blank.
default_cv2_model_path = /home/<userrname>/.cache/pcleaner/model/comictextdetector.pt.onnx

As for the OCR model, it's a little special, see this part of the FAQ for that

xAlcahest commented 4 months ago

Oh, it wasn't just the inpainter that failed? For the text detection model you put it in the same place as the lama model (you'll want the .pt.onnx version, not .pt for the text detection because it's optimized for cpu). That one needs an extra step: Update the config file at /home/<username>/.config/pcleaner/pcleanerrc so that this line looks like this:

# This is the path to the default cv2 model.
# It is downloaded automatically if blank.
default_cv2_model_path = /home/<userrname>/.cache/pcleaner/model/comictextdetector.pt.onnx

As for the OCR model, it's a little special, see this part of the FAQ for that

For some reasons, even my friend who i made try to download the files with the Automatic Downloader, Limit Exceed, tried with the flatpak in Discover, no problem, don't understand why

VoxelCubes commented 4 months ago

that's very strange. Especially limit exceeded. Why would github do that? At least the SSL issue seems to be due to some strange configuration the Fedora distro has going on in /etc/ssl. Not exactly sure how to fix that. Users of Calibre had the same issue, and the maintainer "solved" that by ranting about Fedora developers and bundling his own version of openssl that uses standard configuration...not something that I think is a particularly good idea. I presume the flatpak doesn't use the ssl configuration in /etc/ssl due to sandboxing.