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

v7.0.1 breaks info.minzoom #757

Closed
dfguerrerom opened this issue Oct 24, 2024 · 1 comment
Closed

v7.0.1 breaks info.minzoom #757

dfguerrerom opened this issue Oct 24, 2024 · 1 comment

Comments

@dfguerrerom
Copy link

I get this error when localtileserver tries to access to info.minzoom. I just updated to 7.0.1, 6.7.0 worked well.

sepal_ui/mapping/sepal_map.py:349: in add_raster
    self.zoom = client.default_zoom
.nox/test/lib/python3.9/site-packages/localtileserver/client.py:100: in default_zoom
    return self.min_zoom
.nox/test/lib/python3.9/site-packages/localtileserver/client.py:92: in min_zoom
    return self.info.minzoom
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = Info(bounds=(440720.0, 3750120.0, 441920.0, 3751320.0), crs='http://www.opengis.net/def/crs/EPSG/0/2[671](https://github.com/openforis/sepal_ui/actions/runs/11500551321/job/32019832582#step:5:672)1', band_metada...nterp=['gray'], scales=[1.0], offsets=[0.0], colormap=None, driver='GTiff', count=1, width=20, height=20, overviews=[])
item = 'minzoom'

    def __getattr__(self, item: str) -> Any:
        private_attributes = object.__getattribute__(self, '__private_attributes__')
        if item in private_attributes:
            attribute = private_attributes[item]
            if hasattr(attribute, '__get__'):
                return attribute.__get__(self, type(self))  # type: ignore
    
            try:
                # Note: self.__pydantic_private__ cannot be None if self.__private_attributes__ has items
                return self.__pydantic_private__[item]  # type: ignore
            except KeyError as exc:
                raise AttributeError(f'***type(self).__name__!r*** object has no attribute ***item!r***') from exc
        else:
            # `__pydantic_extra__` can fail to be set if the model is not yet fully initialized.
            # See `BaseModel.__repr_args__` for more details
            try:
                pydantic_extra = object.__getattribute__(self, '__pydantic_extra__')
            except AttributeError:
                pydantic_extra = None
    
            if pydantic_extra:
                try:
                    return pydantic_extra[item]
                except KeyError as exc:
>                   raise AttributeError(f'***type(self).__name__!r*** object has no attribute ***item!r***') from exc
E                   AttributeError: 'Info' object has no attribute 'minzoom'
@vincentsarago
Copy link
Member

Rio-tiler was updated to a new major version with some breaking changes

This should be resolved in localtileserver library

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

2 participants