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

ImportError: Can't connect to HTTPS URL because the SSL module is not available. #4

Closed
VincentW2 opened this issue Sep 18, 2023 · 9 comments

Comments

@VincentW2
Copy link

VincentW2 commented Sep 18, 2023

Hello,
When trying to run the compiled python exe, it gives me an error:

C:\Users\vboxuser\Downloads\ms-store-downloader>ms-store-downloader.exe
Please select language:
1 English
2 简体中文
3 Français
4 日本語
5 Deutsch
6 Español
1
--------------------------------------
Script Name: LTSC Microsoft Store Latest Version Download Script
GitHub Repository: https://github.com/Goojoe/LTSC-ADD-Microsoft-Store
Author: Goojoe
--------------------------------------
Please select the architecture (enter a number):
1 arm
2 arm64
3 x64
4 x86
:3
Do you need to configure an HTTP proxy? (y/n):
:n
No proxy required
Request in progress, please wait. If it fails, try configuring the proxy.
Traceback (most recent call last):
  File "main.py", line 168, in <module>
  File "main.py", line 102, in download
  File "requests\api.py", line 115, in post
  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 486, in send
  File "urllib3\connectionpool.py", line 769, in urlopen
  File "urllib3\connectionpool.py", line 295, in _get_conn
  File "urllib3\connectionpool.py", line 1056, in _new_conn
ImportError: Can't connect to HTTPS URL because the SSL module is not available.
[2036] Failed to execute script 'main' due to unhandled exception!

C:\Users\vboxuser\Downloads\ms-store-downloader>

I installed python 3.11, installed requierments, and running the source script went fine and it worked. Just using the PyInstaller version does not.

@Goojoe
Copy link
Owner

Goojoe commented Sep 18, 2023

Thanks for your feedback, another user has also encountered this problem, I will no longer use pyinstaller and run it directly in a virtual environment

@bufce2010
Copy link

please allow me to thank you in this post.
appreciated :)

@VincentW2
Copy link
Author

VincentW2 commented Sep 18, 2023

@Goojoe tried out your 1.0.0 release this morning with another pc, and it gives me this error when running the bat file:

Traceback (most recent call last):
  File "C:\Users\vince\Downloads\ms-store-dl_v1.0.0\main.py", line 2, in <module>
    import pyperclip
ModuleNotFoundError: No module named 'pyperclip'
続行するには何かキーを押してください . . .

Unfortunately requirements.txt isnt included with the zip file, so i cant install it using just the release zip.


ah, now i installed python 3.11 on this computer and i have a different error.

image

"Libpython3.9 is missing, cannot execute code"

@Goojoe
Copy link
Owner

Goojoe commented Sep 19, 2023

Okay, I may know the reason, the dependent library may not support too new Python version

Traceback (most recent call last):
  File "C:\Users\vince\Downloads\ms-store-dl_v1.0.0\main.py", line 2, in <module>
    import pyperclip
ModuleNotFoundError: No module named 'pyperclip'
続行するには何かキーを押してください . . .

This problem may be that the virtual environment does not have the above modules installed.

@Goojoe
Copy link
Owner

Goojoe commented Sep 19, 2023

I need more detailed information to locate the problem:
Please tell me which version of the system you run each time
Running method: releases or install python yourself (specify the python version if so)
Finally give me the full running output
You said you ran errors from two computers, so please distinguish between them, I do not know which computer you first reported the error on

@VincentW2
Copy link
Author

VincentW2 commented Sep 19, 2023

I need more detailed information to locate the problem: Please tell me which version of the system you run each time Running method: releases or install python yourself (specify the python version if so) Finally give me the full running output You said you ran errors from two computers, so please distinguish between them, I do not know which computer you first reported the error on

Ok, the other computer was an unstable Vm, it was a bad computer to test on. Heres my main computer I tested it on. Fresh install.

### System Info:

C:\Users\べんせんと>systeminfo

ホスト名:               DESKTOP-MLD4S9L
OS 名:                  Microsoft Windows 10 IoT Enterprise LTSC
OS バージョン:          10.0.19044 N/A ビルド 19044

Python Version:

Python 3.11.5

Pip installed packages:

C:\Users\べんせんと>pip list
Package       Version
------------- ---------
Brotli        1.1.0
certifi       2023.7.22
mutagen       1.47.0
pip           23.2.1
pycryptodomex 3.19.0
setuptools    65.5.0
websockets    11.0.3
yt-dlp        2023.7.6

Error when running run.bat in the 1.0.0 releases zip:

Traceback (most recent call last):
  File "C:\Users\べんせんと\Downloads\ms-store-dl_v1.0.0\main.py", line 2, in <module>
    import pyperclip
ModuleNotFoundError: No module named 'pyperclip'
続行するには何かキーを押してください . . .

@Goojoe
Copy link
Owner

Goojoe commented Sep 20, 2023

Does venv/site-package have pyperclip?
Also you can try

call venv/Script/active
pip install pyperclip

@VincentW2
Copy link
Author

Does venv/site-package have pyperclip? Also you can try

call venv/Script/active
pip install pyperclip

venv/Lib/site-packages has pyperclip

Ok, when i do that command:

(venv) C:\Users\べんせんと\Downloads\ms-store-dl_v1.0.0>pip install pyperclip
Collecting pyperclip
  Downloading pyperclip-1.8.2.tar.gz (20 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: pyperclip
  Building wheel for pyperclip (pyproject.toml) ... done
  Created wheel for pyperclip: filename=pyperclip-1.8.2-py3-none-any.whl size=11136 sha256=c7464cba6365040ab1df9ecfb2b5065f5c624a71451f09b2dbb2455f810e6c5d
  Stored in directory: c:\users\べんせんと\appdata\local\pip\cache\wheels\70\bd\ba\8ae5c080c895c9360fe6e153acda2dee82527374467eae061b
Successfully built pyperclip
Installing collected packages: pyperclip
Successfully installed pyperclip-1.8.2

(venv) C:\Users\べんせんと\Downloads\ms-store-dl_v1.0.0>

And go to run run.bat:

Traceback (most recent call last):
  File "C:\Users\べんせんと\Downloads\ms-store-dl_v1.0.0\main.py", line 3, in <module>
    import requests
ModuleNotFoundError: No module named 'requests'
続行するには何かキーを押してください . . .

@Goojoe
Copy link
Owner

Goojoe commented Sep 20, 2023

I finally found the reason, I shouldn't use venv either, because everyone's environment is different, I will change the README and delete releases

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants