joaorb64 / TournamentStreamHelper

MIT License
102 stars 39 forks source link

5.2: The thumbnail generator fails to generate thumbnails on Manjaro #297

Open Wolfy76700 opened 1 year ago

Wolfy76700 commented 1 year ago

When ran through Python 3.10 on the latest Manjaro Plasma, the thumbnail generator is unable to properly generate thumbnails including the default preview. For instance, here is the message that appears when booting the software or when trying to generate the default preview:

Screenshot_216_png

And here is the associated log from the console:

QPixmap::scaled: Pixmap is a null pixmap
QPixmap::scaled: Pixmap is a null pixmap
QPixmap::scaled: Pixmap is a null pixmap
set type font ['./assets/font/RobotoCondensed.ttf', './assets/font/RobotoCondensed.ttf']
set type font ['./assets/font/RobotoCondensed.ttf', './assets/font/RobotoCondensed.ttf']
[{'name': 'Player 1', 'team': 'Sponsor 1', 'asset': {'assets': {'full': {'asset': './assets/mock_data/mock_asset/full_character_0.png', 'eyesight': {'x': 540, 'y': 126}}}, 'codename': 'character', 'name': 'Character', 'skin': '0'}}, {'name': 'Player 2', 'team': 'Sponsor 2', 'asset': {'assets': {'full': {'asset': './assets/mock_data/mock_asset/full_character_1.png', 'eyesight': {'x': 540, 'y': 126}}}, 'codename': 'character', 'name': 'Character', 'skin': '0'}}, {'name': 'Player 3', 'team': 'Sponsor 3', 'asset': {'assets': {'full': {'asset': './assets/mock_data/mock_asset/full_character_2.png', 'eyesight': {'x': 540, 'y': 126}}}, 'codename': 'character', 'name': 'Character', 'skin': '0'}}, {'name': 'Player 4', 'team': 'Sponsor 4', 'asset': {'assets': {'full': {'asset': './assets/mock_data/mock_asset/full_character_3.png', 'eyesight': {'x': 540, 'y': 126}}}, 'codename': 'character', 'name': 'Character', 'skin': '0'}}]
QPixmap::scaled: Pixmap is a null pixmap
QPixmap::scaled: Pixmap is a null pixmap
QPainter::begin: Paint device returned engine == 0, type: 2
QPainter::end: Painter not active, aborted
QPainter::begin: Paint device returned engine == 0, type: 2
QPainter::end: Painter not active, aborted
No proportional size. Calculating.
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
Processing asset: ./assets/mock_data/mock_asset/full_character_0.png
QPainter::begin: Paint device returned engine == 0, type: 2
Traceback (most recent call last):
  File "/home/mathias/Documents/TournamentStreamHelper-5.2/src/TSHThumbnailSettingsWidget.py", line 855, in GeneratePreview
    tmp_file = thumbnail.generate(
  File "/home/mathias/Documents/TournamentStreamHelper-5.2/src/thumbnail/main_generate_thumbnail.py", line 1406, in generate
    thumbnail = paste_characters(
  File "/home/mathias/Documents/TournamentStreamHelper-5.2/src/thumbnail/main_generate_thumbnail.py", line 673, in paste_characters
    thumbnail = paste_image_matrix(
  File "/home/mathias/Documents/TournamentStreamHelper-5.2/src/thumbnail/main_generate_thumbnail.py", line 323, in paste_image_matrix
    zoom_x = max_size[0] / tmpWidth
ZeroDivisionError: division by zero

QPixmap::scaled: Pixmap is a null pixmap
QPixmap::scaled: Pixmap is a null pixmap

The Executable can be used as a workaround should Wine be installed on the system using the following command:

sudo pacman -S wine winetricks wine-mono wine_gecko
Orochikyocr commented 1 year ago

I am using Lubuntu 22.04. I can confirm this is happening here on my two PCs too.