bcgov / bcgov/wps

Pydantic model errors in percentile calculator

Open
#3,511 0 comments 0 reactions 0 assignees View on GitHub
Bug
Dominant language
Python
Stars
65
Forks
11
Avg merge
21h 25m
Merged PRs (30d)
70

Description

**Actual Behaviour**

Exception occurred POST /api/percentiles/
wps-prod-493-xjndj (34): 3 validation errors for StationSummary
ffmc
Input should be a valid number [type=float_type, input_value=None, input_type=NoneType]
For further information visit https://errors.pydantic.dev/2.6/v/float_type
isi
Input should be a valid number [type=float_type, input_value=None, input_type=NoneType]
For further information visit https://errors.pydantic.dev/2.6/v/float_type
bui
Input should be a valid number [type=float_type, input_value=None, input_type=NoneType]
For further information visit https://errors.pydantic.dev/2.6/v/float_type

**Steps To Reproduce**

1. Go to percentile calculator
2. Request data for any station
3. See error above

**Screenshots**

If applicable, add screenshots to help explain your problem.

**Expected Behaviour**

No error occurs

Contributor guide

Open the contributing guide

Research direction

Start at the /api/percentiles/ endpoint and inspect the StationSummary model, focusing on how ffmc, isi, and bui are populated for a station request. Reproduce the percentile calculator request and trace the returned values; done means the request completes without the reported Pydantic validation errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
fastapi, python
Domain
api, backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.