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

python scripts/create_expected.py doesn't work #176

Open
m-mohr opened this issue May 28, 2024 · 1 comment
Open

python scripts/create_expected.py doesn't work #176

m-mohr opened this issue May 28, 2024 · 1 comment

Comments

@m-mohr
Copy link

m-mohr commented May 28, 2024

If I run python scripts/create_expected.py on main right now I get an error:

/mnt/c/Dev/stactools-sentinel2/tests/data-files/esa_S2B_MSIL2A_20210122T133229_N0214_R081_T22HBD_20210122T155500.SAFE
/home/mm/.local/lib/python3.10/site-packages/antimeridian/_implementation.py:391: FixWindingWarning: The exterior ring of this shape is wound clockwise. Since this is a common error in real-world geometries, this package is reversing the exterior coordinates of the input shape before running its algorithm. If you know that your input shape is correct (i.e. if your data encompasses both poles), pass `fix_winding=False`.
  FixWindingWarning.warn()
Traceback (most recent call last):
  File "/mnt/c/Dev/stactools-sentinel2/scripts/create_expected.py", line 30, in <module>
    item.save_object(include_self_link=False)
  File "/home/mm/.local/lib/python3.10/site-packages/pystac/stac_object.py", line 469, in save_object
    stac_io.save_json(dest_href, self.to_dict(include_self_link=include_self_link))
  File "/home/mm/.local/lib/python3.10/site-packages/pystac/stac_io.py", line 259, in save_json
    txt = self.json_dumps(json_dict, *args, **kwargs)
  File "/home/mm/.local/lib/python3.10/site-packages/pystac/stac_io.py", line 127, in json_dumps
    return orjson.dumps(json_dict, option=orjson.OPT_INDENT_2, **kwargs).decode(
TypeError: Type is not JSON serializable: numpy.float64

Ubuntu, Python 3.10.12, PySTAC 1.10.1, current main branch

@m-mohr m-mohr changed the title python scripts/create_expected.py doesn# python scripts/create_expected.py doesn't work May 28, 2024
@m-mohr
Copy link
Author

m-mohr commented May 29, 2024

On windows I don't get this error, instead it can't determine resolution for C:\Dev\stactools-sentinel2\tests\data-files\S2A_OPER_MSI_L1C_TL_SGS__20181231T203637_A018414_T10SDG\B01.jp2

m-mohr added a commit to m-mohr/stactools-sentinel2 that referenced this issue May 29, 2024
m-mohr added a commit to m-mohr/stactools-sentinel2 that referenced this issue May 29, 2024
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

1 participant