coagulant / critics

Notify about new reviews in AppStore and Google Play in slack
BSD 3-Clause "New" or "Revised" License
23 stars 9 forks source link

TypeError, number of arguments passed is too high #13

Closed lapr0 closed 6 years ago

lapr0 commented 6 years ago

Current configuration OS: Ubuntu 16.04

When trying to run critics for testing or for live, this error occurs. Not using partial() for setting itunes or google_play in cli() while providing a slack_webhook returns the same error, but reviews (if any) are sent to slack.

Traceback (most recent call last): File "/home/loic/github/crit/bin/critics", line 11, in sys.exit(main()) File "/home/loic/github/crit/lib/python3.5/site-packages/critics/init.py", line 9, in main return cli(auto_envvar_prefix=envvar_prefix) File "/home/loic/github/crit/lib/python3.5/site-packages/click/core.py", line 722, in call return self.main(args, kwargs) File "/home/loic/github/crit/lib/python3.5/site-packages/click/core.py", line 697, in main rv = self.invoke(ctx) File "/home/loic/github/crit/lib/python3.5/site-packages/click/core.py", line 895, in invoke return ctx.invoke(self.callback, ctx.params) File "/home/loic/github/crit/lib/python3.5/site-packages/click/core.py", line 535, in invoke return callback(args, *kwargs) File "/home/loic/github/crit/lib/python3.5/site-packages/critics/commands.py", line 67, in cli 1000 settings['beat'], loop) TypeError: init () takes 3 positional arguments but 4 were given

coagulant commented 6 years ago

Please give clear steps to reproduce. Not sure what "Not using partial() for setting itunes or google_play in cli() while providing a slack_webhook" means

lapr0 commented 6 years ago

In commands.py this variable: itunes = tornado.ioloop.PeriodicCallback(partial(app.poll_store, 'ios'), 1000 * settings['beat'], loop) If I run critics command, nothing will pop but the TypeError 4 args given, 3 wanted mentioned as title. But if I remove partial and modify the code to: itunes = tornado.ioloop.PeriodicCallback(app.poll_store('ios'), 1000 * settings['beat'], loop) and run critics --ios=XXX --slack-webhook=MY_SLACK_WEBHOOK I still get the same error, but reviews are posted to slack.