Coder Social home page Coder Social logo

运行示例代码报错 about ruia HOT 10 CLOSED

qgyhd1234 avatar qgyhd1234 commented on September 28, 2024
运行示例代码报错

from ruia.

Comments (10)

howie6879 avatar howie6879 commented on September 28, 2024

请问你使用的ruia版本是?

In [1]: import ruia

In [2]: ruia.__version__
Out[2]: '0.8.3'

from ruia.

qgyhd1234 avatar qgyhd1234 commented on September 28, 2024

0.8.3
image

from ruia.

howie6879 avatar howie6879 commented on September 28, 2024

你好,我这边手头上没有windows,麻烦你这边测一下看看,直接在编辑器跳到源码的spider.py文件,在前面加上

import asyncio

if sys.version_info[0] == 3 and sys.version_info[1] >= 8 and sys.platform.startswith('win'):
    asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy())

看是否解决你的问题?

from ruia.

qgyhd1234 avatar qgyhd1234 commented on September 28, 2024

你好,我这边手头上没有windows,麻烦你这边测一下看看,直接在编辑器跳到源码的spider.py文件,在前面加上

import asyncio

if sys.version_info[0] == 3 and sys.version_info[1] >= 8 and sys.platform.startswith('win'):
    asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy())

看是否解决你的问题?

我在家里测试,python 是 3.8.3 64 bit,win,也会提示RuntimeError: Event loop is closed,按照你的说明修改后,解决了问题。3.9 的 python 明天去公司测试下。

from ruia.

howie6879 avatar howie6879 commented on September 28, 2024

好的 麻烦测试下

from ruia.

qgyhd1234 avatar qgyhd1234 commented on September 28, 2024

测试没有问题了

from ruia.

qgyhd1234 avatar qgyhd1234 commented on September 28, 2024

顺便问下有没有交流 ruia 的 qq/微信群啊?

from ruia.

howie6879 avatar howie6879 commented on September 28, 2024

https://gitee.com/howie6879/oss/raw/master/uPic/qrcode_for_gh_3f02ace79dfb_258.jpg

我公众号右下角有我微信,我拉你

from ruia.

howie6879 avatar howie6879 commented on September 28, 2024

已经更新ruia到v0.8.4

from ruia.

qgyhd1234 avatar qgyhd1234 commented on September 28, 2024

已解决,谢谢作者

from ruia.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.