You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Traceback (most recent call last):
File "D:\code\PythonCode\spider_2\weiboSpider\weibo_spider\parser\index_parser.py", line 37, in get_user
self.user.weibo_num = string_to_int(user_info[0][3:-1])
~~~~~~~~~^^^
IndexError: list index out of range
None
****************************************************************************************************
'NoneType' object has no attribute 'nickname'
Traceback (most recent call last):
File "D:\code\PythonCode\spider_2\weiboSpider\weibo_spider\spider.py", line 228, in _get_filepath
dir_name = self.user.nickname
^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'nickname'
expected str, bytes or os.PathLike object, not NoneType
Traceback (most recent call last):
File "D:\code\PythonCode\spider_2\weiboSpider\weibo_spider\writer\csv_writer.py", line 25, in __init__
with open(self.file_path, 'a', encoding='utf-8-sig',
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: expected str, bytes or os.PathLike object, not NoneType
****************************************************************************************************
Progress: 0%| | 0/1 [00:02<?, ?it/s]
list index out of range
Traceback (most recent call last):
File "D:\code\PythonCode\spider_2\weiboSpider\weibo_spider\parser\page_parser.py", line 66, in get_one_page
is_exist = info[0].xpath("div/span[@class='ctt']")
~~~~^^^
IndexError: list index out of range
cannot unpack non-iterable NoneType object
Traceback (most recent call last):
File "D:\code\PythonCode\spider_2\weiboSpider\weibo_spider\spider.py", line 180, in get_weibo_info
weibos, self.weibo_id_list, to_continue = PageParser(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: cannot unpack non-iterable NoneType object```
The text was updated successfully, but these errors were encountered:
为了更好的解决问题,请认真回答下面的问题。等到问题解决,请及时关闭本issue。
答:python3.12
答:是
答:是
答:否
答:
答:运行___main____.py
或者运行终端命令都会出现这个问题,
The text was updated successfully, but these errors were encountered: