jgillick / LendingClubAutoInvestor

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

Does not run #21

Closed fblanco closed 10 years ago

fblanco commented 10 years ago

I had the older version and everything was fine. Then needed the update after lendingclub changed their site. Installed it but got the following error:

fabrizio:~ fblanco$ sudo pip install lcinvestor Downloading/unpacking lcinvestor Downloading lcinvestor-2.2.1.tar.gz (49kB): 49kB downloaded Running setup.py egg_info for package lcinvestor

Downloading/unpacking lendingclub>=0.1.7 (from lcinvestor) Downloading lendingclub-0.1.7.tar.gz (42kB): 42kB downloaded Running setup.py egg_info for package lendingclub

Requirement already satisfied (use --upgrade to upgrade): argparse>=1.2.1 in /Library/Python/2.7/site-packages (from lcinvestor) Requirement already satisfied (use --upgrade to upgrade): pyyaml>=3.09 in /Library/Python/2.7/site-packages (from lcinvestor) Requirement already satisfied (use --upgrade to upgrade): pause>=0.1.2 in /Library/Python/2.7/site-packages (from lcinvestor) Requirement already satisfied (use --upgrade to upgrade): requests>=1.2.3 in /Library/Python/2.7/site-packages (from lendingclub>=0.1.7->lcinvestor) Requirement already satisfied (use --upgrade to upgrade): beautifulsoup4>=4.1.3 in /Library/Python/2.7/site-packages (from lendingclub>=0.1.7->lcinvestor) Requirement already satisfied (use --upgrade to upgrade): html5lib>=0.95 in /Library/Python/2.7/site-packages (from lendingclub>=0.1.7->lcinvestor) Requirement already satisfied (use --upgrade to upgrade): pybars>=0.0.4 in /Library/Python/2.7/site-packages (from lendingclub>=0.1.7->lcinvestor) Requirement already satisfied (use --upgrade to upgrade): six in /Library/Python/2.7/site-packages (from html5lib>=0.95->lendingclub>=0.1.7->lcinvestor) Requirement already satisfied (use --upgrade to upgrade): PyMeta in /Library/Python/2.7/site-packages (from pybars>=0.0.4->lendingclub>=0.1.7->lcinvestor) Installing collected packages: lcinvestor, lendingclub Running setup.py install for lcinvestor changing mode of build/scripts-2.7/lcinvestor from 644 to 755 changing mode of build/scripts-2.7/lcinvestor.bat from 644 to 755

changing mode of /usr/local/bin/lcinvestor to 755
changing mode of /usr/local/bin/lcinvestor.bat to 755

Running setup.py install for lendingclub

Successfully installed lcinvestor lendingclub Cleaning up... fabrizio:~ fblanco$ lcinvestor Traceback (most recent call last): File "/usr/local/bin/lcinvestor", line 134, in investor = lcinvestor.AutoInvestor(verbose=isVerbose) File "/Library/Python/2.7/site-packages/lcinvestor/init.py", line 69, in init self.settings = Settings(investor=self, settings_dir=self.app_dir, logger=self.logger, verbose=self.verbose) File "/Library/Python/2.7/site-packages/lcinvestor/settings/init.py", line 91, in init self.investing = copy.deepcopy(self.default_investing) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/copy.py", line 163, in deepcopy y = copier(x, memo) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/copy.py", line 257, in _deepcopy_dict y[deepcopy(key, memo)] = deepcopy(value, memo) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/copy.py", line 190, in deepcopy y = _reconstruct(x, rv, 1, memo) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/copy.py", line 358, in _reconstruct y[key] = value File "/Library/Python/2.7/site-packages/lendingclub/filters.py", line 195, in setitem self.normalize() File "/Library/Python/2.7/site-packages/lendingclub/filters.py", line 233, in normalize self.normalize_grades() File "/Library/Python/2.7/site-packages/lendingclub/filters.py", line 203, in __normalize_grades if self['grades']['All'] is True: File "/Library/Python/2.7/site-packages/lendingclub/filters.py", line 183, in __getitem return dict.getitem(self, key) KeyError: 'grades'

eli88fine commented 10 years ago

I re-installed lcinvestor today and see this issue also. Previously, it had been working fine

git-hemant commented 10 years ago

+1 - I am seeing this issue as well.

Downloading/unpacking argparse>=1.2.1 (from lcinvestor) Could not find a version that satisfies the requirement argparse>=1.2.1 (from lcinvestor) (from versions: 0.1.0, 0.2.0, 0.3.0, 0.4.0, 0.5.0, 0.6.0, 0.7.0, 0.8.0, 0.9.0, 0.9.1, 1. 0.1, 1.0, 1.1) Some externally hosted files were ignored (use --allow-external to allow). Cleaning up... No distributions matching the version for argparse>=1.2.1 (from lcinvestor) Storing debug log for failure in C:\Users\Hemant\pip\pip.log

snikolaev commented 10 years ago

I get the same issue. Did this get solved?

ghost commented 10 years ago

I have not had the time to look into this yet. What happens when you manually try to install argparse: https://pypi.python.org/pypi/argparse/1.2.1

fblanco commented 10 years ago

Just tried it installing argparse 1.2.1 by hand, still same problem: imac:argparse-1.2.1 fabrizio$ sudo python setup.py install Password: running install running bdist_egg running egg_info writing argparse.egg-info/PKG-INFO writing top-level names to argparse.egg-info/top_level.txt writing dependency_links to argparse.egg-info/dependencylinks.txt reading manifest file 'argparse.egg-info/SOURCES.txt' reading manifest template 'MANIFEST.in' warning: no previously-included files matching '.pyc' found anywhere in distribution warning: no previously-included files matching '.pyo' found anywhere in distribution warning: no previously-included files matching '.orig' found anywhere in distribution warning: no previously-included files matching '_.rej' found anywhere in distribution no previously-included directories found matching 'doc/_build' no previously-included directories found matching 'env24' no previously-included directories found matching 'env25' no previously-included directories found matching 'env26' no previously-included directories found matching 'env27' writing manifest file 'argparse.egg-info/SOURCES.txt' installing library code to build/bdist.macosx-10.9-intel/egg running install_lib running build_py creating build creating build/lib copying argparse.py -> build/lib creating build/bdist.macosx-10.9-intel creating build/bdist.macosx-10.9-intel/egg copying build/lib/argparse.py -> build/bdist.macosx-10.9-intel/egg byte-compiling build/bdist.macosx-10.9-intel/egg/argparse.py to argparse.pyc creating build/bdist.macosx-10.9-intel/egg/EGG-INFO copying argparse.egg-info/PKG-INFO -> build/bdist.macosx-10.9-intel/egg/EGG-INFO copying argparse.egg-info/SOURCES.txt -> build/bdist.macosx-10.9-intel/egg/EGG-INFO copying argparse.egg-info/dependency_links.txt -> build/bdist.macosx-10.9-intel/egg/EGG-INFO copying argparse.egg-info/top_level.txt -> build/bdist.macosx-10.9-intel/egg/EGG-INFO zip_safe flag not set; analyzing archive contents... creating dist creating 'dist/argparse-1.2.1-py2.7.egg' and adding 'build/bdist.macosx-10.9-intel/egg' to it removing 'build/bdist.macosx-10.9-intel/egg' (and everything under it) Processing argparse-1.2.1-py2.7.egg Copying argparse-1.2.1-py2.7.egg to /Library/Python/2.7/site-packages Adding argparse 1.2.1 to easy-install.pth file

Installed /Library/Python/2.7/site-packages/argparse-1.2.1-py2.7.egg Processing dependencies for argparse==1.2.1 Finished processing dependencies for argparse==1.2.1 imac:argparse-1.2.1 fabrizio$ imac:argparse-1.2.1 fabrizio$ imac:argparse-1.2.1 fabrizio$ lcinvestor Traceback (most recent call last): File "/usr/local/bin/lcinvestor", line 134, in investor = lcinvestor.AutoInvestor(verbose=isVerbose) File "/Library/Python/2.7/site-packages/lcinvestor/init.py", line 69, in init self.settings = Settings(investor=self, settings_dir=self.app_dir, logger=self.logger, verbose=self.verbose) File "/Library/Python/2.7/site-packages/lcinvestor/settings/init.py", line 91, in init self.investing = copy.deepcopy(self.default_investing) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/copy.py", line 163, in deepcopy y = copier(x, memo) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/copy.py", line 257, in _deepcopy_dict y[deepcopy(key, memo)] = deepcopy(value, memo) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/copy.py", line 190, in deepcopy y = _reconstruct(x, rv, 1, memo) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/copy.py", line 358, in _reconstruct y[key] = value File "/Library/Python/2.7/site-packages/lendingclub/filters.py", line 195, in setitem self.normalize() File "/Library/Python/2.7/site-packages/lendingclub/filters.py", line 233, in normalize self.normalize_grades() File "/Library/Python/2.7/site-packages/lendingclub/filters.py", line 203, in __normalize_grades if self['grades']['All'] is True: File "/Library/Python/2.7/site-packages/lendingclub/filters.py", line 183, in __getitem return dict.getitem(self, key) KeyError: 'grades'

ghost commented 10 years ago

@fblanco Your error looks different than @git-hemant. Hopefully installing argparse parse manually can help him. I'll have to dig into the LendingClub module to figure out what's going on with your error.

fblanco commented 10 years ago

@jngillick did you have a chance to look at this yet?

ghost commented 10 years ago

Not yet, but I will try to look at it in the next few days

snikolaev commented 10 years ago

I have that same error with the latest version: "KeyError: 'grades'".

Thanks, Sergey Date: Tue, 22 Apr 2014 14:50:28 -0700 From: notifications@github.com To: LendingClubAutoInvestor@noreply.github.com CC: sergey_nikolaev@hotmail.com Subject: Re: [LendingClubAutoInvestor] Does not run (#21)

Not yet, but I will try to look at it in the next few days

— Reply to this email directly or view it on GitHub.

mkporwit commented 10 years ago

I get the same error as the original poster, @git-hemant , when running on Ubuntu 14.04 in a virtualenv.

ghost commented 10 years ago

I also get the "KeyError: 'grades'" error in ubuntu 13.10.

ghost commented 10 years ago

I can't seem to reproduce the bug myself, but I committed some code on a suspicion. Update the modules:

If you still have the issue, I'll need to know what your investor.json file looks like so I can test that part of the code. This file should live at: ~/.lcinvestor/investing.json. You can remove your email from the file to keep it more anonymous when you post it here (all the other values are pretty generic and non-personal).

eli88fine commented 10 years ago

Hello, I typed in "sudo pip install argparse --upgrade" and it said argparse was already good.

I did "sudo pip install lcinvestor --upgrade" and "sudo pip install lendingclub --upgrade", and it downloaded the new lcinvestor and then said lendingclub was up to date.

I tried running lcinvestor and got a similar error again.

Here is the line in the python script that I use to call lcinvestor: call (['/usr/local/bin/lcinvestor --config=/home/pi/inputSettings/lendingClubPortfolios/lc_Auto36.json --email=' + lcUser + ' --pass=' + lcEntry + ' --quiet --run-once > allout.txt 2>&1'], shell=True)

Here is the error as shown in the "allout.txt" file: Traceback (most recent call last): File "/usr/local/bin/lcinvestor", line 134, in investor = lcinvestor.AutoInvestor(verbose=isVerbose) File "/usr/local/lib/python2.7/dist-packages/lcinvestor/init.py", line 69, in init self.settings = Settings(investor=self, settings_dir=self.app_dir, logger=self.logger, verbose=self.verbose) File "/usr/local/lib/python2.7/dist-packages/lcinvestor/settings/init.py", line 91, in init self.investing = copy.deepcopy(self.default_investing) File "/usr/lib/python2.7/copy.py", line 163, in deepcopy y = copier(x, memo) File "/usr/lib/python2.7/copy.py", line 257, in _deepcopy_dict y[deepcopy(key, memo)] = deepcopy(value, memo) File "/usr/lib/python2.7/copy.py", line 190, in deepcopy y = _reconstruct(x, rv, 1, memo) File "/usr/lib/python2.7/copy.py", line 358, in _reconstruct y[key] = value File "/usr/local/lib/python2.7/dist-packages/lendingclub/filters.py", line 195, in setitem self.normalize() File "/usr/local/lib/python2.7/dist-packages/lendingclub/filters.py", line 234, in normalize self.normalize_progress() File "/usr/local/lib/python2.7/dist-packages/lendingclub/filters.py", line 214, in normalize_progress progress = self['funding_progress'] File "/usr/local/lib/python2.7/dist-packages/lendingclub/filters.py", line 183, in getitem return dict.getitem(self, key) KeyError: 'funding_progress'

Here is my json file: { "min_cash": 25,

"min_percent": 19,

"max_percent": 27,

"max_per_note": 50,

"portfolio": "Auto36",

"filter_id": 8272614, "filters": {

"exclude_existing": true,

"funding_progress": 90,

"term60month": true,

"term36month": true,

"grades": {

  "All": true,

  "A": false,
  "B": false,
  "C": false,
  "D": false,
  "E": false,
  "F": false,
  "G": false
}

}
}

Please let me know if any other information I can provide would be helpful to you. I am running this on a RaspberryPi with the default operating system. As I mentioned before, previously you code was working beautifully for me, but now there is this error.

Thanks, Eli

mkporwit commented 10 years ago

Yup, I get the same error as @eli88fine now -- KeyError: 'funding_progress', on Ubuntu 14.04

I have no investing.json file in my ~/.lcinvestor directory, nor anywhere else in my home dir.

fblanco commented 10 years ago

@jngillick after update like you recommended got same error as @eli88fine

File "/usr/local/bin/lcinvestor", line 134, in investor = lcinvestor.AutoInvestor(verbose=isVerbose) File "/Library/Python/2.7/site-packages/lcinvestor/init.py", line 69, in init self.settings = Settings(investor=self, settings_dir=self.app_dir, logger=self.logger, verbose=self.verbose) File "/Library/Python/2.7/site-packages/lcinvestor/settings/init.py", line 91, in init self.investing = copy.deepcopy(self.default_investing) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/copy.py", line 163, in deepcopy y = copier(x, memo) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/copy.py", line 257, in _deepcopy_dict y[deepcopy(key, memo)] = deepcopy(value, memo) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/copy.py", line 190, in deepcopy y = _reconstruct(x, rv, 1, memo) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/copy.py", line 358, in _reconstruct y[key] = value File "/Library/Python/2.7/site-packages/lendingclub/filters.py", line 195, in setitem self.normalize() File "/Library/Python/2.7/site-packages/lendingclub/filters.py", line 234, in normalize self.normalize_progress() File "/Library/Python/2.7/site-packages/lendingclub/filters.py", line 214, in normalize_progress progress = self['funding_progress'] File "/Library/Python/2.7/site-packages/lendingclub/filters.py", line 183, in getitem return dict.getitem(self, key) KeyError: 'funding_progress'

The error, I believe, happens before any attempt of reading configuration file. I get same error by running lcinvestor without parameters or with parameters pointing to a specific configuration file.

gtfann commented 10 years ago

I installed the new version of lcinvestor today and now I am getting this error. I deleted the default config file investing.json. I ran lcinvestor and got the error again. Here is the log.

H:>lcinvestor Traceback (most recent call last): File "C:\Python27\Scripts\lcinvestor", line 134, in investor = lcinvestor.AutoInvestor(verbose=isVerbose) File "C:\Python27\lib\site-packages\lcinvestorinit.py", line 69, in ini t self.settings = Settings(investor=self, settings_dir=self.app_dir, logger=se lf.logger, verbose=self.verbose) File "C:\Python27\lib\site-packages\lcinvestor\settingsinit.py", line 91, in init self.investing = copy.deepcopy(self.default_investing) File "C:\Python27\lib\copy.py", line 163, in deepcopy y = copier(x, memo) File "C:\Python27\lib\copy.py", line 257, in _deepcopy_dict y[deepcopy(key, memo)] = deepcopy(value, memo) File "C:\Python27\lib\copy.py", line 190, in deepcopy y = _reconstruct(x, rv, 1, memo) File "C:\Python27\lib\copy.py", line 358, in _reconstruct y[key] = value File "C:\Python27\lib\site-packages\lendingclub\filters.py", line 195, in se titem self.normalize() File "C:\Python27\lib\site-packages\lendingclub\filters.py", line 234, in no rmalize self.normalize_progress() File "C:\Python27\lib\site-packages\lendingclub\filters.py", line 214, in no rmalize_progress progress = self['funding_progress'] File "C:\Python27\lib\site-packages\lendingclub\filters.py", line 183, in ge titem return dict.getitem(self, key) KeyError: 'funding_progress'

jgillick commented 10 years ago

I've finally been able to reliably reproduce this bug. I'll try to get a fix together in the next few days.

fblanco commented 10 years ago

Great news. @jgillick Thank you.

ghost commented 10 years ago

Good news, new version 2.2.3 should fix this issue! I just verified it on Ubuntu 14.04. Try it and let me know.

fblanco commented 10 years ago

@jngillick it works now! Thank you very much!