shamhi / HamsterKombatBot

Bot that mines coins in HamsterKombat
Apache License 2.0
778 stars 231 forks source link

Ошибка в боте Unknown error: 'rewardsByDays' #2333

Open 9333003 opened 1 month ago

9333003 commented 1 month ago

Unknown error: 'rewardsByDays'

ThePikachuuHD commented 1 month ago

image Есть решение? не фармит ключи и плитки после этой ошибки

9333003 commented 1 month ago

image Есть решение? не фармит ключи и плитки после этой ошибки

APPLY_DAILY_REWARD=False AUTO_COMPLETE_TASKS=False

Временное решение, чтобы убрать ошибку. Отключи эти параметры в .env. Ждем фикс автора

cmeept commented 1 month ago

Отключи пока apply_daily_rewards мне помогло

image Есть решение? не фармит ключи и плитки после этой ошибки

hardim26 commented 1 month ago

Отключи пока apply_daily_rewards мне помогло

image Есть решение? не фармит ключи и плитки после этой ошибки

должно помочь. APPLY_DAILY_REWARD=False в .env

hardim26 commented 1 month ago

там ошибка еще rewardsCoin - AUTO_COMPLETE_TASKS=False

k0tone commented 1 month ago

Разрабы перенесли информацию о суммах вознаграждения за Ежедневный стрик и за Ежедневные задания на другой URL. было всё тут: https://api.hamsterkombatgame.io/clicker/config теперь часть информации тут: https://api.hamsterkombatgame.io/clicker/config и часть тут: https://api.hamsterkombatgame.io/clicker/config/8Ef-Yt89VXi3KKlwZr1WjUP3uom91l7fnrzd-qPTHus

Эту часть можно достать из любого URL из его Response Headers - config-version:

Однако это вовсе и не нужно делать так как хватает и первого URL. Просто в коде нужно заккоментировать две строки: Первая находится в блоке if settings.APPLY_DAILY_REWARD: строка: rewards = daily_task['rewardsByDays']

не забываем и про вывод лога, можете заменить на такое:

if is_completed:
    logger.success(f"{self.session_name} | Successfully get daily reward | "
                   f"Days: <lm>{days}</lm> | Reward coins: <lg>+{days - 1['rewardCoins']}</lg>")

Вторая в блоке if settings.AUTO_COMPLETE_TASKS: строка: reward = task['rewardCoins']

не забываем и про вывод лога, можете заменить на такое:

if is_completed:
    balance = int(profile_data.get('balanceCoins', 0))
    logger.success(f"{self.session_name} | "
                   f"Successfully completed <ly>{task_id}</ly> task | "
                   f"Balance: <lc>{balance}</lc> (<lg>+{100000}</lg>)")
rufasu commented 1 month ago

в if settings.AUTO_COMPLETE_TASKS: думаю надо еще изменить if not is_completed and reward > 0: на if not is_completed:

а в if settings.APPLY_DAILY_REWARD: f"Days: <lm>{days}</lm> | Reward coins: <lg>+{days - 1['rewardCoins']}</lg>") ругается HamsterKombatBot-main\bot\core\tapper.py:228: SyntaxWarning: 'int' object is not subscriptable; perhaps you missed a comma? f"Days: <lm>{days}</lm> | Reward coins: <lg>+{days - 1['rewardCoins']}</lg>")

0x3x4by73 commented 1 month ago

Unknown error: 'rewardsByDays'

tapper.zip Jus replace the tapper file with this and it's gonna work for you.

AKTanara commented 1 month ago

rewards = daily_task['rewardsByDays']

Thanks Can you please explain reason for this change of min to max? 2024-09-05_132549 to 2024-09-05_132601

socloseeee commented 1 month ago

rewards = daily_task['rewardsByDays']

Thanks

Can you please explain reason for this change of min to max?

2024-09-05_132549

to

2024-09-05_132601

It's just that he initially made a mistake, then corrected it.

AKTanara commented 1 month ago

rewards = daily_task['rewardsByDays']

Thanks Can you please explain reason for this change of min to max? 2024-09-05_132549 to 2024-09-05_132601

It's just that he initially made a mistake, then corrected it.

And here replacing {reward} with {100000} means that code should be corrected for following days? image

AKTanara commented 1 month ago

Unknown error: 'rewardsByDays'

tapper.zip Jus replace the tapper file with this and it's gonna work for you.

I already have claimed daily reward and yet I get this message each time I run the bot: 2024-09-05 14:15:01 | SUCCESS | 218 - MySession | Successfully get daily reward | Days: 1 | Reward coins: +0

Ruslan779555 commented 1 month ago

photo_2024-09-05_15-16-36

Unknown error: 'rewardsByDays'

tapper.zip Jus replace the tapper file with this and it's gonna work for you.

Traceback (most recent call last): File "C:\Users\tegra\OneDrive\Desktop\Тапалка\Руслан\HamsterKombatBot-main\main.py", line 4, in from bot.utils.launcher import process File "C:\Users\tegra\OneDrive\Desktop\Тапалка\Руслан\HamsterKombatBot-main\bot\utils__init__.py", line 4, in from . import launcher File "C:\Users\tegra\OneDrive\Desktop\Тапалка\Руслан\HamsterKombatBot-main\bot\utils\launcher.py", line 11, in from bot.core.tapper import run_tapper File "C:\Users\tegra\OneDrive\Desktop\Тапалка\Руслан\HamsterKombatBot-main\bot\core\tapper.py", line 19, in from bot.api.clicker import ( ImportError: cannot import name 'get_version_config' from 'bot.api.clicker' (C:\Users\tegra\OneDrive\Desktop\Тапалка\Руслан\HamsterKombatBot-main\bot\api\clicker.py)

After replacing the file I get an error

AKTanara commented 1 month ago

photo_2024-09-05_15-16-36

Unknown error: 'rewardsByDays'

tapper.zip Jus replace the tapper file with this and it's gonna work for you.

Traceback (most recent call last): File "C:\Users\tegra\OneDrive\Desktop\Тапалка\Руслан\HamsterKombatBot-main\main.py", line 4, in from bot.utils.launcher import process File "C:\Users\tegra\OneDrive\Desktop\Тапалка\Руслан\HamsterKombatBot-main\bot\utilsinit.py", line 4, in from . import launcher File "C:\Users\tegra\OneDrive\Desktop\Тапалка\Руслан\HamsterKombatBot-main\bot\utils\launcher.py", line 11, in from bot.core.tapper import run_tapper File "C:\Users\tegra\OneDrive\Desktop\Тапалка\Руслан\HamsterKombatBot-main\bot\core\tapper.py", line 19, in from bot.api.clicker import ( ImportError: cannot import name 'get_version_config' from 'bot.api.clicker' (C:\Users\tegra\OneDrive\Desktop\Тапалка\Руслан\HamsterKombatBot-main\bot\api\clicker.py)

After replacing the file I get an error

This works for me flawlessly: tapper.zip