Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Demo运行不了 #160

Open
a224327780 opened this issue Dec 20, 2024 · 0 comments
Open

Demo运行不了 #160

a224327780 opened this issue Dec 20, 2024 · 0 comments

Comments

@a224327780
Copy link

(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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant