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

Failing Docker image due to SHA256 mismatch on 'no_kv_README.txt' with 'pyproj sync --all' step #1226

Closed
anaprietonem opened this issue Jan 4, 2023 · 4 comments
Labels
bug proj Bug or issue related to PROJ

Comments

@anaprietonem
Copy link

I have a docker image where I am installing a set of python libraries. It was working fine, but just before Christmas it started to fail. Right now, the build is broken due to an error at the last step:

RUN pyproj sync --all

See below the exact reported error:

#20 [python-build 14/15] RUN pyproj sync --all
#20 28.38 Traceback (most recent call last):
#20 28.38   File "/app/.venv/bin/pyproj", line 8, in <module>
#20 28.38     sys.exit(main())
#20 28.38   File "/app/.venv/lib/python3.8/site-packages/pyproj/__main__.py", line 201, in main
#20 28.38     _parse_sync_command(args)
#20 28.38   File "/app/.venv/lib/python3.8/site-packages/pyproj/__main__.py", line 186, in _parse_sync_command
#20 28.38     _download_resource_file(
#20 28.38   File "/app/.venv/lib/python3.8/site-packages/pyproj/sync.py", line 181, in _download_resource_file
#20 28.38     raise RuntimeError(f"SHA256 mismatch: {short_name}")
#20 28.38 RuntimeError: SHA256 mismatch: no_kv_README.txt
#20 ERROR: executor failed running [/bin/sh -c pyproj sync --all]: exit code: 1
------
 > [python-build 14/15] RUN pyproj sync --all:
#20 28.38 Traceback (most recent call last):
#20 28.38   File "/app/.venv/bin/pyproj", line 8, in <module>
#20 28.38     sys.exit(main())
#20 28.38   File "/app/.venv/lib/python3.8/site-packages/pyproj/__main__.py", line 201, in main
#20 28.38     _parse_sync_command(args)
#20 28.38   File "/app/.venv/lib/python3.8/site-packages/pyproj/__main__.py", line 186, in _parse_sync_command
#20 28.38     _download_resource_file(
#20 28.38   File "/app/.venv/lib/python3.8/site-packages/pyproj/sync.py", line 181, in _download_resource_file
#20 28.38     raise RuntimeError(f"SHA256 mismatch: {short_name}")
#20 28.38 RuntimeError: SHA256 mismatch: no_kv_README.txt
------
ERROR: failed to solve: executor failed running [/bin/sh -c pyproj sync --all]: exit code: 1
Error: Process completed with exit code 1.

Pyrpoj is installed in the Dockerfile via poetry ( poetry 1.2.1) and the version of pyproj installed is the following:

poetry show pyproj
 name         : pyproj                                                                                     
 version      : 3.4.0                                                                                      
 description  : Python interface to PROJ (cartographic projections and coordinate transformations library) 

dependencies
 - certifi *

required by
 - geopandas >=2.6.1.post1
 - rioxarray >=2.2
 - stackstac >=3.0.0,<4.0.0

Doing some local checks, the file that is causing trouble seems to have a different sha256 from the one located in the public aws s3 bucket gives.

wget https://cdn.proj.org/no_kv_README.txt
# openssl sha256 no_kv_README.txt
SHA256(no_kv_README.txt)= 001f49df6ee612eb586a1877385222ed837054f046ac639eeace38daa29705ba

whereas from python environment gives:

from pyproj.sync import get_transform_grid_list
>>> get_transform_grid_list(filename="no_kv_README.txt")
({'type': 'Feature', 'properties': {'url': 'https://cdn.proj.org/no_kv_README.txt', 'name': 'no_kv_README.txt', 'source': 'Kartverket (SK)', 'source_country': 'Norway', 'source_id': 'no_kv', 'source_url': 'https://www.kartverket.no/', 'file_size': 3554, 'sha256sum': '184820eca7f1704bab55aef3cc19e24dbd9c030ae25cddff9591f48e54e7f24e'}, 'geometry': None},)

Would appreciate some help to know how to solve this, thanks in advance! 🙏

@snowman2
Copy link
Member

snowman2 commented Jan 4, 2023

Related: #1125, #1145

@snowman2 snowman2 added the proj Bug or issue related to PROJ label Jan 4, 2023
@snowman2
Copy link
Member

snowman2 commented Jan 4, 2023

May be worthwhile to raise an issue here: https://github.com/OSGeo/PROJ-data

@anaprietonem
Copy link
Author

Thanks for the help, after posting the issue in PROJ-data repo , the code is back to work fine!

@snowman2
Copy link
Member

snowman2 commented Jan 5, 2023

Thanks 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug proj Bug or issue related to PROJ
Projects
None yet
Development

No branches or pull requests

2 participants