-
Notifications
You must be signed in to change notification settings - Fork 4
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
NO2, SPM and RPM don't load #490
Comments
NO2The issue is coming from the tiles under the Am I correct in saying that the idea behind the "Compare" tiles is to compare a given N02 tile with the 5 year average for that month (ie: 202001 should be compared with the If that's the case we need to figure out a way for the frontend to be able to request something like Taking the url you posted, replacing SPMI'm seeing errors in the console when loading SPM, but the actual dataset seems to be loading: @olafveerman is the above image correct? Or should there be more data loaded into the view? My suspicion for the error messages in the console is that if the zoom level is high enough it will query tiles that are within the view of the map, but not within the tile itself, which causes a (harmless) error message in the console. @drewbo is this correct? If so, is there a way to squash these errors? RPMThis one is weird! When I load the production dashboard and request RPM over SF The "Preview" tab of the console shows data: However the "Response" tab shows: I'm not 100% sure about what this might be. Perhaps an incorrect mimetype? |
Yes (to plenty of error messages on missing tiles, should be harmless). There should be a |
@drewbo if you are not using mosaic, TileOutsideBounds should be raised by default for from typing import Callable, Dict, Type
from rio_tiler.errors import TileOutsideBounds
from starlette import status
from starlette.requests import Request
from starlette.responses import JSONResponse
from fastapi import FastAPI
DEFAULT_STATUS_CODES = {
TileOutsideBounds: status.HTTP_404_NOT_FOUND,
Exception: status.HTTP_500_INTERNAL_SERVER_ERROR,
}
def exception_handler_factory(status_code: int) -> Callable:
"""
Create a FastAPI exception handler from a status code.
"""
def handler(request: Request, exc: Exception):
logger.error(exc, exc_info=True)
return JSONResponse(content={"detail": str(exc)}, status_code=status_code)
return handler
def add_exception_handlers(
app: FastAPI, status_codes: Dict[Type[Exception], int]
) -> None:
"""
Add exception handlers to the FastAPI app.
"""
for (exc, code) in status_codes.items():
app.add_exception_handler(exc, exception_handler_factory(code))
add_exception_handlers(app, DEFAULT_STATUS_CODES) ref: |
Cool, thanks @leothomas . NO2Split the NO2 compare bug into a separate issue ^. SPMRegarding SPM. I should have been more clear. This is the Slowdown Proxy Map, not turbidity (confusingly, both products have the same acronym: Suspended Particulate Matter) |
Ahh! Should have caught that. I'll take a quick look. I suspect it will be the same issue as with recovery |
The slowdown tifs for la ( @olafveerman Do you know what those other files correspond to? It looks like the filename of the one I posted contains 4 days, each spaced by 30 days) |
Still pushing on the RPM / SPM not showing up in the front end. Tiles load from the API and don't raise errors in the "Network Tab" of the developer's console. eg: rpm example, spm example, yet they don't show up in the map view. I'm inclined to say that the front end may be mis-handling these files. @danielfdsilva @ricardoduplos any thoughts? |
@leothomas Got it. The API response for NO2, SPM and RPM contains:
Which explains why they don't error, but also don't show up. |
This was fixed in the latest release of the API. |
The NO2, SPM and RPM products are not loading in production.
May this be related to the
raster-opacity
fix we did earlier today?Frontend breaks with:
Error: Failed to fetch
API call results in an Internal Server Error:
https://8ib71h0627.execute-api.us-east-1.amazonaws.com/v1/4/7/9@1x?url=s3://covid-eo-data/OMNO2d_HRMBaseline/OMI_trno2_0.10x0.10_Baseline_201507_Col3_V4.nc.tif&esampling_method=bilinear&bidx=1&rescale=0%2C1.5e16&color_map=custom_no2&color_formula=gamma%20r%201.05
The text was updated successfully, but these errors were encountered: