fraymio / modis-tools

Tools for working with the MODIS API and MODIS data.
Apache License 2.0
22 stars 11 forks source link

URL invalid, extra characters found after valid URL #38

Closed P-Paridhi closed 9 months ago

P-Paridhi commented 10 months ago

Describe the bug While downloading the product "MODISA_L3b_CHL", version "R2022.0" I encounter the error : URL invalid, extra characters found after valid URL.

To Reproduce I have used the following code.

from modis_tools.resources import CollectionApi, GranuleApi
from modis_tools.granule_handler import GranuleHandler

username = "secret"
password = "secret"

session = ModisSession(username=username, password=password)

collection_client = CollectionApi(session=session)
collections = collection_client.query(short_name="MODISA_L3b_CHL", version="R2022.0")

granule_client = GranuleApi.from_collection(collections[0], session=session)

india_bbox = [55.00, 5.00, 105.00, 45.00]
india_granules = granule_client.query(start_date="2020-01-01", end_date="2020-02-01", bounding_box=india_bbox)

GranuleHandler.download_from_granules(india_granules, session)

Expected behavior and actual behavior I expected to download MODISA_L3b_CHL tiles. However, the following exception occurred: image

Desktop (please complete the following information):

Your Environment:

P-Paridhi commented 10 months ago

PLease reply back, it's urgent. @jtanwk , @ShengpeiWang, @EChebelyon

iamchrisearle commented 10 months ago

@P-Paridhi Thanks for opening this issue, I am confirming the same behavior on my end. We're still working on a fix, and hope to have something out soon.

P-Paridhi commented 10 months ago

@cearlefraym Thank you for responding back! Waiting for the solution to the problem.

mylesstokowski commented 9 months ago

@P-Paridhi we've pushed a fix to PyPI. Please install the latest modis-tools version (1.1.3), and your error should be resolved

P-Paridhi commented 9 months ago

@mylesstokowski, @cearlefraym Thank you for the swift resolution! I've installed modis-tools v1.1.3, and the issue is now resolved.