当前位置:网站首页>记录 AttributeError: ‘NoneType‘ object has no attribute ‘nextcall‘
记录 AttributeError: ‘NoneType‘ object has no attribute ‘nextcall‘
2022-07-02 06:51:00 【王观天】
记录一次错误
scrapy 测试 scrapy bench
出现
AttributeError: 'NoneType' object has no attribute 'nextcall'
错误大意: 某个对象没有nextcall属性
根据错误分析
Traceback (most recent call last):
File "D:\pythoninstalllive\lib\site-packages\twisted\internet\defer.py", line 857, in _runCallbacks
current.result = callback( # type: ignore[misc]
File "D:\pythoninstalllive\lib\site-packages\scrapy\core\engine.py", line 187, in <lambda>
d.addBoth(lambda _: self.slot.nextcall.schedule())
找到错误发生具体位置
def _next_request_from_scheduler(self) -> Optional[Deferred]:
assert self.slot is not None # typing
assert self.spider is not None # typing
request = self.slot.scheduler.next_request()
if request is None:
return None
d = self._download(request, self.spider)
d.addBoth(self._handle_downloader_output, request)
d.addErrback(lambda f: logger.info('Error while handling downloader output',
exc_info=failure_to_exc_info(f),
extra={'spider': self.spider}))
d.addBoth(lambda _: self.slot.remove_request(request))
d.addErrback(lambda f: logger.info('Error while removing request from slot',
exc_info=failure_to_exc_info(f),
extra={'spider': self.spider}))
# d.addBoth(lambda _: self.slot.nextcall.schedule())
d.addErrback(lambda f: logger.info('Error while scheduling new request',
exc_info=failure_to_exc_info(f),
extra={'spider': self.spider}))
return d
尝试将错误行注释, 再次运行 scrap bench
结果: 正常
分析:应该是scrapy的某个依赖库发生了变动, 将某个对象属性删除 , 索性该错误行对该程序影响不大 , 将其注释即可
边栏推荐
- 01安装虚拟机
- 【避坑指南】使用UGUI遇到的坑:Text组件无法首行缩进两格
- 拆解美图SaaS:开着飞机换引擎
- 高考的意义是什么
- [unity3d] production progress bar - make image have the functions of filled and sliced at the same time
- [unity3d] nested use layout group to make scroll view with dynamic sub object height
- 【Unity3D】嵌套使用Layout Group制作拥有动态子物体高度的Scroll View
- sqoop创建job出现的一系列问题解决方法
- flume 190 INSTALL
- [Fantasy 4] introduction and use of UMG components (under update...)
猜你喜欢
两数之和,求目标值
Mock Server基本使用方法
The nanny level tutorial of flutter environment configuration makes the doctor green to the end
Ctrip starts mixed office. How can small and medium-sized enterprises achieve mixed office?
JS reduce accumulator
flink 提交程序
SUS系统可用性量表
Webui automated learning
Blender ocean production
12. Process synchronization and semaphore
随机推荐
[MySQL] an exception occurs when connecting to MySQL: connection must be valid and open
Solution of mysql8 forgetting password file in Windows Environment
AttributeError: type object ‘Image‘ has no attribute ‘fromarray‘
Nonlinear optimization: establishment of slam model
Stm32 et développement de moteurs (système supérieur)
KS009基于SSH实现宠物管理系统
"Talking about podcasts" vol.352 the age of children: breaking the inner scroll, what can we do before high school?
2021-09-12
Delivery mode design of Spartacus UI of SAP e-commerce cloud
Merge ordered sequence
Database dictionary Navicat automatic generation version
What are the popular frameworks for swoole in 2022?
Ctrip starts mixed office. How can small and medium-sized enterprises achieve mixed office?
01 install virtual machine
AttributeError: type object ‘Image‘ has no attribute ‘fromarray‘
allure--常用配置项
网络通信学习
Rapid prototyping
SUS系统可用性量表
Considerations for Apache deploying static web page projects