Skip to content

Demo运行不了 #160

@a224327780

Description

@a224327780
(shims) ➜  Python python ruia_test.py
Traceback (most recent call last):
  File "/home/cloudide/.local/lib/python3.8/site-packages/ruia/spider.py", line 111, in __init__
    self.request_session = getattr(self, "request_session")
AttributeError: 'HackerNewsSpider' object has no attribute 'request_session'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "ruia_test.py", line 27, in <module>
    HackerNewsSpider.start()
  File "/home/cloudide/.local/lib/python3.8/site-packages/ruia/spider.py", line 314, in start
    spider_ins = cls(middleware=middleware, loop=loop, **spider_kwargs)
  File "/home/cloudide/.local/lib/python3.8/site-packages/ruia/spider.py", line 113, in __init__
    self.request_session = ClientSession()
  File "/home/cloudide/.local/lib/python3.8/site-packages/aiohttp/client.py", line 297, in __init__
    loop = loop or asyncio.get_running_loop()
RuntimeError: no running event loop

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions