8000 add pvgis to iotools by mikofski · Pull Request #845 · pvlib/pvlib-python · GitHub
[go: up one dir, main page]

Skip to content

add pvgis to iotools #845

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

Merged
merged 20 commits into from
Jan 10, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
initialize data to None in case API fails to respond to bad outputformat
  • Loading branch information
mikofski committed Jan 9, 2020
commit 67eb6af891ecf75f79de53efe7c49e755f6bf17d
2 changes: 2 additions & 0 deletions pvlib/iotools/pvgis.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,8 @@ def get_pvgis_tmy(lat, lon, outputformat='json', usehorizon=True,
res.raise_for_status()
else:
raise requests.HTTPError(err_msg['message'])
# initialize data to None in case API fails to respond to bad outputformat
data = None, None, None, None
if outputformat == 'json':
src = res.json()
return _parse_pvgis_tmy_json(src)
Expand Down
0