jakehilborn / debbit

Automate spending requirements for high interest checking accounts / credit cards
https://jakehilborn.github.io/debbit/
MIT License
261 stars 29 forks source link

Only seems to run once, even though there are multiple cards to charge in the config file #93

Closed arooni closed 2 years ago

arooni commented 2 years ago

Example config:

mode: burst
hide_web_browser: no
notify_failure: myemail@gmail.com
# PLEASE set send_failures_to_developer: yes. Website changes are much easier to fix with proper error reports.
send_failures_to_developer: no

american_express_hilton_biz:
  amazon_gift_card_reload:
    total_purchases: 1
    amount_min: 50
    amount_max: 50
    usr: myemail@email.com
    psw: XXX
    card: YY
    burst_count: 2
  advanced:
    use_cookies: yes
    min_day: 2

capital_one_bass_pro_bullshit_card:
  amazon_gift_card_reload:
    total_purchases: 1
    amount_min: 99
    amount_max: 99
    usr: myemail@email.com
    psw: XXX
    card: YYY
    burst_count: 5
  advanced:
    use_cookies: yes
    min_day: 2

output

[I]  ✘  MacBookArooni  ~/b/debbit-round-2  ./debbit
INFO: 2022-06-22 19:56:24,302        __     __    __    _ __
INFO: 2022-06-22 19:56:24,313   ____/ /__  / /_  / /_  (_) /_
INFO: 2022-06-22 19:56:24,313  / __  / _ \/ __ \/ __ \/ / __/
INFO: 2022-06-22 19:56:24,314 / /_/ /  __/ /_/ / /_/ / / /_
INFO: 2022-06-22 19:56:24,314 \__,_/\___/_.___/_.___/_/\__/  v2.1.4
INFO: 2022-06-22 19:56:24,314
INFO: 2022-06-22 19:56:24,542 1 american_express_blue_cash_amazon_gift_card_reload purchase complete for June 2022
INFO: 2022-06-22 19:56:24,542 1 american_express_delta_biz_amazon_gift_card_reload purchase complete for June 2022
INFO: 2022-06-22 19:56:24,542 1 american_express_hilton_biz_amazon_gift_card_reload purchase complete for June 2022
INFO: 2022-06-22 19:56:24,542
ERROR: 2022-06-22 19:56:24,548 Error loading advanced.py from merchants folder
Traceback (most recent call last):
  File "debbit.py", line 787, in <module>
INFO: 2022-06-22 19:56:24,550 Bursting next 2 american_express_hilton_biz_amazon_gift_card_reload purchases after 2022-07-02 12:00AM
  File "debbit.py", line 48, in main
  File "debbit.py", line 69, in load_merchant
  File "debbit.py", line 64, in load_merchant
ModuleNotFoundError: No module named 'program_files.merchants.advanced'
[46919] Failed to execute script debbit

It seems to run only for the first card in the config file, I seem to have to comment out the other config to get it to run a second time.

from your website

"mode: burst Best if using a laptop or a computer that is not always on. Debbit will check every 5 minutes if enough time has elapsed such that it should execute purchases. This allows you to sleep your computer without concern for debbit. Whenever your computer is back on, debbit will check if it is time to execute purchases and do so accordingly."

So does this mean I just need to chill and let 5 minutes elapse for the next burst of charging the next available card?

arooni commented 2 years ago

is this error message causing the failure?

ERROR: 2022-06-22 21:34:44,192 Error loading advanced.py from merchants folder
Traceback (most recent call last):
  File "debbit.py", line 787, in <module>
  File "debbit.py", line 48, in main
  File "debbit.py", line 69, in load_merchant
  File "debbit.py", line 64, in load_merchant
ModuleNotFoundError: No module named 'program_files.merchants.advanced'
[95078] Failed to execute script debbit
arooni commented 2 years ago

Issue was self induced. It's very important to note the indentation in the config file, I'm guessing it's a python thing. Essentially the advanced: section wasn't indented inward two spaces so debbit thought of this as a completely new vendor/merchant and there was no "advanced.py" merchant.

Great error messages made it easy to track down (once I was a little less sleep deprived). Thanks!