snowskeleton / ynam

Mint-to-YNAB translator
Apache License 2.0
38 stars 0 forks source link

Fresh install of YNAM cannot import RESTClient #31

Closed nathanpaul closed 1 year ago

nathanpaul commented 1 year ago

➜ ~ 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?

snowskeleton commented 1 year ago

Usually errors involving mintapi are caused by installing the wrong version somehow. I just pinned a working version in setup.py like so:

...
install_requires=['mintapi@git+http://github.com/snowskeleton/mintapi'],
...

but you might try manually installing it, such as with:

pip install git+http://github.com/snowskeleton/mintapi

The specific python version shouldn't matter, but if you want to match it up, I'm using 3.10.7 for development, so that's a known good version.

nathanpaul commented 1 year ago

Interesting. Looks like when I installed ynam with pip, somehow version 2.12 of the mintapi got installed with it. When I uninstalled that version and reinstalled from git, it installed version 2.11 and is now working as intended. Thank you for your work!