dh1tw / pyhamtools

A Library with Amateur Radio specific Functions and Methods
MIT License
89 stars 25 forks source link

callsign checkup against data bases - init fails #10

Closed mike-hb closed 7 years ago

mike-hb commented 7 years ago

I use the last github with the following errors Python 3.6.1 (default, Mar 23 2017, 13:04:44) [GCC] on linux Type "help", "copyright", "credits" or "license" for more information.

from pyhamtools import LookupLib, Callinfo my_lookuplib = LookupLib(lookuptype="clublogxml") Traceback (most recent call last): File "", line 1, in File "/usr/lib/python3.6/site-packages/pyhamtools/lookuplib.py", line 106, in init self._load_clublogXML(apikey=self._apikey, cty_file=self._lib_filename) File "/usr/lib/python3.6/site-packages/pyhamtools/lookuplib.py", line 954, in _load_clublogXML apikey = apikey) File "/usr/lib/python3.6/site-packages/pyhamtools/lookuplib.py", line 1025, in _download_file if not self._check_html_response(response): File "/usr/lib/python3.6/site-packages/pyhamtools/lookuplib.py", line 1437, in _check_html_response raise APIKeyMissingError pyhamtools.exceptions.APIKeyMissingError

or Python 3.6.1 (default, Mar 23 2017, 13:04:44) [GCC] on linux Type "help", "copyright", "credits" or "license" for more information.

from pyhamtools import LookupLib, Callinfo my_lookuplib = LookupLib(lookuptype="countryfile") Traceback (most recent call last): File "", line 1, in File "/usr/lib/python3.6/site-packages/pyhamtools/lookuplib.py", line 108, in init self._load_countryfile(cty_file=self._lib_filename) File "/usr/lib/python3.6/site-packages/pyhamtools/lookuplib.py", line 995, in _load_countryfile cty_file = self._download_file(url=url) File "/usr/lib/python3.6/site-packages/pyhamtools/lookuplib.py", line 1047, in _download_file download_file.write(response.content) TypeError: write() argument must be str, not bytes

dh1tw commented 7 years ago

Sorry, Pyhamtools is currently only compatible with python 2

mike-hb commented 7 years ago

Thanks for quick reply