Skip to content

Commit

Permalink
Merge pull request #1 from wallejak/patch-1
Browse files Browse the repository at this point in the history
fix the "Invalid header value" error
  • Loading branch information
sshie authored Jan 28, 2019
2 parents 325b917 + d347c14 commit a04b0a3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion aerisweather/utils/AerisNetwork.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def get_json(url: str, app_id: str):
req = request.Request(url)
try:
req.add_header('Referer', app_id)
req.add_header('User-Agent', "AerisPythonSDK/" + __version__ + "/Python/" + sys.version)
req.add_header('User-Agent', "AerisPythonSDK/" + __version__ + "/Python/" + sys.version.replace('\n', ''))

except URLError:
# we don't need the extra headers, so let it pass if it fails here
Expand Down

0 comments on commit a04b0a3

Please sign in to comment.