andrewsomething / typecatcher

Download Google webfonts on the Linux desktop
GNU General Public License v3.0
88 stars 13 forks source link

fails to start in python 3.6 due to json.loads call #6

Closed Avinash-Bhat closed 7 years ago

Avinash-Bhat commented 7 years ago

json.loads should be called with named parameter for the second argument (encoding). Without this the load script fails with the error:

Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/typecatcher_lib/Application.py", line 30, in on_activate
    self.window = TypeCatcherWindow.TypeCatcherWindow()
  File "/usr/lib/python3.6/site-packages/typecatcher_lib/Window.py", line 49, in __new__
    new_object.finish_initializing(builder)
  File "/usr/lib/python3.6/site-packages/typecatcher/TypeCatcherWindow.py", line 43, in finish_initializing
    self.fonts = FindFonts()
  File "/usr/lib/python3.6/site-packages/typecatcher/FindFonts.py", line 27, in FindFonts
    fonts = process_json(data)
  File "/usr/lib/python3.6/site-packages/typecatcher/FindFonts.py", line 50, in process_json
    json_data = json.loads(data, "utf-8")
TypeError: loads() takes 1 positional argument but 2 were given
Avinash-Bhat commented 7 years ago

it seems that the encoding parameter even can be removed as it is deprecated

The other arguments have the same meaning as in load(), except encoding which is ignored and deprecated.