TM0831/Spiders

单独运行的ProxyPool中的run.py文件,结果报错AttributeError: 'str' object has no attribute 'items'

Opened this issue · 1 comments

单独运行的ProxyPool中的run.py文件,结果报错
Traceback (most recent call last):
File "D:/project/Spiders-master/ProxyPool/run.py", line 32, in
m.run()
File "D:/project/Spiders-master/ProxyPool/run.py", line 23, in run
self.gp.get_proxy()
File "D:\project\Spiders-master\ProxyPool\get.py", line 28, in get_proxy
self.redis.add(proxy)
File "D:\project\Spiders-master\ProxyPool\pool.py", line 30, in add
self.db.zadd(self.key, proxy, score)
File "G:\Program\Python\Python37\lib\site-packages\redis\client.py", line 2685, in zadd
for pair in iteritems(mapping):
File "G:\Program\Python\Python37\lib\site-packages\redis_compat.py", line 159, in iteritems
return iter(x.items())
AttributeError: 'str' object has no attribute 'items'

你好,请问这个问题解决了么