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

Error when building WingetUI #163

Closed
ppvnf opened this issue Sep 29, 2022 · 28 comments
Closed

Error when building WingetUI #163

ppvnf opened this issue Sep 29, 2022 · 28 comments
Labels
waiting-for-something This issue depends on something before we can resolve it

Comments

@ppvnf
Copy link
Contributor

ppvnf commented Sep 29, 2022

In the uninstall section I wish I could select/unselect some apps and then click "uninstall selected packages", like in the update section.

Related:
#111
#156

@marticliment
Copy link
Owner

image
That was impelemnted with the toolbar, and it will come with the next version.

@ppvnf
Copy link
Contributor Author

ppvnf commented Sep 29, 2022

awesome!

@ppvnf
Copy link
Contributor Author

ppvnf commented Sep 29, 2022

@martinet101, just a little piece of feedback:

By looking at the image the only thing I didn't understand was the lock beside "Uninstall selected". I wish it was a version pin, but I know Winget doesn't have an equivalent to scoop hold just yet.

Also, I think it's an amazing feature to have, but I feel a little bit scared of clicking select all and then accidentally uninstall everything on my computer. How about a confirmation message showing the number of packages you wish to uninstall?

And just to be extra sure I, if I click select all after a search It won't select packages that aren't shown in the search, right?

PS. I want to build WingetUI to try it myself, but I'm getting an error. Tomorrow I will try to reinstall Python and Visual C++ to see if I am able to get it compiled.

@marticliment
Copy link
Owner

Also, I think it's an amazing feature to have, but I feel a little bit scared of clicking select all and then accidentally uninstall everything on my computer. How about a confirmation message showing the number of packages you wish to uninstall?

Yes, this i'm going to change it. Also, it will ask for confirmation.

And just to be extra sure I, if I click select all after a search It won't select packages that aren't shown in the search, right?

Nope, all tyhe options apply only to the visible packages to the user

PS. I want to build WingetUI to try it myself, but I'm getting an error. Tomorrow I will try to reinstall Python and Visual C++ to see if I am able to get it compiled.

Are you running Python 10 + latest PyInstaller?

@marticliment
Copy link
Owner

By looking at the image the only thing I didn't understand was the lock beside "Uninstall selected". I wish it was a version pin, but I know Winget doesn't have an equivalent to scoop hold just yet.

I don't know if I understood you right, but you can blacklist app updates

@ppvnf
Copy link
Contributor Author

ppvnf commented Sep 30, 2022

Are you running Python 10 + latest PyInstaller?

Yes, I am getting this error message when clicking build_win.bat. I've already installed PySide6, win32mica and PyInstaller. When I run python __init__.py I get:

PS D:\Users\PICHAU\Downloads\WingetUI-main\wingetui> python __init__.py
Win32Mica Error: win32 version 19044 is not supported
Traceback (most recent call last):
  File "D:\Users\PICHAU\Downloads\WingetUI-main\wingetui\__init__.py", line 9, in <module>
    import wingetHelpers, scoopHelpers
  File "D:\Users\PICHAU\Downloads\WingetUI-main\wingetui\wingetHelpers.py", line 3, in <module>
    from tools import *
ModuleNotFoundError: No module named 'tools'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "D:\Users\PICHAU\Downloads\WingetUI-main\wingetui\__init__.py", line 1557, in <module>
    traceback_info += str(type(e))
NameError: name 'e' is not defined
PS D:\Users\PICHAU\Downloads\WingetUI-main\wingetui>

I don't know if I understood you right, but you can blacklist app updates

Yes, I know. I just wished there was a native way to do that in Winget-CLI. Could you explain to me what the locker inside the blue circle is used for?

193123779-82903f80-fd9d-4b4f-bbf8-10ac5fcc7660

@marticliment
Copy link
Owner

Yes, I know. I just wished there was a native way to do that in Winget-CLI. Could you explain to me what the locker inside the blue circle is used for?

It is just an uninstall button

@marticliment
Copy link
Owner

marticliment commented Oct 1, 2022

Can you please check that the tools.py doesn't have the name in capital letters?

@marticliment
Copy link
Owner

Because that was a faced issue by some people

@marticliment
Copy link
Owner

Yes, I am getting this error message when clicking build_win.bat. I've already installed PySide6, win32mica and PyInstaller. When I run python __init__.py I get:

VSCode added again thia annoying import. gonna remove it

@ppvnf
Copy link
Contributor Author

ppvnf commented Oct 1, 2022

It is still capitalized. I've changed Tools.py to tools.py and the error is now the following:

PS D:\Users\PICHAU\Downloads\WingetUI-main\wingetui> python __init__.py
Win32Mica Error: win32 version 19044 is not supported
PS D:\Users\PICHAU\Downloads\WingetUI-main\wingetui>

When I open build.bat:

cmd.txt

  OS: Windows
                   Version: ('10', '10.0.19044', 'SP0', 'Multiprocessor Free')
           OS Architecture: AMD64
          APP Architecture: 64bit
               APP Version: 1.4
                   Program: WingetUI
           Program section: Main script

-----------------------------------------------------------------------------------------



WingetUI Log:




Traceback (most recent call last):
  File __init__.py, line 10, in <module>
  File .\MainWindow.py, line 5, in <module>

ModuleNotFoundError: No module named 'win32gui'<class 'ModuleNotFoundError'>: No module named 'win32gui'

@marticliment
Copy link
Owner

This is weird stuff with pywin32.

You need to go to C:\Users\{username}\AppData\Local\Programs\Python\Python310\Scripts
and run python pywin32_postinstall.py -install

@ppvnf
Copy link
Contributor Author

ppvnf commented Oct 2, 2022

I tried it all, Python from Winget, MS Store and standalone... It feels like my PC just doesn't like WingetUI. Hopefully when I upgrade to Windows 11 things will improve.

PS C:\Users\PICHAU\AppData\Local\Programs\Python\Python310\Scripts> python pywin32_postinstall.py -install
C:\Users\PICHAU\AppData\Local\Programs\Python\Python310\python.exe: can't open file 'C:\\Users\\PICHAU\\AppData\\Local\\Programs\\Python\\Python310\\Scripts\\pywin32_postinstall.py': [Errno 2] No such file or directory
PS C:\Users\PICHAU\AppData\Local\Programs\Python\Python310\Scripts>
PS D:\Users\PICHAU\Downloads\WingetUI-main\wingetui> python __init__.py
Win32Mica Error: win32 version 19044 is not supported

cmd.txt

 OS: Windows
                   Version: ('10', '10.0.19044', 'SP0', 'Multiprocessor Free')
           OS Architecture: AMD64
          APP Architecture: 64bit
               APP Version: 1.4
                   Program: WingetUI
           Program section: Main script

-----------------------------------------------------------------------------------------



WingetUI Log:




Traceback (most recent call last):
  File D:\Users\PICHAU\Downloads\WingetUI-main\wingetui\__init__.py, line 10, in <module>
    from mainWindow import *
  File D:\Users\PICHAU\Downloads\WingetUI-main\wingetui\mainWindow.py, line 5, in <module>
    import win32gui

ModuleNotFoundError: No module named 'win32gui'<class 'ModuleNotFoundError'>: No module named 'win32gui'

@marticliment
Copy link
Owner

Are you running the latest version of pywin32? remember not to install win32gui but rather pywin32

@ppvnf
Copy link
Contributor Author

ppvnf commented Oct 2, 2022

I've managed to launch it after running python __init__.py. Changes I've made:

  • rename Tools.py to tools.py
  • rename MainWindow.py to mainWindow.py
  • add pywin32 to requirements.txt
  • pwshell execute
git config --global --add safe.directory C:/Users/PICHAU/scoop/buckets/

git config --global --add safe.directory C:/Users/PICHAU/scoop/buckets/extras

git config --global --add safe.directory C:/Users/PICHAU/scoop/buckets/main

git config --global --add safe.directory C:/Users/PICHAU/scoop/buckets/games

However icons and Winget packages are missing:

Captura de tela 2022-10-02 183109

PS D:\Users\PICHAU\Downloads\WingetUI-main(1)\WingetUI-main\wingetui> python __init__.py
Win32Mica Error: win32 version 19044 is not supported
Unknown option "darkmode=0"
O sistema não pode encontrar o caminho especificado.
O sistema não pode encontrar o caminho especificado.
O sistema não pode encontrar o caminho especificado.
b'O sistema n\xc6o pode encontrar o caminho especificado.'
O sistema no pode encontrar o caminho especificado.
b'O sistema n\xc6o pode encontrar o caminho especificado.'
O sistema no pode encontrar o caminho especificado.

build.bat didn't work, but I'm using Windows Store version of Python 3.10:

OS: Windows
                   Version: ('10', '10.0.19044', 'SP0', 'Multiprocessor Free')
           OS Architecture: AMD64
          APP Architecture: 64bit
               APP Version: 1.4
                   Program: WingetUI
           Program section: Main script

-----------------------------------------------------------------------------------------



WingetUI Log:




Traceback (most recent call last):
  File __init__.py, line 10, in <module>
  File PyInstaller\loader\pyimod02_importers.py, line 499, in exec_module
  File .\mainWindow.py, line 5, in <module>

ImportError: DLL load failed while importing win32gui: Não foi possível encontrar o módulo especificado.<class 'ImportError'>: DLL load failed while importing win32gui: Não foi possível encontrar o módulo especificado

@ppvnf ppvnf changed the title Bulk uninstall Error when building WingetUI Oct 2, 2022
@ppvnf
Copy link
Contributor Author

ppvnf commented Oct 2, 2022

I've created a pull request #184

@ppvnf
Copy link
Contributor Author

ppvnf commented Oct 3, 2022

@martinet101, I've changed the name of this issue. Shouldn't it be reopen? I know we went completely off topic, but I am thankful about that since it helped me fix #92. It feels like I am missing just a single thing to be able to properly build WingetUI tho...

Also, what do you think about adding to the readme a guide to help other newbies like me build WingetUI?

If you wish I can adapt and add https://github.com/martinet101/ElevenClock/wiki#running-and-building-the-source-code after the screenshots in the readme.

@marticliment marticliment reopened this Oct 3, 2022
@marticliment
Copy link
Owner

Also, what do you think about adding to the readme a guide to help other newbies like me build WingetUI?

yeah, definitely. Do you have rights to edit the wiki?

@ppvnf
Copy link
Contributor Author

ppvnf commented Oct 3, 2022

@martinet101, I believe this issue has only been partially fixed. Icons/Winget packages are still missing.

Edit: after running python pywin32_postinstall.py -install and installing the Winget version of Python instead of the MS Store one I am able to successfully build and launch WingetUI through build.bat!

However launching through python __init__.py still doesn't display icons and Winget packages are missing:

PS D:\Users\PICHAU\Downloads\WingetUI-main(1)\WingetUI-main\wingetui> python __init__.py
Win32Mica Error: win32 version 19044 is not supported
Unknown option "darkmode=0"
O sistema não pode encontrar o caminho especificado.
O sistema não pode encontrar o caminho especificado.
O sistema não pode encontrar o caminho especificado.
b'O sistema n\xc6o pode encontrar o caminho especificado.'
O sistema no pode encontrar o caminho especificado.
b'O sistema n\xc6o pode encontrar o caminho especificado.'
O sistema no pode encontrar o caminho especificado.

It doesn't really matters to me personally since I am able to use "build.bat", but if you wish I can try other things to see if we can get this completely fixed.

Also, what do you think about adding to the readme a guide to help other newbies like me build WingetUI?

yeah, definitely. Do you have rights to edit the wiki?

I can edit it on my fork. I will tell you when I am finished so you can add it 😀. And please let this issue open to make it easier to remember doing that.

@ppvnf ppvnf changed the title Error when building WingetUI Error when building WingetUI / Create wiki Oct 3, 2022
@marticliment marticliment reopened this Oct 3, 2022
@marticliment marticliment added the waiting-for-something This issue depends on something before we can resolve it label Oct 3, 2022
@ppvnf
Copy link
Contributor Author

ppvnf commented Oct 3, 2022

@martinet101 I've created the wiki https://github.com/ppvnf/WingetUI/wiki and also added a small FAQ

@marticliment
Copy link
Owner

Wow thank you!

Can you please pullrequest to the repo so you can get the credits of the wiki?

@ppvnf
Copy link
Contributor Author

ppvnf commented Oct 3, 2022

Wow thank you!

Can you please pullrequest to the repo so you can get the credits of the wiki?

Sure!

#191

@ppvnf
Copy link
Contributor Author

ppvnf commented Oct 4, 2022

Thanks for creating the wiki. I am unable to modify it though

@marticliment
Copy link
Owner

Can you edit it now?

@ppvnf
Copy link
Contributor Author

ppvnf commented Oct 4, 2022

Can you edit it now?

yes!

@ppvnf ppvnf changed the title Error when building WingetUI / Create wiki Error when building WingetUI Oct 5, 2022
@ppvnf
Copy link
Contributor Author

ppvnf commented Oct 5, 2022

Should I close this issue, since I am now able to build WingetU using build.bat? I don't think it matters much, but running python __init__.py still doesn't display icons and build.bat isn't generating an .exe file...

@marticliment
Copy link
Owner

build.bat isn't generating an .exe file

this is expected, it generates a folder with the executable and its requirements

@marticliment
Copy link
Owner

Should I close this issue [...]?

I guess so

@marticliment marticliment closed this as not planned Won't fix, can't repro, duplicate, stale Oct 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
waiting-for-something This issue depends on something before we can resolve it
Projects
None yet
Development

No branches or pull requests

2 participants