【发布时间】:2021-12-10 01:27:26
【问题描述】:
当我尝试与 yahoo Fantasy api 建立连接时,我不断收到此错误。这就是我下面的内容。
import yahoo_fantasy_api as yfa
import pandas as pd
from nba_api.stats.endpoints import playergamelog
from nba_api.stats.static import players
import argparse
import datetime
import json
from yahoo_oauth import OAuth2
creds = {'consumer_key': 'username',
'consumer_secret': 'consumer_secret', 'league_id': league_id}
with open('authorization_info_template.json', "w") as f:
f.write(json.dumps(creds))
oauth = OAuth2(None, None, from_file='authorization_info_template.json')
我的消费者密钥、秘密和联盟 ID 都是正确的。我不确定为什么我不断收到此错误。
File "C:\Users\xxxxx\python_work\new\lib\site-packages\yahoo_oauth\yahoo_oauth.py", line 165, in oauth2_access_parser
self.guid = parsed_access['xoauth_yahoo_guid']
KeyError: 'xoauth_yahoo_guid'
【问题讨论】:
标签: python yahoo-api yahoo-fantasysports-api