Describe the bug
Error seen from openapi-spec-validator which depends on jsonschema package when opening any WFS3 (OAPIF) Resource.
Screenshots or Logfiles
2020-09-29 11:50:06,955 - factory - ERROR - cannot create class 'GeoHealthCheck.plugins.probe.wfs3.WFS3OpenAPIValidator'
2020-09-29 11:50:06,956 - factory - ERROR - cannot create object instance from class 'GeoHealthCheck.plugins.probe.wfs3.WFS3OpenAPIValidator' e=open: path should be string, bytes or os.PathLike, not _NormalAccessor
2020-09-29 11:50:06,957 - init - ERROR - Exception on /resource/165 [GET]
Traceback (most recent call last):
File "/venv/lib/python3.7/site-packages/jsonschema/__init__.py", line 31, in <module>
from importlib import metadata
ImportError: cannot import name 'metadata' from 'importlib' (/usr/local/lib/python3.7/importlib/__init__.py)
Context (please complete the following information):
OS: Alpine 10
Python Version 3.7.4
GeoHealthCheck Version master on sept 29 2020 in Docker Image
Additional context
This was due to a silent upgrade when Docker Image was rebuilt. (Hint: we should pin ALL packages to have reproducible builds, from pip freeze).
Describe the bug Error seen from
openapi-spec-validator
which depends onjsonschema
package when opening any WFS3 (OAPIF) Resource.Screenshots or Logfiles
Context (please complete the following information):
Additional context This was due to a silent upgrade when Docker Image was rebuilt. (Hint: we should pin ALL packages to have reproducible builds, from
pip freeze
).Solution is here (for now) downgrade/pin
jsonschema
package: https://stackoverflow.com/questions/59216175/importerror-cannot-import-name-metadata-from-importlib so downgradejsonschema
3.2.0 (default) tojsonschema==3.0.2