Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not opening on Windows 11 #43

Closed
3 of 7 tasks
Soitora opened this issue Aug 25, 2023 · 9 comments
Closed
3 of 7 tasks

Not opening on Windows 11 #43

Soitora opened this issue Aug 25, 2023 · 9 comments
Labels
bug Something isn't working

Comments

@Soitora
Copy link

Soitora commented Aug 25, 2023

Bug description

Using Portable and MSI installer, all version I've tried (down to, and including, 1.1.2) does not open at all.

What happened

Simply use Portable or MSI installer

What was expected

Program to open the GUI

Step to reproduce

  • The bug is always reproducible
  • The bug seems to appear randomly

Steps to reproduce:

  • Install MSi or Extract Portable files
  • Attempt to open the program through shortcut or .exe

System information

  • Operating system (with version): [Ubuntu 20.04, ArchLinux, Windows 10,...]

  • How did you installed the software?

    • From PyPI (pip3 install yoga-image-optimizer)
    • From source
    • Windows Installer
    • Windows Zip
    • Other (please provide any useful information like command you use, a link to a documentation,...)
  • YOGA Image Optimizer version: 1.2.2 -> 1.1.2

Extra information

I did not find logs anywhere, it could most likely help but I do not know where to search.

@Soitora Soitora added the bug Something isn't working label Aug 25, 2023
@flozz
Copy link
Owner

flozz commented Aug 27, 2023

Hello,

Thank you for your report. I tried YOGA Image Optimizer v1.2.2 on a Windows 11 VM and it worked for me. So I am not able to reproduce and to debug your issue by myself.

Sadly there is no easy way to get application output on Windows . If the program is compiled with no console support, there will be no log, and if it is compiled with console it will always open a terminal... I may try to implement my own logging one day but not now...

Anyway, I am building for you a version that opens the console so you will be able to have log to report here :)

@Soitora
Copy link
Author

Soitora commented Aug 27, 2023

Hello,

Thank you for your report. I tried YOGA Image Optimizer v1.2.2 on a Windows 11 VM and it worked for me. So I am not able to reproduce and to debug your issue by myself.

That's very odd, I might add that I'm on Developer preview version of Windows 11

Other than that I'm unsure of what could affect it

Anyway, I am building for you a version that opens the console so you will be able to have log to report here :)

Thank you kindly 🙏

@flozz
Copy link
Owner

flozz commented Aug 27, 2023

The build is here:

You will have to

  • Decompress the ZIP archive
  • Open a terminal in the folder that contains the software
  • Run it from the CLI (so if the app crashes you will still have the logs)

Capture d’écran du 2023-08-27 11-39-19

@Soitora
Copy link
Author

Soitora commented Aug 27, 2023

Thanks

I extracted it to C:\Users\Soitora\Downloads\yoga-image-optimizer_1.2.2_win64 and called .\yoga-image-optimizer.exe using Windows Terminal and Powershell Core 7

Here is my output:

❯ .\yoga-image-optimizer.exe
Traceback (most recent call last):
  File "C:\Users\Soitora\DOWNLO~1\YOGA-I~1.2_W\yoga-image-optimizer.py", line 16, in <module>
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
  File "C:\Users\Soitora\DOWNLO~1\YOGA-I~1.2_W\yoga_image_optimizer\__main__.py", line 4, in <module yoga_image_optimizer.__main__>
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
  File "C:\Users\Soitora\DOWNLO~1\YOGA-I~1.2_W\yoga_image_optimizer\application.py", line 11, in <module yoga_image_optimizer.application>
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
  File "C:\Users\Soitora\DOWNLO~1\YOGA-I~1.2_W\yoga_image_optimizer\helpers.py", line 12, in <module yoga_image_optimizer.helpers>
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
  File "C:\Users\Soitora\DOWNLO~1\YOGA-I~1.2_W\yoga_image_optimizer\translation.py", line 11, in <module yoga_image_optimizer.translation>
  File "C:\Users\Soitora\DOWNLO~1\YOGA-I~1.2_W\os.py", line 685, in __setitem__
  File "C:\Users\Soitora\DOWNLO~1\YOGA-I~1.2_W\os.py", line 743, in check_str
TypeError: str expected, not NoneType

@flozz
Copy link
Owner

flozz commented Aug 27, 2023

Ok, it seems to be a very simple bug at least :)

It seems that here, getLocale() returns None instead of a valid language, and then it breaks when I try to insert the value in the environment:

    language, encoding = locale.getlocale()
    os.environ["LANG"] = language

I do not know that getLocale() could return a non-string value (but it is documented). I will add a check to prevent the app from crashing here.

Can you tell me what is the locale (the language) configured on your Windows?

@flozz
Copy link
Owner

flozz commented Aug 27, 2023

I rebuilt the code with a fix. Can you try it works? :)

@Soitora
Copy link
Author

Soitora commented Aug 27, 2023

Awesome, seems to work!

Language settings you asked for:

image

How it looks:

image

@flozz
Copy link
Owner

flozz commented Aug 28, 2023

Ok looks good. I will try to release the fix soon. Thank you for your help! :)

@flozz flozz closed this as completed Aug 28, 2023
@flozz
Copy link
Owner

flozz commented Sep 2, 2023

Fix released in v1.2.3.

The changelog and the Windows builds are available here:

The Flatpak package will be available later today :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants