Closed david-natingga-frequenz closed 7 months ago
Could you please share a reproducible example?
The following code if run from the root of the repository can reproduce the error:
import grpc
import datetime
from google.protobuf import timestamp_pb2
from frequenz.api.weather import weather_pb2_grpc, weather_pb2
from frequenz.api.common.pagination import pagination_params_pb2
svc_addr = 'localhost:50051'
def get_historical_weather_forecast():
channel = grpc.insecure_channel(svc_addr)
stub = weather_pb2_grpc.WeatherForecastServiceStub(channel)
now = datetime.datetime.utcnow()
start_ts = timestamp_pb2.Timestamp()
start_ts.FromDatetime(now)
end_ts = timestamp_pb2.Timestamp()
end_ts.FromDatetime(now)
pagination_params = pagination_params_pb2.PaginationParams()
request = weather_pb2.GetHistoricalWeatherForecastRequest(
start_ts = start_ts,
end_ts = end_ts,
pagination_params = pagination_params
)
response = stub.GetHistoricalWeatherForecast(request)
print("Response:", response)
if __name__ == '__main__':
get_historical_weather_forecast()
After speaking with David, this is likely an issue on the server side and we decided to track it there.
What happened?
I made a sample query to the Weather API server and I got the following error message:
This is not very informative. For example why was the streaming cancelled/closed? In general we should have more informative error messages to facilitate more efficient debugging. This is especially true if the Weather API should be used by external parties.
What did you expect instead?
The error message should tell me the exact problem.
Affected version(s)
No response
Affected part(s)
I don't know (part:❓)
Extra information
No response