jgillick / LendingClubAutoInvestor

A simple command line tool that will automatically invest all cash that becomes available
MIT License
47 stars 21 forks source link

Running on Windows #11

Closed ghost closed 10 years ago

ghost commented 11 years ago

I have a small issue running lcinvestor on Windows, and I can't seem to figure out what is going wrong. Here is what I have done thusfar:

  1. I have installed a variant of the 64bit Python 2.7 on Windows 8, which can be found here (http://www.activestate.com/activepython/downloads). I have also used the Windows Python 2.7 (64bit) from the official website, which both produced the same result. This version of python linked here contains pip, without additional configuration necessary.
  2. Using pip (in an admin cmd), I have installed "lendingclub" and "lcinvestor" without issue (I hope).
  3. I have used the following line in cmd to load lcinvestor:

"C:\Python27\python.exe" "C:\Python27\Scripts\lcinvestor" --config="C:\PathTo\investing.json" --email="**_" --pass="_**"

Where I have used my email and password in quotes. The investing.json I have used works fine under Linux, and so I expect has no adverse effects here.

After running the program this way, the following is displayed:

///--------------------------- $$$ ---------------------------\ | Welcome to the unofficial Lending Club investment tool |


Authenticated successfully! You have $31.59 in your account, free to invest

Now that you're signed in, let's define what you want to do

========= Prior Settings ========= Invest ALL available funds...

With at LEAST $25 available to invest Select a portfolio with an average interest rate between 13% - 100% Invest as much as $25 per loan note Add investments to: "***"

Using saved filter "_" (id:_)

Would you like to use these settings from last time? [Y/n]: Y

That's all we need. Now, as long as this is running, your account will be checke d every 60 minutes and invested if enough funds are available.

INFO: 2013-08-27 18:40 - Authenticated INFO: 2013-08-27 18:40 - Checking for funds to invest... INFO: 2013-08-27 18:40 - $ $ $ $ $ $ $ $ $ $ INFO: 2013-08-27 18:40 - Searching for a portfolio for $25 ERROR: 2013-08-27 18:40 - Failed trying to invest: global name 'LendingClubError ' is not defined

The stars above I have inserted where my filter id and "Add investments to:" section is. I do not get this error when I run the program under Linux (the program functions as expected), using the same json and nearly the same command line (I didn't need to call the python executable under Linux, of course). I am guessing my problem is simple, but I cannot figure out what is going on. Any thoughts on this would be greatly appreciated.

Also, let me know if you need any logs or other information, I can supply those hopefully. I've tried on a couple windows installs, so this should be reproduceable on any windows computer.

jgillick commented 10 years ago

Thanks for reporting this bug. I had originally built this on Mac and Linux, but today added some code to support Windows (at far as I can verify through VirtualBox). I believe the latest version will fix the bug you're reporting AND allow you to call the script without the full path (thank to a batch wrapper file).

Upgrade to the 2.1.2 version of lcinvestor:

pip install lcinvestor==2.1.2

And then call it from your command prompt:

C:\> lcinvestor --config="C:\PathTo\investing.json" --email="*****" --pass="*****"

Let me know if that works.

ghost commented 10 years ago

Excellent! The new version works flawlessly now! Thanks so much for your work on this program.