为什么在使用Dota2 Python API时fetch_profile_卡不返回任何内容?

2024-05-16 11:13:12 发布

您现在位置:Python中文网/ 问答频道 /正文

我正在使用dota2 python library从Dota2游戏客户端收集数据。使用the initial example我使用提供的函数:

@dota.on('ready')
def fetch_profile_card():
    jobid = dota.request_profile_card(70388657)
    profile_card = dota.wait_msg(jobid, timeout=10)

    if profile_card:
        print (str(profile_card) )  

据我所知,gevent-调用上述函数的方法如下:

dota.on('ready',fetch_profile_card)

当我这么做的时候,什么都没发生。无错误,但响应为无

其他一些背景:

我在调试时有日志记录

logging.basicConfig(format='[%(asctime)s] %(levelname)s %(name)s: %(message)s', level=logging.DEBUG)

当我登录时,我会看到一些输出 enter image description here 但是当我跑的时候,我什么也得不到


Tags: 数据函数游戏客户端onlogginglibraryfetch