You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For now you have to have utils.py script in the same folder as the notebook that you are running. Then the import should work.
But I agree, it is confusing for users and we got the same question a few times in the past. As suggested, we could:
Short-term: add a comment into notebooks explaining where the utility function is being imported from. ✔️
Long-term: add plotting functions into sentinelhub-py package. It is already on our internal list of issues but it requires some work. At the moment, matplotlib is not a dependency of sentinelhub-py and we would like to keep it this way. But we can make it an optional dependency if we structure plotting utilities as a package extension.
I think it might make more sense to add the plotting to each notebook. This would make the notebooks more standalone, and perhaps the users more commonly download and run notebooks without cloning/downloading repos.
Also, not sure how much sense it makes to add the matplotlib dependency, unless we have some other plans on how to use it, i.e. automatic batch status plot generation.
What is the problem? Please describe.
I tried to follow the first example provided in the documentation https://sentinelhub-py.readthedocs.io/en/latest/examples/process_request.html#Imports and got stuck when trying to render the downloaded image - the example notebook references
utils.plot_image
which I have no idea how to get to.Here's the solution
?
Alternatives
plot_image
as part of the sentinelhub-py packageThe text was updated successfully, but these errors were encountered: