Skip to content

Commit

Permalink
NWS Observation: Read json data from bytes
Browse files Browse the repository at this point in the history
  • Loading branch information
gutzbenj committed Dec 29, 2023
1 parent 8a52f31 commit 379404c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Development
- IMGW Meteorology: Drop workaround for mixed up station list to fix issue
- WSV Hydrology: Fix issue with station list characteristic values
- DWD Observation: Remove redundant replace empty string in parser
- NWS Observation: Read json data from bytes

0.69.0 (18.12.2023)
*******************
Expand Down
2 changes: 1 addition & 1 deletion wetterdienst/provider/nws/observation/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ def _collect_station_parameter(self, station_id: str, parameter: Enum, dataset:
log.info(f"acquiring data from {url}")
response = download_file(url, settings=self.sr.stations.settings, ttl=CacheExpiry.FIVE_MINUTES)

data = json.loads(response.read())
data = json.load(response)

try:
data = [feature["properties"] for feature in data["features"]]
Expand Down

0 comments on commit 379404c

Please sign in to comment.