NoMore201 / playmaker

Fdroid repository manager fetching apps from Play Store
285 stars 37 forks source link

search() takes 2 positional arguments but 4 were given #51

Open Jonny007-MKD opened 4 years ago

Jonny007-MKD commented 4 years ago

Since gpapi 0.4.4 GooglePlayAPI.search() only takes one argument (+self), but it is still called with 3 arguments by playmaker. 0.4.4 is installed by default by playmaker's setup.py

https://github.com/NoMore201/playmaker/blob/a97fd9e77ccfabc5f37af1ca93b7b9a3f2048503/playmaker/service.py#L266

https://github.com/NoMore201/googleplay-api/blob/fc0cc3a902b90247386331e9aa0ccc47d6ed7847/gpapi/googleplay.py#L349

ERROR:tornado.application:Uncaught exception GET /api/search?search=firefox (10.10.7.2)
HTTPServerRequest(protocol='https', host='playmaker.local', method='GET', uri='/api/search?search=firefox', version='HTTP/1.1', remote_ip='10.10.7.2', headers={...})
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/tornado/web.py", line 1512, in _execute
    result = yield result
  File "/usr/local/lib/python3.8/site-packages/tornado/gen.py", line 1055, in run
    value = future.result()
  File "/usr/local/lib/python3.8/site-packages/tornado/concurrent.py", line 238, in result
    raise_exc_info(self._exc_info)
  File "<string>", line 4, in raise_exc_info
  File "/usr/local/lib/python3.8/site-packages/tornado/gen.py", line 1063, in run
    yielded = self.gen.throw(*exc_info)
  File "/usr/local/lib/python3.8/site-packages/playmaker/server.py", line 76, in get
    apps = yield self.search()
  File "/usr/local/lib/python3.8/site-packages/tornado/gen.py", line 1055, in run
    value = future.result()
  File "/usr/local/lib/python3.8/concurrent/futures/_base.py", line 432, in result
    return self.__get_result()
  File "/usr/local/lib/python3.8/concurrent/futures/_base.py", line 388, in __get_result
    raise self._exception
  File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.8/site-packages/playmaker/server.py", line 39, in search
    return service.search(keyword)
  File "/usr/local/lib/python3.8/site-packages/playmaker/service.py", line 266, in search
    apps = self.service.search(appName, numItems, None)
TypeError: search() takes 2 positional arguments but 4 were given
ERROR:tornado.access:500 GET /api/search?search=firefox (10.10.7.2) 33.84ms
fellek commented 4 years ago

Thanks @Jonny007-MKD for opening this issue. Just found out, that the implementation of GooglePlay APIv3 changed some JSON fields. Since I need to get playmaker working for some important updates, I will try to fix this... if someone else is working on this issue, please say a word!

Recent changes see at https://github.com/fellek/playmaker/tree/master/playmaker

Jonny007-MKD commented 4 years ago

@fellek, that's great, thanks!

fellek commented 4 years ago

See hotfix in #53.

To build docker container for your own docker build https://github.com/fellek/playmaker.git --tag=playmaker:fellek

or

Autobuild Docker Hub docker pull fellek/playmaker:fellek

Please note: both repositories are only temporary available. use them only until this main project updates.

fellek commented 4 years ago

Pullrequest #53 solves this issue. Known issue: Container crashed on start. Removing of application cache solved this issue (leave your credentials.conf / https-cert files)