Closed MLDERES closed 2 years ago
I was having the same problem. The issue is line 75 that's calling yahoo_query = YahooFantasySportsQuery(...)
I found a solution is if you leave offline = False
, and then just comment out # consumer_key=os.environ["YFPY_CONSUMER_KEY"]
and # consumer_secret=os.environ["YFPY_CONSUMER_SECRET"]
then the function call will use your private.json to authenticate with yahoo
I was having the same problem. The issue is line 75 that's calling yahoo_query = YahooFantasySportsQuery(...)
I found a solution is if you leave
offline = False
, and then just comment out# consumer_key=os.environ["YFPY_CONSUMER_KEY"]
and# consumer_secret=os.environ["YFPY_CONSUMER_SECRET"]
then the function call will use your private.json to authenticate with yahoo
I can confirm that this fixes the issue.
Hi @MLDERES, my apologies for the very long delay in responding. Thank you @jtvanlew and @derektgardner for figuring out the issue for @MLDERES. I had updated the tests to use a .env
file but had not updated the documentation, etc. I just published the latest release (v4.0.0) of YFPY and it includes fixes for this issue.
It seems that something is not quite right, or maybe I've not followed the instructions close enough. When I try to run the test_yfpf.py file I'm getting a KeyError: 'YFPY_CONSUMER_KEY'
So I figured maybe this is because there was a change and environment variables were used instead, so I created a .env file (again same folder), and run python -m test_yfpy.py, same issue.
Running on Windows 10