January 16, 2019, 5:06pm
I following this tutorial
https://sentinelhub-py.readthedocs.io/en/latest/examples/ogc_request.html#Web-Map-Service-(WMS)-and-Web-Coverage-Service-(WCS) but when I get to step 9 (wms_true_color_img = wms_true_color_request.get_data()) the get_data function gets an error within “dowload.py”,
~/.virtualenvs/sentinel/lib/python3.7/site-packages/sentinelhub/download.py in decode_image(data, image_type)
448 image = np.asarray(Image.open(bytes_data))
–> 449 image.setflags(write=1) ## #Flag Changed
451 if image_type is MimeType.JP2:
ValueError: cannot set WRITEABLE flag to True of this array
I manage a workarroung setting in line 449 write=0. But I guess there must be something else.
I am running Mac OS 10.13.6
January 18, 2019, 11:51am
the problem is in the latest version of
1.16.0. They have changed something with flag handling and now this is causing problems in
For now a solution would also be to downgrade
numpy to e.g. version
1.15.4. We will make the changes in sentinelhub-py and release a new version soon.
Thanks for reporting the problem.
January 18, 2019, 1:57pm
Thank you very much for the answer.
I will be waiting the new release.
Is there a bounty for this?
To solve the problem of WRITEABLE flag ,do we have to downgrade only numpy package or any other package also?
February 7, 2019, 3:44pm
sentinelhub-py has been released last week. In this version the problem with newest
numpy version has been solved. Therefore upgrading
sentinelhub-py should be the solution.
By the way, lately new versions of multiple other commonly used Python packages were released. Some of them as a response to the changes in
numpy. Therefore upgrading all dependency packages might be a good idea.
Let us know if you will still have any problems.