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

raster extension and trouble opening the test data #383

Closed
schwehr opened this issue Jun 1, 2021 · 6 comments
Closed

raster extension and trouble opening the test data #383

schwehr opened this issue Jun 1, 2021 · 6 comments
Labels
bug Things which are broken
Milestone

Comments

@schwehr
Copy link
Collaborator

schwehr commented Jun 1, 2021

This is in a custom bazel based build on a non-public linux distribution, so there could be compounding issues. It's using this python:

sys.version_info(major=3, minor=6, micro=13, releaselevel='final', serial=0)

I'm sometimes seeing a failure from this string from

"unit": "W⋅sr−1⋅m−2⋅nm−1",

          "unit": "W⋅sr−1⋅m−2⋅nm−1",

But running in two different environments I get different results. locally it works. But in an isolated test CI forge it fails.

This is the failure:

=================================== FAILURES ===================================
_______________________ RasterTest.test_validate_raster ________________________

self = <pystac.tests.extensions.test_raster.RasterTest testMethod=test_validate_raster>

    def test_validate_raster(self) -> None:
>       item = pystac.read_file(self.PLANET_EXAMPLE_URI)

tests/extensions/test_raster.py:38: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
__init__.py:89: in read_file
    return STACObject.from_file(href)
stac_object.py:477: in from_file
    o = stac_io.read_stac_object(href)
stac_io.py:137: in read_stac_object
    d = self.read_json(source)
stac_io.py:116: in read_json
    txt = self.read_text(source)
stac_io.py:180: in read_text
    return self.read_text_from_href(href, *args, **kwargs)
stac_io.py:192: in read_text_from_href
    return f.read()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <encodings.ascii.IncrementalDecoder object at 0x7f412b4d1eb8>
input = b'{\n  "stac_extensions": [\n    "https://stac-extensions.github.io/sat/v1.0.0/schema.json",\n    "https://stac-extens...id": 857\n  },\n  "bbox": [\n    119.749003733,\n    -0.902255498348,\n    119.990422256,\n    -0.782842043003\n  ]\n}'
final = True

    def decode(self, input, final=False):
>       return codecs.ascii_decode(input, self.errors)[0]
E       UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 1417: ordinal not in range(128)

<embedded stdlib>/encodings/ascii.py:26: UnicodeDecodeError
@duckontheweb
Copy link
Contributor

duckontheweb commented Jun 1, 2021

@schwehr I think this maywill be fixed by #361. I was seeing similar problems in the Windows CI builds that were related to the fact that Windows doesn't use UTF-8 as the default encoding. In that PR I added explicit encoding="utf-8" arguments to all of the open calls for reading and writing.

@duckontheweb duckontheweb added the bug Things which are broken label Jun 1, 2021
@duckontheweb duckontheweb modified the milestones: 1.0.0-beta.3, 1.0.0-rc.1 Jun 1, 2021
@duckontheweb
Copy link
Contributor

@schwehr Have you been able to verify if #361 fixes this?

@schwehr
Copy link
Collaborator Author

schwehr commented Jun 8, 2021

I think so, but not 100% sure. I'm part way through catching up to upstream head. I should be able to check later today or tomorrow.

@duckontheweb
Copy link
Contributor

Sorry to bug you again @schwehr, but I'm wondering if we can close this.

@schwehr
Copy link
Collaborator Author

schwehr commented Jun 16, 2021

Yes. We can close it. Sorry I didn't follow up sooner

@duckontheweb
Copy link
Contributor

Closed via #361

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Things which are broken
Projects
None yet
Development

No branches or pull requests

2 participants