Open micksulley opened 6 months ago
@micksulley It seems as if you are are missing some of the new dependencies. Did you install via pip? If not could you try running (from the root directory):
python setup.py install
I think I am doing something wrong here.
I uninstalled and installed again withpip install yahoofinancials
I then ran setup.py and this is what I get
mick@holly:~/.local/lib/python3.10/site-packages/yahoofinancials$ sudo python setup.py install
running install
/usr/lib/python3/dist-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
/usr/lib/python3/dist-packages/setuptools/command/easy_install.py:158: EasyInstallDeprecationWarning: easy_install command is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
running bdist_egg
running egg_info
writing yahoofinancials.egg-info/PKG-INFO
writing dependency_links to yahoofinancials.egg-info/dependency_links.txt
writing requirements to yahoofinancials.egg-info/requires.txt
writing top-level names to yahoofinancials.egg-info/top_level.txt
error: package directory 'yahoofinancials' does not exist
@micksulley Did you ever resolve this? You shouldn't need to run setup.py if installing via pip.
I did reply via email, here it is again. No I didn't resolve it. I dropped it over the holiday but just tried again. I re-installed and ran test_yahoofinancials.py downloaded from the website.
It doesn't fail, but it doesn't finish either. It has been running for 2-3 hours so far.
I get loads of warning messages, e.g
ResourceWarning: Enable tracemalloc to get the object allocation traceback /usr/lib/python3.10/queue.py:133: ResourceWarning: unclosed <ssl.SSLSocket fd=13, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=6, laddr=('192.168.1.99', 33920), raddr=('34.255.244.78', 443)> with self.not_full: ResourceWarning: Enable tracemalloc to get the object allocation traceback /home/mick/.local/lib/python3.10/site-packages/yahoofinancials/data.py:208: ResourceWarning: unclosed <ssl.SSLSocket fd=17, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=6, laddr=('192.168.1.99', 53568), raddr=('87.248.114.12', 443)>
session, crumb = _init_session(None, proxies=self._get_proxy(), timeout=self.timeout)
ResourceWarning: Enable tracemalloc to get the object allocation traceback /usr/lib/python3.10/ssl.py:1184: ResourceWarning: unclosed <ssl.SSLSocket fd=19, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=6, laddr=('192.168.1.99', 59874), raddr=('54.77.196.184', 443)> return self._sslobj.getpeercert(binary_form)
There are loads of messages like that. My server is 192.168.1.99. Running Ubuntu Server 22.04.3 LTS (GNU/Linux 5.15.0-91-generic x86_64)
I left it running and it did eventually finish with an error after 4 hrs plus. This is the end of the output -
Traceback (most recent call last): File "/home/mick/v07_0/test_yahoofinancials.py", line 141, in test_yf_module_methods out = self.test_yf_stock_single.get_ten_day_avg_daily_volume() File "/home/mick/.local/lib/python3.10/site-packages/yahoofinancials/yf.py", line 249, in get_ten_day_avg_daily_volume return self._stock_summary_data('averageDailyVolume10Day') File "/home/mick/.local/lib/python3.10/site-packages/yahoofinancials/yf.py", line 183, in _stock_summary_data sum_data = self.get_summary_data() File "/home/mick/.local/lib/python3.10/site-packages/yahoofinancials/yf.py", line 136, in get_summary_data return self.get_clean_data(self.get_stock_tech_data('summaryDetail'), 'summaryDetail') File "/home/mick/.local/lib/python3.10/site-packages/yahoofinancials/data.py", line 660, in get_stock_tech_data return self.get_stock_data(tech_type=tech_type) File "/home/mick/.local/lib/python3.10/site-packages/yahoofinancials/data.py", line 631, in get_stock_data data.update(dict_ent) TypeError: 'NoneType' object is not iterable
Ran 7 tests in 15978.086s
FAILED (errors=1)
My code has started to fail again over the last few days. Running Ubuntu Server.I have installed v1.20 and rebooted. If I run the demo.py script this is what I see -
Have I got something wrong or have Yahoo changed things again and I need to wait for an update? Thanks Mick