Giter VIP home page Giter VIP logo

ynam's Introduction

Abstract

ynam is a commandline utility to import transactions from an Apple Card into YNAB. ynam achieves this by using an intermediary, namely Intuit's Mint, who happens to be able to import Apple Card transactions. For some reason, this is easier than simply linking an Apple Card directly to YNAB. If you're a developer from either one of these companies, please make this project obsolete.

Prerequisites

  • New Intuit's Mint account.
  • Dedicated YNAB API key, and unlinked credit account
  • Chrome or chromium
  • (Recommended) Docker
  • (Recommended) MFA soft token

Usage

Pip/PyPi

Install from PyPi

pip install ynam

Or directly from github

pip install git+https://github.com/snowskeleton/ynam

Go through the quickstart process

$ ynam --quickstart
Mint username: 
Mint password: 
Mint mfa seed (optional): 
YNAB API key: 
YNAB budget...
YNAB account... 

ynam will login to YNAB and have you select from among the budgets and accounts listed

To test it out, simply run

ynam

The first run can take up to a minute to complete. Run with -x to see what's happening!

Docker

First complete the --quickstart process, passing ynam's config directory as a volume mount.

docker run -v "$HOME/.ynam:/root/.ynam" -it snowskeleton/ynam --quickstart

Subsequent runs should use:

docker run -v "$HOME/.ynam:/root/.ynam" -it -d snowskeleton/ynam

Note the inclusion of -d, which runs the image in detached mode.

Run with your preferred scheduler. I use cron.

Considerations

  • Mint

    • ynam expects that you will have one card, and only one card, linked to Mint. ynam does not differentiate between different cards, and thus assumes that all transactions present are for the same card.

    • Enable MFA for your Intuit account. The simplest and least fragiile method is a software token, which you should backup in an app like Authy. When linking an app, you will have the option to view the secret as text instead of as a QR code. Run ynam --quickstart and paste that text when prompted for mfa seed. Automated login with SMS and/or email MFA is not supported by ynam. Strictly speaking, MFA is not mandatory. With that said, enabling MFA prevents entire categories of automation issues, and is thus strongly recommended.

    • Mint's link to your Apple Card will break every ~90 days. You must manually sign in to Mint and relink it.

  • Chrome

    • Chrome and chromedriver versions must match. Docker will handel this process automatically, but simpler deployments not using Docker must match versions manually. Use --use-chromedriver-on-path to pass in a working chromedriver, and ensure Chrome does not auto update.

Importing Transactions

Avoid manually entering your Apple Card transations ynam can sometimes detect that you manually enterd a charge and not overwrite it, but not in all cases. ynam adds a unique ID to each transaction it imports, so it will never duplicate its own transactions

Structure of config file

ynam requires a few pieces of info to do its job. Specifically, it requires:

  • YNAB API key
  • Selected YNAB budget
    • Most people will only have a single budget, which ynam will select by default. If you have more, the quickstart process will prompt you to select one.
  • Apple Card account ID
    • The specific ID of your Apple credit card. This is unique to the budget selected above. If you want to use ynam to import transactions from multiple Apple cards or into multiple YNAB budgets, specify each combination with sparate credentials using the --config-file option.
  • Mint
    • Username
    • Password
    • MFA soft token seed
      • it is HIGHLY RECOMMENDED that you provide this value. Not only is it the most secure option, but it's also the least fragile. Opting to not use MFA, or to use email or SMS MFA, will increase the amount of login failures you experience. Setup is as follows:
        • Go to your Intuit account MFA settings (login if necessary)
        • If you already have an MFA app linked to your account, go through the process of unlinking it
        • Start adding an authenticator app of your choice, but DO NOT click all the way through yet.
        • You will receive a QR code, as well as a short string representation of that QR code. This is your MFA seed. Save it somewhere safe (password manager, lockbox, etc) before you finish linking the app.

Closing

I hope you find ynam useful!

Feel free to open an Issue or Pull Request with any new ideas or problems.

Disclaimer

This project is neither associated with, nor endorsed by, YNAB, Intuit (or its subsidiary Mint), or Apple. All rights belong to original creators.

ynam's People

Contributors

natescherer avatar snowskeleton avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

ynam's Issues

A chromedriver is placed in home dir that doesn’t match the arch

Why not default to using the apt-installed version? Even if I link to the installed version, running ynam seemingly overwrites the link in /home/pi with a version clearly not compiled for the rPi arch.

i@raspberrypi:~ $ /usr/bin/chromedriver -v
ChromeDriver 104.0.5112.105 (f41489f8f9695e9da8b096b700413afb03204129-refs/branch-heads/5112@{#1482})
pi@raspberrypi:~ $ /home/pi/chromedriver -v
-bash: /home/pi/chromedriver: cannot execute binary file: Exec format error
pi@raspberrypi:~ $ 
pi@raspberrypi:~ $ ls -al /usr/bin/chromedriver
-rwxr-xr-x 1 root root 11880248 Aug 25 05:57 /usr/bin/chromedriver
pi@raspberrypi:~ $ ls -al ./chromedriver
-rwxr-xr-x 1 pi pi 13158208 Oct 15 18:42 ./chromedriver
pi@raspberrypi:~ $ 

Docker Container

Hello! I'm looking at building this into a Docker container; was curious if you'd like me to contribute that back to this repo or if you'd rather I maintain it in my own. Either is fine for me. Thanks for the useful program!

FileNotFoundError: [Errno 2] No such file or directory: '/root/.ynam_mintapi_cookies'

I'm not much well-versed in python so please forgive me in advance. I'm running macOS Monterey and tried getting the utility to work in Terminal and also trying to run in Docker. So I attempted to do a fresh install and run in Docker (building the image using the dockerfile in the ynam repo). When I go to run the container, I get this error...

2022-11-30 19:58:52 Traceback (most recent call last): 2022-11-30 19:58:52 File "/usr/local/lib/python3.8/dist-packages/ynam/main.py", line 21, in main 2022-11-30 19:58:52 mints = mapi.getXtns() 2022-11-30 19:58:52 File "/usr/local/lib/python3.8/dist-packages/ynam/api.py", line 84, in getXtns 2022-11-30 19:58:52 client.authorize(self.cookies(), self.key()) 2022-11-30 19:58:52 File "/usr/local/lib/python3.8/dist-packages/ynam/api.py", line 98, in cookies 2022-11-30 19:58:52 with open(self.cpath, 'r') as file: 2022-11-30 19:58:52 FileNotFoundError: [Errno 2] No such file or directory: '/root/.ynam_mintapi_cookies' 2022-11-30 19:58:52 2022-11-30 19:58:52 During handling of the above exception, another exception occurred: 2022-11-30 19:58:52 2022-11-30 19:58:52 Traceback (most recent call last): 2022-11-30 19:58:52 File "/usr/local/bin/ynam", line 8, in <module> 2022-11-30 19:58:52 sys.exit(main()) 2022-11-30 19:58:52 File "/usr/local/lib/python3.8/dist-packages/ynam/main.py", line 23, in main 2022-11-30 19:58:52 mapi.updateAuth() 2022-11-30 19:58:52 File "/usr/local/lib/python3.8/dist-packages/ynam/api.py", line 117, in updateAuth 2022-11-30 19:58:52 file.write(str(bowser._get_cookies())) 2022-11-30 19:58:52 File "/src/mintapi/mintapi/browser.py", line 214, in _get_cookies 2022-11-30 19:58:52 return self.driver.get_cookies() 2022-11-30 19:58:52 AttributeError: 'NoneType' object has no attribute 'get_cookies'

It does this whether I try to run manually in Terminal, or try to start the container in Docker

Also even after installing ynam with python3, I'm getting a command not found when trying to run the ynam function...I may have missed a number of steps.

Thanks!

Errors when attempting to run

First off, thank you very much for the work here, this is something that YNAB needs to implement themselves, and appreciate someone stepping in and making an effort here!

I was able to clone from GitHub, and run the ynam --quickstart , and set up my account. it looks like its authorized into my YNAB account as it appropriately grabbed the budget and account names, but I didn't know how to verify if it was connecting with Mint.

When attempting to run ynam I get these errors

ynam Traceback (most recent call last): File "/usr/local/bin/ynam", line 8, in <module> sys.exit(main()) File "/usr/local/lib/python3.10/site-packages/ynam/main.py", line 20, in main mapi = MintAPI() File "/usr/local/lib/python3.10/site-packages/ynam/mint_api.py", line 10, in __init__ self.restClient = mintapi.RESTClient AttributeError: module 'mintapi' has no attribute 'RESTClient'

I attempted to install mintapi itself to see if that would update the failed attribute, but no change in error.

ynam - version of chrome newer

I love this tool and have been using it successfully for months. It's been weeks since I ran it and now it is trowing a lot of errors... but near the end it shows:

selenium.common.exceptions.SessionNotCreatedException: Message: session not created: This version of ChromeDriver only supports Chrome version 114
Current browser version is 116.0.5845.110 with binary path /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

My Chrome install is in fact 116 now. Does ynam code need to be updated or something? Sorry I'm so clueless.

Thank you

Hey, another slightly-disgruntled Apple user here. THANK YOU. This just worked. Is it finicky? Does it feel crazy to open an entire account on Mint to get at my financial data? Of course. But none of those issues are caused by your solution. So, thank you for making this, supporting it, etc. This is incredible. Thank you.

Crash during ynam --quickstart

I'm getting the following crash when trying to run ynam --quickstart:

WARNING:ynam:Found error {'id': '401', 'name': 'unauthorized', 'detail': 'Unauthorized'} in response body.
Traceback (most recent call last):
  File "/usr/local/bin/ynam", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/usr/local/lib/python3.11/site-packages/ynam/main.py", line 19, in main
    handleArgs()
  File "/usr/local/lib/python3.11/site-packages/ynam/main.py", line 58, in handleArgs
    sys.exit(run())
             ^^^^^
  File "/usr/local/lib/python3.11/site-packages/ynam/quickstart.py", line 59, in run
    budgets = ynapi.get_budgets()
              ^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/ynam/ynab_api.py", line 110, in get_budgets
    return self._get(url='/budgets')['budgets']
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/ynam/ynab_api.py", line 93, in _get
    return self.__call(get, url, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/ynam/ynab_api.py", line 81, in __call
    raise Exception(jsonResults['error'])
Exception: {'id': '401', 'name': 'unauthorized', 'detail': 'Unauthorized'}

This happens after entering my Mint username (I'm entering my email address here), my Mint password, my Mint mfa seed (I copied the secret key and took out all the line breaks; is that right?), and my YNAB API key. I already set up the Mint MFA using Bitwarden – is that correct, or was I supposed to leave it at the confirmation screen and have the API confirm it?

Let me know if there's any other information that would be helpful to know here!

KeyError: 'fiData'

Trying this out for the first time. I will be setting up in Docker, but currently just testing with yam -x. I have MFA seed setup and API key of course.

Output:

[tonyvarin@rhel9 ~]$ ynam -x
INFO:mintapi:Not on Account Selection Screen
INFO:mintapi:Not on Secondary MFA Password Screen
Traceback (most recent call last):
  File "/home/tonyvarin/.local/lib/python3.9/site-packages/ynam/main.py", line 24, in main
    mint_transactions = mint_api.get_transactions(start_date=arg('days'))
  File "/home/tonyvarin/.local/lib/python3.9/site-packages/ynam/mint_api.py", line 53, in get_transactions
    [logger.debug(item['fiData']) for item in items]
  File "/home/tonyvarin/.local/lib/python3.9/site-packages/ynam/mint_api.py", line 53, in <listcomp>
    [logger.debug(item['fiData']) for item in items]
KeyError: 'fiData'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/tonyvarin/.local/bin/ynam", line 8, in <module>
    sys.exit(main())
  File "/home/tonyvarin/.local/lib/python3.9/site-packages/ynam/main.py", line 27, in main
    mint_transactions = mint_api.get_transactions(start_date=arg('days'))
  File "/home/tonyvarin/.local/lib/python3.9/site-packages/ynam/mint_api.py", line 53, in get_transactions
    [logger.debug(item['fiData']) for item in items]
  File "/home/tonyvarin/.local/lib/python3.9/site-packages/ynam/mint_api.py", line 53, in <listcomp>
    [logger.debug(item['fiData']) for item in items]
KeyError: 'fiData'

Docker quickstart works, importing of transactions errors out

2023-02-01 14:20:24 Traceback (most recent call last):
2023-02-01 14:20:24   File "/usr/local/lib/python3.8/dist-packages/ynam/main.py", line 24, in main
2023-02-01 14:20:24     mint_transactions = mint_api.get_transactions(start_date=arg('days'))
2023-02-01 14:20:24   File "/usr/local/lib/python3.8/dist-packages/ynam/mint_api.py", line 48, in get_transactions
2023-02-01 14:20:24     client.authorize(self.cookies(), self.key())
2023-02-01 14:20:24   File "/usr/local/lib/python3.8/dist-packages/ynam/mint_api.py", line 58, in cookies
2023-02-01 14:20:24     return ast.literal_eval(file.read())
2023-02-01 14:20:24   File "/usr/lib/python3.8/ast.py", line 59, in literal_eval
2023-02-01 14:20:24     node_or_string = parse(node_or_string, mode='eval')
2023-02-01 14:20:24   File "/usr/lib/python3.8/ast.py", line 47, in parse
2023-02-01 14:20:24     return compile(source, filename, mode, flags,
2023-02-01 14:20:24   File "<unknown>", line 0
2023-02-01 14:20:24     
2023-02-01 14:20:24     ^
2023-02-01 14:20:24 SyntaxError: unexpected EOF while parsing
2023-02-01 14:20:24 
2023-02-01 14:20:24 During handling of the above exception, another exception occurred:
2023-02-01 14:20:24 
2023-02-01 14:20:24 Traceback (most recent call last):
2023-02-01 14:20:24   File "/usr/local/bin/ynam", line 8, in <module>
2023-02-01 14:20:24     sys.exit(main())
2023-02-01 14:20:24   File "/usr/local/lib/python3.8/dist-packages/ynam/main.py", line 26, in main
2023-02-01 14:20:24     mint_api.updateAuth()
2023-02-01 14:20:24   File "/usr/local/lib/python3.8/dist-packages/ynam/mint_api.py", line 66, in updateAuth
2023-02-01 14:20:24     browser = self.browser(
2023-02-01 14:20:24   File "/usr/local/lib/python3.8/dist-packages/mintapi/browser.py", line 55, in __init__
2023-02-01 14:20:24     self.login_and_get_token(
2023-02-01 14:20:24   File "/usr/local/lib/python3.8/dist-packages/mintapi/browser.py", line 110, in login_and_get_token
2023-02-01 14:20:24     self.driver = driver or _create_web_driver_at_mint_com(
2023-02-01 14:20:24   File "/usr/local/lib/python3.8/dist-packages/mintapi/signIn.py", line 311, in _create_web_driver_at_mint_com
2023-02-01 14:20:24     driver = Chrome(options=chrome_options)
2023-02-01 14:20:24   File "/usr/local/lib/python3.8/dist-packages/seleniumrequests/request.py", line 148, in __init__
2023-02-01 14:20:24     super(RequestsSessionMixin, self).__init__(*args, **kwargs)
2023-02-01 14:20:24   File "/usr/local/lib/python3.8/dist-packages/selenium/webdriver/chrome/webdriver.py", line 80, in __init__
2023-02-01 14:20:24     super().__init__(
2023-02-01 14:20:24   File "/usr/local/lib/python3.8/dist-packages/selenium/webdriver/chromium/webdriver.py", line 104, in __init__
2023-02-01 14:20:24     super().__init__(
2023-02-01 14:20:24   File "/usr/local/lib/python3.8/dist-packages/selenium/webdriver/remote/webdriver.py", line 286, in __init__
2023-02-01 14:20:24     self.start_session(capabilities, browser_profile)
2023-02-01 14:20:24   File "/usr/local/lib/python3.8/dist-packages/selenium/webdriver/remote/webdriver.py", line 378, in start_session
2023-02-01 14:20:24     response = self.execute(Command.NEW_SESSION, parameters)
2023-02-01 14:20:24   File "/usr/local/lib/python3.8/dist-packages/selenium/webdriver/remote/webdriver.py", line 440, in execute
2023-02-01 14:20:24     self.error_handler.check_response(response)
2023-02-01 14:20:24   File "/usr/local/lib/python3.8/dist-packages/selenium/webdriver/remote/errorhandler.py", line 245, in check_response
2023-02-01 14:20:24     raise exception_class(message, screen, stacktrace)
2023-02-01 14:20:24 selenium.common.exceptions.WebDriverException: Message: unknown error: Chrome failed to start: crashed.
2023-02-01 14:20:24   (unknown error: DevToolsActivePort file doesn't exist)
2023-02-01 14:20:24   (The process started from chrome location /usr/bin/google-chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
2023-02-01 14:20:24 Stacktrace:
2023-02-01 14:20:24 #0 0x00400065d303 <unknown>
2023-02-01 14:20:24 #1 0x004000431d37 <unknown>
2023-02-01 14:20:24 #2 0x00400045a157 <unknown>
2023-02-01 14:20:24 #3 0x004000456330 <unknown>
2023-02-01 14:20:24 #4 0x0040004974a6 <unknown>
2023-02-01 14:20:24 #5 0x00400048e753 <unknown>
2023-02-01 14:20:24 #6 0x004000461a14 <unknown>
2023-02-01 14:20:24 #7 0x004000462b7e <unknown>
2023-02-01 14:20:24 #8 0x0040006ac32e <unknown>
2023-02-01 14:20:24 #9 0x0040006afc0e <unknown>
2023-02-01 14:20:24 #10 0x004000692610 <unknown>
2023-02-01 14:20:24 #11 0x0040006b0c23 <unknown>
2023-02-01 14:20:24 #12 0x004000684545 <unknown>
2023-02-01 14:20:24 #13 0x0040006d16a8 <unknown>
2023-02-01 14:20:24 #14 0x0040006d1836 <unknown>
2023-02-01 14:20:24 #15 0x0040006ecd13 <unknown>
2023-02-01 14:20:24 #16 0x004002600609 start_thread
2023-02-01 14:20:24 

Stacktrace above. Not sure what else I should be doing to get this to work. --quickstart is working as expected, which is promising as it pulled from YNAB as I thought it would. I'm not sure if there's something wrong with how it's pulling from mint?

TypeError: MintTransaction.__init__() missing 1 required positional argument: 'id'

I didn't see this in the open or closed issues. I am running macOS Ventura 13.2.1.

I was able to successfully run ynam --quickstart and see/setup my account using 2FA for Mint.

Running ynam for the first time ran for a bit, then spits out a bunch of stuff, with the last line being:
TypeError: MintTransaction.__init__() missing 1 required positional argument: 'id'

The full output is:

% ynam
INFO:mintapi:Downloading version 110.0.5481.77 of Chromedriver
INFO:mintapi:Not on Account Selection Screen
INFO:mintapi:Not on Secondary MFA Password Screen
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/ynam/main.py", line 24, in main
    mint_transactions = mint_api.get_transactions(start_date=arg('days'))
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/ynam/mint_api.py", line 48, in get_transactions
    client.authorize(self.cookies(), self.key())
                     ^^^^^^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/ynam/mint_api.py", line 58, in cookies
    return ast.literal_eval(file.read())
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/ast.py", line 64, in literal_eval
    node_or_string = parse(node_or_string.lstrip(" \t"), mode='eval')
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/ast.py", line 50, in parse
    return compile(source, filename, mode, flags,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<unknown>", line 0

SyntaxError: invalid syntax

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.11/bin/ynam", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/ynam/main.py", line 27, in main
    mint_transactions = mint_api.get_transactions(start_date=arg('days'))
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/ynam/mint_api.py", line 50, in get_transactions
    items = [
            ^
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/ynam/mint_api.py", line 51, in <listcomp>
    MintTransaction.from_dict(item['fiData']) for item in items
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/ynam/mint_api.py", line 22, in from_dict
    return cls(**{
           ^^^^^^^
TypeError: MintTransaction.__init__() missing 1 required positional argument: 'id'

I ran it again with ynam -x and saw it launch a Chrome browser, login successfully, starts loading the "Overview" page, then eventually the Chrome window disappears. It's only after this that the output referenced above starts to show up in the terminal.

I should add, though probably obvious, the fiirst line only showed up the first time I ran it.
INFO:mintapi:Downloading version 110.0.5481.77 of Chromedriver

Thoughts?

Stuck on Mint authentication

Running in docker, quickstart goes smoothly, but when it's time to actually run it, it does nothing and spits out an error of

mintapi:Not on Account Selection Screen
mintapi:Not on MFA screen

(MFA error paraphrased)
and errors out. I'm not quite sure what I'm doing wrong. The YNAB connection is fine, again the quickstart went smoothly.

For mint, I'm entering my email (which I have triple-checked is my account ID), and copy-pasting my password. Lastly, for the MFA token, I am pasting it in as all 32 characters with no spaces (I initially was doing direct copy-paste from the website but that was pasting it as

XXXX
XXXX
...

so I thought that was the culprit, but it was not. Am I entering the MFA key wrong or is there something else?

Feature Request - Ack for Completion with Log

Hey!

I've been using YNAM for a week or so, it's been great so far and super useful. I haven't gotten it to work well with crontab for some reason, but haven't dove deep to investigate and just run it manually a couple times a day when i think about budgeting.

I've had an idea on improvement:

In general it would be great to see some action feedback from the application, most specifically a log and acknowledgement of success. I'd imagine after running ynam, you could send an Ack to the console that says YNAM wrote xx Transactions succesfully.

I understand that what data could be presented is dependent on YNABs api giving you feedback, so could even give nicer results but right now you type in ynam and just wait for a new line and are unsure if there was success in writing to YNAB without going to look at the budget.

I guess this isn't a problem if you ONLY run headless and via crontab, but if you're running manually it would be nice!

Thanks in advance.

Exits on run in docker

I'm having this error, and nothing is importing to YNAB. The first run didn't give any errors, however did not import either.

2023-02-17 13:34:17 INFO:mintapi:The Multifactor Method soft-token supplied is not available. 2023-02-17 13:34:37 INFO:mintapi:Not on Account Selection Screen 2023-02-17 13:34:38 INFO:mintapi:Not on Secondary MFA Password Screen 2023-02-17 13:35:04 ERROR:mintapi:Message: 2023-02-17 13:35:04 Stacktrace: 2023-02-17 13:35:04 #0 0x55c7ae713d93 <unknown> 2023-02-17 13:35:04 #1 0x55c7ae4e22d7 <unknown> 2023-02-17 13:35:04 #2 0x55c7ae51ecaa <unknown> 2023-02-17 13:35:04 #3 0x55c7ae51edb1 <unknown> 2023-02-17 13:35:04 #4 0x55c7ae55c8f4 <unknown> 2023-02-17 13:35:04 #5 0x55c7ae54261d <unknown> 2023-02-17 13:35:04 #6 0x55c7ae55a619 <unknown> 2023-02-17 13:35:04 #7 0x55c7ae542353 <unknown> 2023-02-17 13:35:04 #8 0x55c7ae511e40 <unknown> 2023-02-17 13:35:04 #9 0x55c7ae513038 <unknown> 2023-02-17 13:35:04 #10 0x55c7ae7678be <unknown> 2023-02-17 13:35:04 #11 0x55c7ae76b8f0 <unknown> 2023-02-17 13:35:04 #12 0x55c7ae74bf90 <unknown> 2023-02-17 13:35:04 #13 0x55c7ae76cb7d <unknown> 2023-02-17 13:35:04 #14 0x55c7ae73d578 <unknown> 2023-02-17 13:35:04 #15 0x55c7ae791348 <unknown> 2023-02-17 13:35:04 #16 0x55c7ae7914d6 <unknown> 2023-02-17 13:35:04 #17 0x55c7ae7ab341 <unknown> 2023-02-17 13:35:04 #18 0x7f370d126609 start_thread 2023-02-17 13:35:04 Traceback (most recent call last): 2023-02-17 13:35:04 File "/usr/local/lib/python3.8/dist-packages/ynam/main.py", line 24, in main 2023-02-17 13:35:04 mint_transactions = mint_api.get_transactions(start_date=arg('days')) 2023-02-17 13:35:04 File "/usr/local/lib/python3.8/dist-packages/ynam/mint_api.py", line 48, in get_transactions 2023-02-17 13:35:04 client.authorize(self.cookies(), self.key()) 2023-02-17 13:35:04 File "/usr/local/lib/python3.8/dist-packages/ynam/mint_api.py", line 58, in cookies 2023-02-17 13:35:04 return ast.literal_eval(file.read()) 2023-02-17 13:35:04 File "/usr/lib/python3.8/ast.py", line 59, in literal_eval 2023-02-17 13:35:04 node_or_string = parse(node_or_string, mode='eval') 2023-02-17 13:35:04 File "/usr/lib/python3.8/ast.py", line 47, in parse 2023-02-17 13:35:04 return compile(source, filename, mode, flags, 2023-02-17 13:35:04 File "<unknown>", line 0 2023-02-17 13:35:04 2023-02-17 13:35:04 ^ 2023-02-17 13:35:04 SyntaxError: unexpected EOF while parsing 2023-02-17 13:35:04 2023-02-17 13:35:04 During handling of the above exception, another exception occurred: 2023-02-17 13:35:04 2023-02-17 13:35:04 Traceback (most recent call last): 2023-02-17 13:35:04 File "/usr/local/lib/python3.8/dist-packages/mintapi/signIn.py", line 368, in sign_in 2023-02-17 13:35:04 handle_same_page_username_password(driver, email, password) 2023-02-17 13:35:04 File "/usr/local/lib/python3.8/dist-packages/mintapi/signIn.py", line 457, in handle_same_page_username_password 2023-02-17 13:35:04 email_input = driver.find_element(By.ID, "ius-userid") 2023-02-17 13:35:04 File "/usr/local/lib/python3.8/dist-packages/selenium/webdriver/remote/webdriver.py", line 830, in find_element 2023-02-17 13:35:04 return self.execute(Command.FIND_ELEMENT, {"using": by, "value": value})["value"] 2023-02-17 13:35:04 File "/usr/local/lib/python3.8/dist-packages/selenium/webdriver/remote/webdriver.py", line 440, in execute 2023-02-17 13:35:04 self.error_handler.check_response(response) 2023-02-17 13:35:04 File "/usr/local/lib/python3.8/dist-packages/selenium/webdriver/remote/errorhandler.py", line 245, in check_response 2023-02-17 13:35:04 raise exception_class(message, screen, stacktrace) 2023-02-17 13:35:04 selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element: {"method":"css selector","selector":"[id="ius-userid"]"} 2023-02-17 13:35:04 (Session info: headless chrome=110.0.5481.77) 2023-02-17 13:35:04 Stacktrace: 2023-02-17 13:35:04 #0 0x55c7ae713d93 <unknown> 2023-02-17 13:35:04 #1 0x55c7ae4e22d7 <unknown> 2023-02-17 13:35:04 #2 0x55c7ae51ecaa <unknown> 2023-02-17 13:35:04 #3 0x55c7ae51edb1 <unknown> 2023-02-17 13:35:04 #4 0x55c7ae55c8f4 <unknown> 2023-02-17 13:35:04 #5 0x55c7ae54261d <unknown> 2023-02-17 13:35:04 #6 0x55c7ae55a619 <unknown> 2023-02-17 13:35:04 #7 0x55c7ae542353 <unknown> 2023-02-17 13:35:04 #8 0x55c7ae511e40 <unknown> 2023-02-17 13:35:04 #9 0x55c7ae513038 <unknown> 2023-02-17 13:35:04 #10 0x55c7ae7678be <unknown> 2023-02-17 13:35:04 #11 0x55c7ae76b8f0 <unknown> 2023-02-17 13:35:04 #12 0x55c7ae74bf90 <unknown> 2023-02-17 13:35:04 #13 0x55c7ae76cb7d <unknown> 2023-02-17 13:35:04 #14 0x55c7ae73d578 <unknown> 2023-02-17 13:35:04 #15 0x55c7ae791348 <unknown> 2023-02-17 13:35:04 #16 0x55c7ae7914d6 <unknown> 2023-02-17 13:35:04 #17 0x55c7ae7ab341 <unknown> 2023-02-17 13:35:04 #18 0x7f370d126609 start_thread 2023-02-17 13:35:04 2023-02-17 13:35:04 2023-02-17 13:35:04 During handling of the above exception, another exception occurred: 2023-02-17 13:35:04 2023-02-17 13:35:04 Traceback (most recent call last): 2023-02-17 13:35:04 File "/usr/local/lib/python3.8/dist-packages/mintapi/browser.py", line 115, in login_and_get_token 2023-02-17 13:35:04 self.status_message = sign_in( 2023-02-17 13:35:04 File "/usr/local/lib/python3.8/dist-packages/mintapi/signIn.py", line 375, in sign_in 2023-02-17 13:35:04 handle_different_page_username_password(driver, email) 2023-02-17 13:35:04 File "/usr/local/lib/python3.8/dist-packages/mintapi/signIn.py", line 471, in handle_different_page_username_password 2023-02-17 13:35:04 email_input = WebDriverWait(driver, 20).until( 2023-02-17 13:35:04 File "/usr/local/lib/python3.8/dist-packages/selenium/webdriver/support/wait.py", line 95, in until 2023-02-17 13:35:04 raise TimeoutException(message, screen, stacktrace) 2023-02-17 13:35:04 selenium.common.exceptions.TimeoutException: Message: 2023-02-17 13:35:04 Stacktrace: 2023-02-17 13:35:04 #0 0x55c7ae713d93 <unknown> 2023-02-17 13:35:04 #1 0x55c7ae4e22d7 <unknown> 2023-02-17 13:35:04 #2 0x55c7ae51ecaa <unknown> 2023-02-17 13:35:04 #3 0x55c7ae51edb1 <unknown> 2023-02-17 13:35:04 #4 0x55c7ae55c8f4 <unknown> 2023-02-17 13:35:04 #5 0x55c7ae54261d <unknown> 2023-02-17 13:35:04 #6 0x55c7ae55a619 <unknown> 2023-02-17 13:35:04 #7 0x55c7ae542353 <unknown> 2023-02-17 13:35:04 #8 0x55c7ae511e40 <unknown> 2023-02-17 13:35:04 #9 0x55c7ae513038 <unknown> 2023-02-17 13:35:04 #10 0x55c7ae7678be <unknown> 2023-02-17 13:35:04 #11 0x55c7ae76b8f0 <unknown> 2023-02-17 13:35:04 #12 0x55c7ae74bf90 <unknown> 2023-02-17 13:35:04 #13 0x55c7ae76cb7d <unknown> 2023-02-17 13:35:04 #14 0x55c7ae73d578 <unknown> 2023-02-17 13:35:04 #15 0x55c7ae791348 <unknown> 2023-02-17 13:35:04 #16 0x55c7ae7914d6 <unknown> 2023-02-17 13:35:04 #17 0x55c7ae7ab341 <unknown> 2023-02-17 13:35:04 #18 0x7f370d126609 start_thread 2023-02-17 13:35:04 2023-02-17 13:35:04 Traceback (most recent call last): 2023-02-17 13:35:04 File "/usr/local/lib/python3.8/dist-packages/ynam/main.py", line 24, in main 2023-02-17 13:35:04 mint_transactions = mint_api.get_transactions(start_date=arg('days')) 2023-02-17 13:35:04 File "/usr/local/lib/python3.8/dist-packages/ynam/mint_api.py", line 48, in get_transactions 2023-02-17 13:35:04 client.authorize(self.cookies(), self.key()) 2023-02-17 13:35:04 File "/usr/local/lib/python3.8/dist-packages/ynam/mint_api.py", line 58, in cookies 2023-02-17 13:35:04 return ast.literal_eval(file.read()) 2023-02-17 13:35:04 File "/usr/lib/python3.8/ast.py", line 59, in literal_eval 2023-02-17 13:35:04 node_or_string = parse(node_or_string, mode='eval') 2023-02-17 13:35:04 File "/usr/lib/python3.8/ast.py", line 47, in parse 2023-02-17 13:35:04 return compile(source, filename, mode, flags, 2023-02-17 13:35:04 File "<unknown>", line 0 2023-02-17 13:35:04 2023-02-17 13:35:04 ^ 2023-02-17 13:35:04 SyntaxError: unexpected EOF while parsing 2023-02-17 13:35:04 2023-02-17 13:35:04 During handling of the above exception, another exception occurred: 2023-02-17 13:35:04 2023-02-17 13:35:04 Traceback (most recent call last): 2023-02-17 13:35:04 File "/usr/local/lib/python3.8/dist-packages/mintapi/signIn.py", line 368, in sign_in 2023-02-17 13:35:04 handle_same_page_username_password(driver, email, password) 2023-02-17 13:35:04 File "/usr/local/lib/python3.8/dist-packages/mintapi/signIn.py", line 457, in handle_same_page_username_password 2023-02-17 13:35:04 email_input = driver.find_element(By.ID, "ius-userid") 2023-02-17 13:35:04 File "/usr/local/lib/python3.8/dist-packages/selenium/webdriver/remote/webdriver.py", line 830, in find_element 2023-02-17 13:35:04 return self.execute(Command.FIND_ELEMENT, {"using": by, "value": value})["value"] 2023-02-17 13:35:04 File "/usr/local/lib/python3.8/dist-packages/selenium/webdriver/remote/webdriver.py", line 440, in execute 2023-02-17 13:35:04 self.error_handler.check_response(response) 2023-02-17 13:35:04 File "/usr/local/lib/python3.8/dist-packages/selenium/webdriver/remote/errorhandler.py", line 245, in check_response 2023-02-17 13:35:04 raise exception_class(message, screen, stacktrace) 2023-02-17 13:35:04 selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element: {"method":"css selector","selector":"[id="ius-userid"]"} 2023-02-17 13:35:04 (Session info: headless chrome=110.0.5481.77) 2023-02-17 13:35:04 Stacktrace: 2023-02-17 13:35:04 #0 0x55c7ae713d93 <unknown> 2023-02-17 13:35:04 #1 0x55c7ae4e22d7 <unknown> 2023-02-17 13:35:04 #2 0x55c7ae51ecaa <unknown> 2023-02-17 13:35:04 #3 0x55c7ae51edb1 <unknown> 2023-02-17 13:35:04 #4 0x55c7ae55c8f4 <unknown> 2023-02-17 13:35:04 #5 0x55c7ae54261d <unknown> 2023-02-17 13:35:04 #6 0x55c7ae55a619 <unknown> 2023-02-17 13:35:04 #7 0x55c7ae542353 <unknown> 2023-02-17 13:35:04 #8 0x55c7ae511e40 <unknown> 2023-02-17 13:35:04 #9 0x55c7ae513038 <unknown> 2023-02-17 13:35:04 #10 0x55c7ae7678be <unknown> 2023-02-17 13:35:04 #11 0x55c7ae76b8f0 <unknown> 2023-02-17 13:35:04 #12 0x55c7ae74bf90 <unknown> 2023-02-17 13:35:04 #13 0x55c7ae76cb7d <unknown> 2023-02-17 13:35:04 #14 0x55c7ae73d578 <unknown> 2023-02-17 13:35:04 #15 0x55c7ae791348 <unknown> 2023-02-17 13:35:04 #16 0x55c7ae7914d6 <unknown> 2023-02-17 13:35:04 #17 0x55c7ae7ab341 <unknown> 2023-02-17 13:35:04 #18 0x7f370d126609 start_thread 2023-02-17 13:35:04 2023-02-17 13:35:04 2023-02-17 13:35:04 During handling of the above exception, another exception occurred: 2023-02-17 13:35:04 2023-02-17 13:35:04 Traceback (most recent call last): 2023-02-17 13:35:04 File "/usr/local/lib/python3.8/dist-packages/mintapi/browser.py", line 115, in login_and_get_token 2023-02-17 13:35:04 self.status_message = sign_in( 2023-02-17 13:35:04 File "/usr/local/lib/python3.8/dist-packages/mintapi/signIn.py", line 375, in sign_in 2023-02-17 13:35:04 handle_different_page_username_password(driver, email) 2023-02-17 13:35:04 File "/usr/local/lib/python3.8/dist-packages/mintapi/signIn.py", line 471, in handle_different_page_username_password 2023-02-17 13:35:04 email_input = WebDriverWait(driver, 20).until( 2023-02-17 13:35:04 File "/usr/local/lib/python3.8/dist-packages/selenium/webdriver/support/wait.py", line 95, in until 2023-02-17 13:35:04 raise TimeoutException(message, screen, stacktrace) 2023-02-17 13:35:04 selenium.common.exceptions.TimeoutException: Message: 2023-02-17 13:35:04 Stacktrace: 2023-02-17 13:35:04 #0 0x55c7ae713d93 <unknown> 2023-02-17 13:35:04 #1 0x55c7ae4e22d7 <unknown> 2023-02-17 13:35:04 #2 0x55c7ae51ecaa <unknown> 2023-02-17 13:35:04 #3 0x55c7ae51edb1 <unknown> 2023-02-17 13:35:04 #4 0x55c7ae55c8f4 <unknown> 2023-02-17 13:35:04 #5 0x55c7ae54261d <unknown> 2023-02-17 13:35:04 #6 0x55c7ae55a619 <unknown> 2023-02-17 13:35:04 #7 0x55c7ae542353 <unknown> 2023-02-17 13:35:04 #8 0x55c7ae511e40 <unknown> 2023-02-17 13:35:04 #9 0x55c7ae513038 <unknown> 2023-02-17 13:35:04 #10 0x55c7ae7678be <unknown> 2023-02-17 13:35:04 #11 0x55c7ae76b8f0 <unknown> 2023-02-17 13:35:04 #12 0x55c7ae74bf90 <unknown> 2023-02-17 13:35:04 #13 0x55c7ae76cb7d <unknown> 2023-02-17 13:35:04 #14 0x55c7ae73d578 <unknown> 2023-02-17 13:35:04 #15 0x55c7ae791348 <unknown> 2023-02-17 13:35:04 #16 0x55c7ae7914d6 <unknown> 2023-02-17 13:35:04 #17 0x55c7ae7ab341 <unknown> 2023-02-17 13:35:04 #18 0x7f370d126609 start_thread 2023-02-17 13:35:04 2023-02-17 13:35:04 2023-02-17 13:35:04 The above exception was the direct cause of the following exception: 2023-02-17 13:35:04 2023-02-17 13:35:04 Traceback (most recent call last): 2023-02-17 13:35:04 File "/usr/local/bin/ynam", line 8, in <module> 2023-02-17 13:35:04 sys.exit(main()) 2023-02-17 13:35:04 File "/usr/local/lib/python3.8/dist-packages/ynam/main.py", line 26, in main 2023-02-17 13:35:04 mint_api.updateAuth() 2023-02-17 13:35:04 File "/usr/local/lib/python3.8/dist-packages/ynam/mint_api.py", line 66, in updateAuth 2023-02-17 13:35:04 browser = self.browser( 2023-02-17 13:35:04 File "/usr/local/lib/python3.8/dist-packages/mintapi/browser.py", line 55, in __init__ 2023-02-17 13:35:04 self.login_and_get_token( 2023-02-17 13:35:04 File "/usr/local/lib/python3.8/dist-packages/mintapi/browser.py", line 136, in login_and_get_token 2023-02-17 13:35:04 raise Exception(msg) from e 2023-02-17 13:35:04 Exception: Could not sign in to Mint. Current page: https://accounts.intuit.com/index.html?offering_id=Intuit.ifs.mint&namespace_id=50000026&redirect_url=https%3A%2F%2Fmint.intuit.com%2Foverview.event%3Futm_medium%3Ddirect%26cta%3Dnav_login_dropdown%26ivid%3Da80ba49f-9b8d-4183-ab60-b3b1b86aa723

Thanks!

json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0) -- On first execution

Hello! I've got some time to spare so tried to install and run the latest version of YNAM on my Windows 10 VM. Getting json parsing errors on the first execution. I am not familiar with Python, apologies for not being able to debug this further.

  1. git clone https://github.com/snowskeleton/ynam.git
  2. cd ynam
  3. pip install --upgrade .
  4. cd ..
  5. git clone https://github.com/snowskeleton/mintapi.git
  6. cd mintapi
  7. pip install --upgrade .
  8. C:\Users\Administrator\source\repos> ynam --quickstart
Mint username: <my username>
Traceback (most recent call last):
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\Scripts\ynam.exe\__main__.py", line 7, in <module>
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\ynam\main.py", line 20, in main
    handleArgs()
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\ynam\main.py", line 49, in handleArgs
    sys.exit(run())
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\ynam\quickstart.py", line 37, in run
    updateStash('mint_username', input('Mint username: ').strip())
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\ynam\ynam_secrets.py", line 38, in updateStash
    secrets = {**loadSecrets()}
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\ynam\ynam_secrets.py", line 25, in loadSecrets
    fileSecrets = json.load(file)
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\json\__init__.py", line 293, in load
    return loads(fp.read(),
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\json\__init__.py", line 346, in loads
    return _default_decoder.decode(s)
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\json\decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\json\decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

What could the issue be?

Running ynam --update-mint-auth shows the same error after prompting for mint username.

Similar / Some transactions not importing

I went to import some transactions from a recent trip and realized any similarly named transactions on the same day are not imported. Happy to give more info, just not sure what would be helpful. Thanks!

EDIT: After more investigating it missed a good bunch of the transactions. I had 75 to import and it only imported the 21 most recent of the 75. Any suggestions?

Mint is being killed

Mint is dead in Jan 2024. Any other methods to sync an Apple Card to YNAB by chance?

It was sweet while it lasted at least.

easyconfig that is installed doesn't seem to be the correct one?

ynam --quickstart
Traceback (most recent call last):
  File "/home/pi/ynam/bin/ynam", line 5, in <module>
    from ynam.main import main
  File "/home/pi/ynam/lib/python3.9/site-packages/ynam/main.py", line 5, in <module>
    from .mint_api import dispenseMints
  File "/home/pi/ynam/lib/python3.9/site-packages/ynam/mint_api.py", line 2, in <module>
    from .utils import recent
  File "/home/pi/ynam/lib/python3.9/site-packages/ynam/utils.py", line 2, in <module>
    from easyConfig.main import Configer
ModuleNotFoundError: No module named 'easyConfig'

Unable to write or create .ynamrc file

After a fresh install of build 0.2.1, ynam --quickstart gives an error:

PS C:\Users\Administrator\ynam> ynam --quickstart
Traceback (most recent call last):
  File "C:\Program Files\Python310\Scripts\ynam-script.py", line 33, in <module>
    sys.exit(load_entry_point('ynam==0.2.1', 'console_scripts', 'ynam')())
  File "C:\Program Files\Python310\Scripts\ynam-script.py", line 25, in importlib_load_entry_point
    return next(matches).load()
  File "C:\Program Files\Python310\lib\importlib\metadata\__init__.py", line 171, in load
    module = import_module(match.group('module'))
  File "C:\Program Files\Python310\lib\importlib\__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "C:\Program Files\Python310\lib\site-packages\ynam\main.py", line 6, in <module>
    from .ynab_api import postTransaction as post, getTransactions as get
  File "C:\Program Files\Python310\lib\site-packages\ynam\ynab_api.py", line 62, in <module>
    class SendRequest():
  File "C:\Program Files\Python310\lib\site-packages\ynam\ynab_api.py", line 66, in SendRequest
    'Authorization': 'Bearer ' + stash.valueOf("api_key")
  File "C:\Program Files\Python310\lib\site-packages\ynam\easyConfig.py", line 55, in valueOf
    return self.secretsDump()[key]
  File "C:\Program Files\Python310\lib\site-packages\ynam\easyConfig.py", line 28, in secretsDump
    with open(self.secretsPath, 'r') as file:
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\Administrator/.ynamrc'

After creating an empty .ynamrc file at the target location, this is presented:

PS C:\Users\Administrator\ynam> ynam --quickstart
Traceback (most recent call last):
  File "C:\Program Files\Python310\Scripts\ynam-script.py", line 33, in <module>
    sys.exit(load_entry_point('ynam==0.2.1', 'console_scripts', 'ynam')())
  File "C:\Program Files\Python310\Scripts\ynam-script.py", line 25, in importlib_load_entry_point
    return next(matches).load()
  File "C:\Program Files\Python310\lib\importlib\metadata\__init__.py", line 171, in load
    module = import_module(match.group('module'))
  File "C:\Program Files\Python310\lib\importlib\__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "C:\Program Files\Python310\lib\site-packages\ynam\main.py", line 6, in <module>
    from .ynab_api import postTransaction as post, getTransactions as get
  File "C:\Program Files\Python310\lib\site-packages\ynam\ynab_api.py", line 62, in <module>
    class SendRequest():
  File "C:\Program Files\Python310\lib\site-packages\ynam\ynab_api.py", line 66, in SendRequest
    'Authorization': 'Bearer ' + stash.valueOf("api_key")
  File "C:\Program Files\Python310\lib\site-packages\ynam\easyConfig.py", line 55, in valueOf
    return self.secretsDump()[key]
  File "C:\Program Files\Python310\lib\site-packages\ynam\easyConfig.py", line 29, in secretsDump
    return json.load(file)
  File "C:\Program Files\Python310\lib\json\__init__.py", line 293, in load
    return loads(fp.read(),
  File "C:\Program Files\Python310\lib\json\__init__.py", line 346, in loads
    return _default_decoder.decode(s)
  File "C:\Program Files\Python310\lib\json\decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "C:\Program Files\Python310\lib\json\decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

Budget selection showing incorrect accounts

I currently have 3 budgets associated with my account, and once I selected my budget of choice, it showed me the account listings of a different budget. Wondering if this was a bug, I chose a different budget and it produced the correct listing of credit cards I was originally looking for.

Example: Chose Budget #1, but showed me accounts from Budget #2. Started over and chose Budget #2 and it showed me the accounts for Budget #1.

Issue with ynam quick start

Hey,

Really excited about the work you put into these apps!

I'm working on installing ynam and got a snag with the command ynam quickstart. Below is the terminal window with the error .

My machine is the Libre Le Potato. It's similar to the raspberry Pi.
ImageYNAM

Docker image on arm?

Hey,

I got the manual ynam command to pull my transactions into YNAB, yay!

Does the docker image work on arm? I got the following warning when I ran the docker run command that included the quickstart argument. Very new to docker, so my apologies if I'm doing this wrong.

WARNING: The requested image's platform (linux/amd64) does not match the detectd host platform (linux/arm64/v8) and no specific platform was requested
exec /usr/bin/sudo: exec format error

I'm using portainer to manage my containers. Do you have any experience with this?

I got portainer working just fine but now I'm trying to schedule the container to run once a day.

Here is a guide I'm using to attempt this: https://www.portainer.io/blog/using-the-edge-agent-on-your-local-docker-instance

What should my command be to run once a day? Not even sure if that is the right question. Sorry for my ignorance!

Of course non of this matters if the image can't run on arm, let me know.

Thanks again for your help!

Error when running ynam --quickstart

Thanks for creating ynam. I installed it through pip and then ran ynam --quickstart. After I enter my mint username, I hit this error

Traceback (most recent call last):
  File "/Users/Asad/.asdf/installs/python/3.11.3/bin/ynam", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/Users/Asad/.asdf/installs/python/3.11.3/lib/python3.11/site-packages/ynam/main.py", line 19, in main
    handleArgs()
  File "/Users/Asad/.asdf/installs/python/3.11.3/lib/python3.11/site-packages/ynam/main.py", line 58, in handleArgs
    sys.exit(run())
             ^^^^^
  File "/Users/Asad/.asdf/installs/python/3.11.3/lib/python3.11/site-packages/ynam/quickstart.py", line 41, in run
    updateStash('mint_username', username.strip())
  File "/Users/Asad/.asdf/installs/python/3.11.3/lib/python3.11/site-packages/ynam/ynam_secrets.py", line 59, in updateStash
    with open(arg('secrets_file'), 'w+') as file:
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '/Users/Asad/.ynam/secrets.json'

I didn't see anything about creating a .ynam folder or secrets.json file in the readme, so I'm wondering if there is an install step I'm missing.

Fresh install of YNAM cannot import RESTClient

➜ ~ ynam
Traceback (most recent call last):
File "/opt/homebrew/bin/ynam", line 5, in <module>
from ynam.main import main
File "/opt/homebrew/lib/python3.9/site-packages/ynam/main.py", line 5, in <module>
from .mint_api import MintAPI
File "/opt/homebrew/lib/python3.9/site-packages/ynam/mint_api.py", line 5, in <module>
from mintapi import RESTClient, SeleniumBrowser
ImportError: cannot import name 'RESTClient' from 'mintapi' (/opt/homebrew/lib/python3.9/site-packages/mintapi/__init__.py)

Same thing happens with ynam --quickstart.

Should I be using a different python version?

ynam all of a sudden not working

I've had ynam working percetly for many months now and all of a sudden it seems broken. Nothing has changed with my workflow and everything looks good over at Mint.com. Any suggestions?

Traceback (most recent call last):
File "/opt/homebrew/bin/ynam", line 8, in
sys.exit(main())
File "/opt/homebrew/lib/python3.9/site-packages/ynam/main.py", line 32, in main
ynab_transactions = ynab_api.get_account_transactions(
File "/opt/homebrew/lib/python3.9/site-packages/ynam/ynab_api.py", line 498, in get_account_transactions
return [
File "/opt/homebrew/lib/python3.9/site-packages/ynam/ynab_api.py", line 499, in
YNABTransaction.from_dict(xt)
File "/opt/homebrew/lib/python3.9/site-packages/ynam/ynab_api.py", line 42, in from_dict
return cls(**{
File "", line 15, in init
File "/opt/homebrew/lib/python3.9/site-packages/ynam/ynab_api.py", line 31, in post_init
if len(self.payee_name) >= 100:
TypeError: object of type 'NoneType' has no len()

Cannot import RESTClient

I'm trying to get this to run on macOS since, I assume, I am unable to run the docker image until I have populated the various config files.

After installing pyenv in order to install ynam via pip install ynam I get this error when trying to run ynam --quickstart

For Docker, have you considered passing in the required values via environment variables? Or provide documentation on how to manually populate the yaml files?

❯ ynam --quickstart
Traceback (most recent call last):
  File "/Users/hackmodford/.pyenv/versions/3.10.4/bin/ynam", line 5, in <module>
    from ynam.main import main
  File "/Users/hackmodford/.pyenv/versions/3.10.4/lib/python3.10/site-packages/ynam/main.py", line 5, in <module>
    from .mint_api import MintAPI
  File "/Users/hackmodford/.pyenv/versions/3.10.4/lib/python3.10/site-packages/ynam/mint_api.py", line 5, in <module>
    from mintapi import RESTClient, SeleniumBrowser
ImportError: cannot import name 'RESTClient' from 'mintapi' (/Users/hackmodford/.pyenv/versions/3.10.4/lib/python3.10/site-packages/mintapi/__init__.py)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.