-
-
Notifications
You must be signed in to change notification settings - Fork 80
fix event loop is closed in win10 #69
Conversation
我用win10跑的时候,没有什么问题呀?是每次跑都有问题吗 |
恩 删掉cache跑了两次 重复出现了问题 |
哦,只有删cache的时候才会有问题吗?现在的代码我之前试的时候是用不用cache都没啥问题 (顺便写一下readme吧,好发版本) |
第一次跑 或者删cache 也就是只要跑过steam历史都会有 但其实是个小问题 因为他是爬完全部数据并且退出的时候才报错的 |
ok,代码我没啥问题,加个changelog就可以合了发新版本了 👍 |
@@ -59,8 +59,7 @@ def csgo_all_categories(): | |||
def enrich_item_with_price_history(csgo_items, crawl_steam_async=True): | |||
# crawl price for all items | |||
if crawl_steam_async: | |||
# asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
直接取消这行注释不就可以了吗?我之前做这个的时候这里是没注释的, @puppylpg 注释掉的吧
然后现在新版本不推荐使用run_until_complete了,我之前测试的时候先set_event_loop_policy再run没报错,建议没有特殊问题的话还是还是用asyncio.run
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
之前注释掉是因为去掉跑着并没有什么问题,我就把windows specific code删了 😢
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
问题不大,能用就行
我也是测试没发现问题,完全没注意到这里改了
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
aio-libs/aiohttp#4324 (comment)
应该是Win下面aiohttp的一个Bug,他说3.7已经解决了,然而我这也是3.7,错误情况和他3.6的一模一样,而且同样的workaround可以绕过去..
要增加/修改的功能/修复的bug
win10运行错误
解决一个结束时会发生的运行错误
相关issue
改动内容描述
核验信息
核验以下信息,已完成的项记得补全check box(中括号里填'x'):
新代码效果截屏(建议)