Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

profit_extractor.py runs into AttributeError for option trades #72

Open
atiq-cs opened this issue Apr 9, 2022 · 2 comments
Open

profit_extractor.py runs into AttributeError for option trades #72

atiq-cs opened this issue Apr 9, 2022 · 2 comments

Comments

@atiq-cs
Copy link

atiq-cs commented Apr 9, 2022

While the run without --profit works without problems, profit calculation is encountering DataFrame not having certain attribute!

$ python  csv-options-export.py --profit
Username:
Password:
MFA:

Generated device token: 
Pulling trades. Please wait...
0 queued trades and 688 executed trades found in your account.
Choose a filename or press enter to save to `option-trades.csv`:

What is your tax multiplier -default 0.25 (25%) ?
Traceback (most recent call last):
  File "D:\python\robinhood-to-csv\csv-options-export.py", line 164, in <module>
    profit_csv = profit_extractor(csv, filename)
  File "D:\python\robinhood-to-csv\profit_extractor.py", line 23, in profit_extractor
    handle['last_transaction_at'] = pd.to_datetime(handle.last_transaction_at)
  File "D:\python\robinhood-to-csv\env\lib\site-packages\pandas\core\generic.py", line 5575, in __getattr__
    return object.__getattribute__(self, name)
AttributeError: 'DataFrame' object has no attribute 'last_transaction_at'

Python Info

$ python -V
Python 3.10.4
@hhhanying
Copy link

May I ask how you log in? It seems that the password doesn't work. And I tried the way in readme to get the token but also failed.

@atiq-cs
Copy link
Author

atiq-cs commented Apr 17, 2022

@hhhanying are you trying to fix this bug? or just trying to log in?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants