Closed kfchou closed 4 years ago
Hey, @kfchou. Thanks for opening up an issue.
Sounds like you're not on a unix machine. This brings up a good point that I should be more transparent in the instructions.
For the step with virtualenv
, it sounds like you created a folder named base
instead of venv
. If that's the case, then it should be fine. Just whenever activating the virtualenv
you would run source base/bin/activate
instead of source venv/bin/activate
.
touch
is a command that you use on unix that creates an empty file. The reason you don't see credentials.py
is because you weren't able to touch
it into the project.
I'm not sure what command you would need, but basically create an empty file named credentials.py
in the root of the project and then copy and paste the snippet from the README. Finally put your Robinhood credentials where the empty strings are. We obviously create this file locally because it's sensitive information.
I hope this solves any remaining issues you have. Feel free to write back or open a new issue if you're running into any other problems.
Thanks for your response @anthonyk1225
You're correct, I'm using Windows. Not too familiar with unix based systems and don't have experience running virtual machines. Thanks for bearing with me. I'm using anaconda prompt to run these codes. After running
$ virtualenv venv
the console displays
(base) repo\folder>
so now, if I run
(base) repo\folder> source venv/bin/activate
console returns
'source' is not recognized as an internal or external command, operable program or batch file
the code (base) repo\folder> pip3 install -r requirements.txt
runs without issue
if I try to run
(base) repo\folder> python3 app.py
console returns
An error was found, but returning just with the version: No module named '_curses' Traceback (most recent call last): File "app.py", line 8, in <module> inquirer.List( AttributeError: module 'inquirer' has no attribute 'List'
I feel like I'm missing something fundamental...
With regard to credentials.py - why do you recommend using the touch
command, instead of including an blank template in the repo?
Cheers
@kfchou Once again, you've exposed my bias for unix.
source
is a unix command, so that error is expected. I did a quick search and came up with an answer here on how to properly activate the virtualenv using anaconda. SO link, 4th answer from the top
$ pip3 install -U pip virtualenv
$ virtualenv --system-site-packages -p python ./venv
$ virtualenv --system-site-packages -p python3 ./venv
$ .\venv\Scripts\activate
After activating, run pip3 install -r requirements.txt
. It will install these packages within the virtualenv
scope and you shouldn't get that inquirer
error.
The credentials.py
file shouldn't be tracked at all due to the sensitive information it will contain. This is why it's included in the .gitignore
and doesn't appear within the project. You could do some hacky stuff where you push it up and then don't track it but then that should overwrite the version you have locally every time which would be annoying.
Keep me posted on the progress!
Thanks for the link, the commend venv\Scripts\activate
worked for me!
pip3 install -r requirements.txt
successfully installed the packages. Afterwards, I ran python app.py
and encountered the same error as before:
An error was found, but returning just with the version: No module named '_curses' Traceback (most recent call last): File "app.py", line 8, in <module> inquirer.List( AttributeError: module 'inquirer' has no attribute 'List'
I've made sure that I'm using python 3 (version 3.6.3), and that the inquirer package is installed (console message Requirement already satisfied: inquirer==2.6.3
)
any ideas?
Hey thanks a lot for bringing this to my attention. It turns out that package doesn't work on windows at all.
I removed the inquirer
package and now use PyInquirer
instead. It should work on windows if you follow the same steps as before. It'd prob be a good idea to remove the virtualenv
you created and start anew.
Sorry for all the trouble. I appreciate all the time you're taking trying different things.
Edit: The most up to date version is the master
branch
Hey don't apologize. Thank you for creating this project. I'm curious to see how this compares to robinhood-to-csv by joshfraser.
I pulled the latest version and was able to run python app.py
without error.
However, when I selected xlsx at the first prompt, a blank file was created with no content (there are column headers present, but nothing else). When I selected json, I am prompted to enter my MFA code. When I examined the .db file that was created, it was again blank.
Can you look into this? Thanks.
Nice one. Glad you were able to get it set up.
So as you've seen, you have two choices. You can either pull your history down from robinhood json
, or use that data to generate xlsx files with xlsx
.
If you don't have any history pulled from robinhood, then when you run the xlsx
option, it will just generate a blank xlsx file for the respective entity.
When you run the json
command and attempt to pull your robinhood history, it will ask you for your 2FA code, if you have that enabled. After you enter that, it's sent to robinhood and that returns the token we need in order to pull your data.
What I would suggest to do, is delete that robinhood.db
file. Select json
and then pull each entity you want. If you get challenged, just enter the code robinhood sends you. After you've pulled down the history, run the xlsx
command for all the same entities.
You can see your history in the data
folder and you can see the excel files in the xlsx
folder.
I plan on adding an option that just does all of them for one command, just haven't implemented it yet.
Keep the feedback coming!
Ah, I see, it's a two step process.
Here's a suggestion for the readme file, for Windows users like myself:
UInder Installation, add a section for Windows users:
$ cd to\wherever\it\is
$ virtualenv venv
$ venv\scripts\activate
(venv) $ pip3 install -r requirements.txt
Under credentials file, note that users need to create a blank file. For example:
(venv) $ touch credentials.py
. Alternatively, create a file manually.Seems like everything's working now. I'll open a new thread for other suggestions/feedback.
Btw, where can I find total P/L?
Glad to see everything worked.
I just pushed up changes to the options xlsx file. You'll be able to find a second tab in dividends, options and orders, respectively. It has your P/L and also your current holdings.
after running
$ virtualenv venv
my console shows (base) instead of (venv), is this an issue?When I tried to run this line
(venv) $ touch credentials.py
the console responds withAfter forking, I can't find the file credentials.py in the downloaded files. Where is the file located?
Thanks in advance..