"Traceback (most recent call last):\n File "C:\Users\Lenovo\PycharmProjects\hebei\GongAn.py", line 79, in \n get_links("Trade/" + i, '行业法规')\n File "C:\Users\Lenovo\PycharmProjects\hebei\GongAn.py", line 37, in get_links\n links=list(set)\nTypeError: 'type' object is not iterable"\n用中文回答内容:这个错误提示是说在第37行,将一个类型对象(set)当作列表使用了,但是类型对象是不可迭代的。可能是在这一行的代码中,你想要将一个集合对象转换为列表,但是使用的方式不正确。你可以尝试使用list()函数将集合对象转换为列表,例如:links = list(set)。

Python错误:TypeError: 'type' object is not iterable - 解決方案

原文地址: https://www.cveoy.top/t/topic/p3BX 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录