bartok765/galaxy_blizzard_plugin

TypeError: __init__() takes from 2 to 6 positional arguments but 7 were given

Closed this issue · 3 comments

From logs given by @micpp42 in #50

Traceback (most recent call last):
  File "C:\Users\micpp\AppData\Local\GOG.com\Galaxy\plugins\installed\battlenet_ba170431-0649-482f-863b-d248592f1842\galaxy\task_manager.py", line 21, in task_wrapper
    result = await coro
  File "C:\Users\micpp\AppData\Local\GOG.com\Galaxy\plugins\installed\battlenet_ba170431-0649-482f-863b-d248592f1842\local_client_base.py", line 214, in register_local_data_watcher
    if not self._load_local_files():
  File "C:\Users\micpp\AppData\Local\GOG.com\Galaxy\plugins\installed\battlenet_ba170431-0649-482f-863b-d248592f1842\local_client_base.py", line 159, in _load_local_files
    self.database_parser = DatabaseParser(product_db)
  File "C:\Users\micpp\AppData\Local\GOG.com\Galaxy\plugins\installed\battlenet_ba170431-0649-482f-863b-d248592f1842\parsers.py", line 60, in __init__
    self.parse()
  File "C:\Users\micpp\AppData\Local\GOG.com\Galaxy\plugins\installed\battlenet_ba170431-0649-482f-863b-d248592f1842\parsers.py", line 94, in parse
    self.products[ngdp_code] = ProductDbInfo(uninstall_tag, ngdp_code, install_path, version, playable, installed)
TypeError: __init__() takes from 2 to 6 positional arguments but 7 were given

For debuging add this

            def lg(val):
                log.debug(f'{val}, of type: {type(val)}')
            lg(ngdp_code) 
            lg(uninstall_tag) 
            lg(install_path) 
            lg(version) 
            lg(playable) 
            lg(installed) 

before
self.products[ngdp_code] = ProductDbInfo(uninstall_tag, ngdp_code, install_path, version, playable, installed)
in parsers.py

Hi, I think this one is my fault - when I was initially trying to test the pull request I just grabbed the copy of definitions.py from the pull request, but it looks like the version that I got when I clicked "view file" has an extra difference in that it's missing the installed parameter of the ProductDbInfo class - although this doesn't show up in the comparison. I think you can write this up to "user is easily confused by github"

Ah I see, no worries, I'm closing :)