You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm attempting to use the requests module to make a HTTPS request to the internet from Python. It seems like the SSL module is not bundled when using the package command.
Package Command: dart run serious_python:main package --requirements=requests --platform Darwin ./python/
When the app runs, this error appears:
Even after allowing it in Privacy Settings, it will appear whenever app runs.
The Debug Console shows the following:
Launching lib/main.dart on macOS in debug mode...
--- xcodebuild: WARNING: Using the first of multiple matching destinations:
{ platform:macOS, arch:arm64, id:00006000-000405541E91801E, name:My Mac }
{ platform:macOS, arch:x86_64, id:00006000-000405541E91801E, name:My Mac }
✓ Built build/macos/Build/Products/Debug/Luvbi.app
2024-11-16 12:33:37.758 Luvbi[6273:3897556] +[IMKClient subclass]: chose IMKClient_Modern
2024-11-16 12:33:37.758 Luvbi[6273:3897556] +[IMKInputSession subclass]: chose IMKInputSession_Modern
Connecting to VM Service at ws://127.0.0.1:55609/nFVjc29X4X4=/ws
Connected to the VM Service.
flutter: extractAssetOrFile directory: /Users/jyodann/Library/Containers/com.example.luvbiGui/Data/Library/Application Support/com.example.luvbiGui/flet/app
flutter: Start unpacking archive: app/app.zip
flutter: Finished unpacking application archive in 0:00:00.376002
2024-11-16 12:33:40.284 Luvbi[6273:3897556] Swift runPython(appPath: /Users/jyodann/Library/Containers/com.example.luvbiGui/Data/Library/Application Support/com.example.luvbiGui/flet/app/main.py, modulePaths: [])
/Users/jyodann/Library/Containers/com.example.luvbiGui/Data/Library/Application Support/com.example.luvbiGui/flet/app/__pypackages__/requests/__init__.py:86: RequestsDependencyWarning: Unable to find acceptable character detection dependency (chardet or charset_normalizer).
warnings.warn(
Traceback (most recent call last):
File "/Users/jyodann/Library/Containers/com.example.luvbiGui/Data/Library/Application Support/com.example.luvbiGui/flet/app/main.py", line 3, in <module>
requests.get("https://youtube.com");
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/jyodann/Library/Containers/com.example.luvbiGui/Data/Library/Application Support/com.example.luvbiGui/flet/app/__pypackages__/requests/api.py", line 73, in get
return request("get", url, params=params, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/jyodann/Library/Containers/com.example.luvbiGui/Data/Library/Application Support/com.example.luvbiGui/flet/app/__pypackages__/requests/api.py", line 59, in request
return session.request(method=method, url=url, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/jyodann/Library/Containers/com.example.luvbiGui/Data/Library/Application Support/com.example.luvbiGui/flet/app/__pypackages__/requests/sessions.py", line 589, in request
resp = self.send(prep, **send_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/jyodann/Library/Containers/com.example.luvbiGui/Data/Library/Application Support/com.example.luvbiGui/flet/app/__pypackages__/requests/sessions.py", line 703, in send
r = adapter.send(request, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/jyodann/Library/Containers/com.example.luvbiGui/Data/Library/Application Support/com.example.luvbiGui/flet/app/__pypackages__/requests/adapters.py", line 667, in send
resp = conn.urlopen(
^^^^^^^^^^^^^
File "/Users/jyodann/Library/Containers/com.example.luvbiGui/Data/Library/Application Support/com.example.luvbiGui/flet/app/__pypackages__/urllib3/connectionpool.py", line 768, in urlopen
conn = self._get_conn(timeout=pool_timeout)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/jyodann/Library/Containers/com.example.luvbiGui/Data/Library/Application Support/com.example.luvbiGui/flet/app/__pypackages__/urllib3/connectionpool.py", line 294, in _get_conn
return conn or self._new_conn()
^^^^^^^^^^^^^^^^
File "/Users/jyodann/Library/Containers/com.example.luvbiGui/Data/Library/Application Support/com.example.luvbiGui/flet/app/__pypackages__/urllib3/connectionpool.py", line 1059, in _new_conn
raise ImportError(
ImportError: Can't connect to HTTPS URL because the SSL module is not available.
Python program completed with error.
The text was updated successfully, but these errors were encountered:
I'm attempting to use the
requests
module to make a HTTPS request to the internet from Python. It seems like the SSL module is not bundled when using the package command.Steps to reproduce:
main.py
Package Command:
dart run serious_python:main package --requirements=requests --platform Darwin ./python/
When the app runs, this error appears:
Even after allowing it in Privacy Settings, it will appear whenever app runs.
The Debug Console shows the following:
The text was updated successfully, but these errors were encountered: