Skip to content

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

@mjj1094

Description

@mjj1094

单独运行的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'

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