Debug无法调试,正常运行没有问题
来源:2-1 pycharm的安装和简单使用
weixin_慕容4563607
2024-03-01
debug调试时:
2024-03-01 08:59:42 [scrapy.core.engine] DEBUG: Crawled (200) <GET https://www.bilibili.com/> (referer: None)
2024-03-01 08:59:42 [asyncio] ERROR: Exception in callback <Task pending name='Task-1' coro=<SpiderMiddlewareManager.scrape_response.<locals>.process_callback_output() running at C:\xxxxx\AppData\Local\Programs\Python\Python311\Lib\site-packages\scrapy\core\spidermw.py:295> cb=[Deferred.fromFuture.<locals>.adapt() at C:\xxxxxx\AppData\Local\Programs\Python\Python311\Lib\site-packages\twisted\internet\defer.py:1063]>()
handle: <Handle <Task pending name='Task-1' coro=<SpiderMiddlewareManager.scrape_response.<locals>.process_callback_output() running at C:\xxxxxx\AppData\Local\Programs\Python\Python311\Lib\site-packages\scrapy\core\spidermw.py:295> cb=[Deferred.fromFuture.<locals>.adapt() at C:\xxxxxx\Local\Programs\Python\Python311\Lib\site-packages\twisted\internet\defer.py:1063]>()>
Traceback (most recent call last):
File "C:\xxxxxx\AppData\Local\Programs\Python\Python311\Lib\asyncio\events.py", line 80, in _run
self._context.run(self._callback, *self._args)
TypeError: 'Task' object is not callable
正常运行:
2024-03-01 09:08:37 [scrapy.core.scraper] DEBUG: Scraped from <200 https://api.bilibili.com/x/web-interface/view?bvid=BV1qr421p7Cm>
{'BVid': ['BV1qr421p7Cm'],
'CID': [1453571080],
'coins': [2408],
'doggies': [17139],
'title': ['【星铁丨花火】“必要时,我就是乐子”'],
'urls': ['https://www.bilibili.com/video/BV1qr421p7Cm'],
'whole_views': [125189]}
写回答
1回答
-
https://youtrack.jetbrains.com/issue/IDEA-331676/Debugger-fails-with-FastAPI-uvloop-TypeError-Task-object-is-not-callable 这个问题应该是和pycharm有关, 可以试试这个,或者换个版本的pycharm试试
122024-03-05
相似问题