【问题标题】:KeyError: 'xoauth_yahoo_guid'KeyError:'xoauth_yahoo_guid'
【发布时间】: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


    【解决方案1】:

    对于遇到相同错误的任何人,请重新安装 yahoo_oauth。一旦我重新安装了软件包,它就开始工作了。

    【讨论】:

      猜你喜欢
      • 2019-05-01
      • 2015-04-12
      • 1970-01-01
      • 2016-12-02
      • 2020-03-26
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多