DC23 / scriptabit

Python scripting for Habitica
Apache License 2.0
8 stars 4 forks source link

Banking doesn't seem to work anymore #55

Open LordVlad-Neutral opened 2 years ago

LordVlad-Neutral commented 2 years ago

python3 /home/user/.local/bin/sb-banking -d 1000

scriptabit version 2.1.2
verbose mode: False
Loading credentials from /home/user/.auth.cfg
Habitica API at 'https://habitica.com/api/v3/' is up
** banking running

banking update 0 @ Sat Feb 12 20:47:12 2022
Plugin Update failed
400 Client Error: Bad Request for url: https://habitica.com/api/v3/tasks/ef5141f1-2df2-4260-aec2-9ee56672a868
Traceback (most recent call last):
  File "/home/user/.local/lib/python3.10/site-packages/scriptabit/scriptabit.py", line 292, in run_scriptabit
    updating = plugin.update()
  File "/home/user/.local/lib/python3.10/site-packages/scriptabit/plugins/banking.py", line 202, in update
    self.deposit()
  File "/home/user/.local/lib/python3.10/site-packages/scriptabit/plugins/banking.py", line 258, in deposit
    self.update_bank_balance(self.__bank_balance + nett_amount)
  File "/home/user/.local/lib/python3.10/site-packages/scriptabit/plugins/banking.py", line 321, in update_bank_balance
    self._hs.upsert_task(self.__bank)
  File "/home/user/.local/lib/python3.10/site-packages/scriptabit/habitica_service.py", line 331, in upsert_task
    response.raise_for_status()
  File "/usr/lib/python3.10/site-packages/requests/models.py", line 953, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://habitica.com/api/v3/tasks/ef5141f1-2df2-4260-aec2-9ee56672a868
Sleeping for 5.000000 minutes

But also

python2 /home/user/.local/bin/sb-banking -d 1000
Traceback (most recent call last):
  File "/home/user/.local/bin/sb-banking", line 15, in <module>
    from pkg_resources import load_entry_point
ImportError: No module named pkg_resources

It's a shame, I really wanted to use this again. Maybe I'm missing something...

therealmaxmoon commented 2 years ago

It looks like the issue is triggered while scriptabit is trying to update a module.

Can you try to update scriptabit and then start the plugin again?

pip3 install --upgrade scriptabit

Another issue could be, that the task with the id ef5141f1-2df2-4260-aec2-9ee56672a868 is missing. Did you delete it in the meanwhile? If yes, delete or edit the config file.

LordVlad-Neutral commented 2 years ago

Already updated, nothing was even updated by your command.

The task is indeed missing, but I haven't deleted anything... Now I've deleted the config file but it didn't change anything. BTW the task id is still the same... Why does it need a task id ?

Edit : also I've tried to not use the "notification" thing, it doesn't work

And the Bank reward does exist if you were wondering.