Closed BabblingBafoon closed 1 year ago
This indeed is a new issue!
It looks like something about the response from Mint isn't formatted to ynam's liking, and I'm doing a poor job of validation. Try and manually examine the item['fiData']
object in the return response, anything look fishy?
Would that be in a log file somewhere? I didn't see anything in the ~/.ynam
folder that looks like a log file, so not sure where to look for what you are asking.
Apologies, but my troubleshooting foo is weak. ๐ I feel lucky and proud that I got this to work at all!
I just added lines 52 and 53 to mint_api.py
...
logger.info(f"Found {len(items)} transactions in Mint.")
[logger.debug(item['fiData']) for item in items]
...
update ynam (pip install -U ynam
, or however you installed it the first time), and run it with the debug flag (ynam --debug
). This will dump all Mint transactions (and a bunch of other garbage) to your console. For example, one of my transactions looks like
DEBUG:ynam:
{
'id': 'f40c881c-c71d-4e73-83f9-9b3e98ea71b6',
'date': '2022-10-30',
'amount': -59.82,
'description': '<redacted payee name>',
'inferredDescription': '<redacted payee name>',
'inferredCategory': {
'id': '89369599_102',
'name': 'Amusement'
}}
I updated ynam, which appeared to be successful. I ran it with debug flag and the output seems really strange to me (at least, the parts that show transactions). It was showing transactions from like 2015 and I'm pretty positive they are from my checking account, NOT my Apple Card. That in itself may point to the source of the problem??
The quickstart doesn't ask for choosing the Apple Card from my Mint account... just what to put the transactions in under the YNAB account, which I did.
How can I help fix it grabbing the (seemingly) wrong account inside Mint?
That could indeed be the problem. I mention it somewhere in the README, but basically ynam assumes that you'll only have your Apple Card linked.
As I see it, you could either go about removing the offending transactions from Mint (assuming you don't need them for historical purposes), or you could make a new Intuit account just for use with ynam. I'm more inclined to the second option, as it's best practice to give all your robots unique login credentials.
Doh!!! I totally misunderstood that recommendation as only have one "Apple Card" account linked to your Mint account. Now I completely get it and it makes total sense. Honestly, I kind of feel like an idiot for not doing this anyway. Ugh. ๐ ๐
Sorry man. Thanks for the work on this and helping figure out my mistake. You rock!!
I'm glad it worked! I should probably surface a better error message for this issue in the future.
Don't feel too bad about needing help for this. We've all been there at some point.
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:
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?