panodata / dwdweather2

Python client to access weather data from Deutscher Wetterdienst (DWD), the federal meteorological service in Germany.
https://community.panodata.org/t/dwdweather2-a-python-client-to-access-weather-data-from-deutscher-wetterdienst-dwd/98
MIT License
72 stars 13 forks source link

fix encoding error for windows #6

Closed Noordsestern closed 5 years ago

Noordsestern commented 5 years ago

On windows installation python may assume a limited encoding such as cp1252. That leads to encoding errors when installing on windows command line, because the README.rst is parsed which as a modern encoding.

This pull requests sets the encoding of the README.rst to UTF-8.

Be aware, that I set a new version 0.8.1, Check, if you want to accept that.

Noordsestern commented 5 years ago

This is supposed to fix #5

Noordsestern commented 5 years ago

Tested on my local machine with

pip install .
amotl commented 5 years ago

Dear @Noordsestern,

thanks for writing in and thanks for your contribution.

As that would croak on Python 2.x with

Traceback (most recent call last):
  File "setup.py", line 6, in <module>
    README = open(os.path.join(here, 'README.rst'), encoding='UTF-8').read()
TypeError: 'encoding' is an invalid keyword argument for this function

we improved that slightly to satisfy the installation on Python 2.x again by 1315d16a. Release 0.8.2 should be on PyPI already. Thanks again!

With kind regards, Andreas.


P.S.:

Be aware, that I set a new version 0.8.1, Check, if you want to accept that.

Better send pull requests without such version bumps as it is usually done by the upstream machinery in any way, often automagically after running through some build pipeline these days.