#python ssl issues

1 messages · Page 1 of 1 (latest)

wary saffron
#

I've tried to use one of the sample python pipelines, and running it with the dagger cli works perfect:

$ dagger run python dagger_workshop/pipeline/docker_dagger_pipeline_verification.py
┣─╮ 
│ ▽ init
...
█◀──╯ [0.19s] exec python -V
┃     Python 3.11.4                                                                                                                                                                                         
┻     
• Engine: fe1bcbb9eaff (version v0.9.3)
⧗ 7.73s ✔ 12

However, starting it directly from the python interpreter does not work:

ph03n1x_sandbox$ python dagger_workshop/pipeline/docker_dagger_pipeline_verification.py 
Traceback (most recent call last):
  File "/home/z0214545/Git/ph03n1x_sandbox/dagger_workshop/.venv/lib/python3.10/site-packages/httpcore/_exceptions.py", line 10, in map_exceptions
    yield
  File "/home/z0214545/Git/ph03n1x_sandbox/dagger_workshop/.venv/lib/python3.10/site-packages/httpcore/_backends/sync.py", line 168, in start_tls
    raise exc

...

  File "/home/z0214545/Git/ph03n1x_sandbox/dagger_workshop/.venv/lib/python3.10/site-packages/dagger/_engine/download.py", line 191, in _download
    raise dagger.DownloadError(msg) from e
dagger.DownloadError: Failed to download the Dagger CLI: Failed to download checksums from https://dl.dagger.io/dagger/releases/0.9.3/checksums.txt: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify 
failed: self-signed certificate in certificate chain (_ssl.c:1007)

Of course, the dagger sdk is installed in the environment:

(dagger-workshop-py3.10) $ pip list | grep -i dagger
dagger-io                  0.9.3

[notice] A new release of pip is available: 23.2.1 -> 23.3.1
[notice] To update, run: pip install --upgrade pip

Any idea, what I might miss?

sharp citrus
#

hey @wary saffron I think the issue is that dagger run python and pyhon is effectively picking up two different python versions

#

I see that your dagge run python prints 3.11 and your python stand-alone execution shows using 3.10 packages

#

maybe you have an older pythom 3.10 version that might have some SSL issues?

wary saffron
#

It uses in both cases the same venv and the same python version. I think you saw the image which is used inside the pipeline, which is an alpine with python 3.11 isntalled. But that has nothing to do with my "local" instance.

wary saffron
#

I figured it out. The problem is, that python uses its own certificate place and there the newest certificates have been missing. After fixing that, it also works from python directly now.