JerBouma / ThePassiveInvestor

Passive Investing for the Average Joe
https://www.jeroenbouma.com/
MIT License
530 stars 67 forks source link

Getting errors running your base script #8

Closed lrauhockey closed 1 year ago

lrauhockey commented 1 year ago

Running just your demo flows...

import thepassiveinvestor as pi

etf_list = ['BOTZ', 'ROBO', 'IRBO', 'ROBT']
pi.create_ETF_report(etf_list, 'MFReport.xlsx')

--- Result -- (sf) pages % python funds.py Not able to collect data for BOTZ Not able to collect data for ROBO Not able to collect data for IRBO Not able to collect data for ROBT Traceback (most recent call last): File "/myproject/pages/funds.py", line 11, in msft.info File "/sf/lib/python3.11/site-packages/yfinance/ticker.py", line 138, in info return self.get_info() ^^^^^^^^^^^^^^^ File "/sf/lib/python3.11/site-packages/yfinance/base.py", line 1475, in get_info data = self._quote.info ^^^^^^^^^^^^^^^^ File "/sf/lib/python3.11/site-packages/yfinance/scrapers/quote.py", line 95, in info self._scrape(self.proxy) File "/sf/lib/python3.11/site-packages/yfinance/scrapers/quote.py", line 124, in _scrape json_data = self._data.get_json_data_stores(proxy=proxy) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/sf/lib/python3.11/site-packages/yfinance/data.py", line 41, in wrapped return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "/sf/lib/python3.11/site-packages/yfinance/data.py", line 311, in get_json_data_stores stores = decrypt_cryptojs_aes_stores(data, keys) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/sf/lib/python3.11/site-packages/yfinance/data.py", line 162, in decrypt_cryptojs_aes_stores raise Exception("yfinance failed to decrypt Yahoo data response") Exception: yfinance failed to decrypt Yahoo data response

JerBouma commented 1 year ago

Given that the dependency, yfinance, is suffering from data collection issues I'll see if things change in the next week otherwise I sadly have to depreciate the package.

lrauhockey commented 1 year ago

Yeah i have been trying to help debug... with scraping it is a cat/mouse game

On Tue, Feb 28, 2023 at 6:57 PM Jeroen Bouma @.***> wrote:

Given that the dependency, yfinance, is suffering from data collection issues I'll see if things change in the next week otherwise I sadly have to depreciate the package.

— Reply to this email directly, view it on GitHub https://github.com/JerBouma/ThePassiveInvestor/issues/8#issuecomment-1449104400, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGBUATAPHSJEL6ON6V7FQCTWZ2GG7ANCNFSM6AAAAAAVJ6UEBA . You are receiving this because you authored the thread.Message ID: @.***>

-- @. @. Larry Gold of course

Japemen commented 1 year ago

I have the same, are able to fix it?

lrauhockey commented 1 year ago

No ... other stuff I do have that was dependent on yfinance - i am moving to yahooquery - not a 1 for 1 - but yahoo has done a good job and preventing scraping

https://github.com/dpguthrie/yahooquery

On Fri, Mar 10, 2023 at 10:44 AM Japemen @.***> wrote:

I have the same, are able to fix it?

— Reply to this email directly, view it on GitHub https://github.com/JerBouma/ThePassiveInvestor/issues/8#issuecomment-1463991036, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGBUATGU3MAYRY7RMTD4B53W3ND6FANCNFSM6AAAAAAVJ6UEBA . You are receiving this because you authored the thread.Message ID: @.***>

-- @. @. Larry Gold of course

JerBouma commented 1 year ago

@lrauhockey @Japemen

Problem solved, switched from yfinance to yahooquery which resolves the issue. Please upgrade to the latest version (v1.2).

image
lrauhockey commented 1 year ago

Great!!!

As stated i Have a few things that I wrote myself - and had to convert - will play with it... Thanks for upgraded it -

Have a good week.. LrAu

On Tue, Mar 21, 2023 at 6:04 AM Jeroen Bouma @.***> wrote:

@lrauhockey https://github.com/lrauhockey @Japemen https://github.com/Japemen

Problem solved, switched from yfinance to yahooquery which resolves the issue. Please upgrade to the latest version (v1.2).

[image: image] https://user-images.githubusercontent.com/46355364/226574052-6d9e9075-170f-4ef4-acb1-42b2e9126134.png

— Reply to this email directly, view it on GitHub https://github.com/JerBouma/ThePassiveInvestor/issues/8#issuecomment-1477561333, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGBUATEWX5P5UYD6ZMSX7TLW5F4MNANCNFSM6AAAAAAVJ6UEBA . You are receiving this because you were mentioned.Message ID: @.***>

-- @. @. Larry Gold of course