Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

报错一大堆 #573

Open
MrTurtlelovel opened this issue Apr 26, 2024 · 3 comments
Open

报错一大堆 #573

MrTurtlelovel opened this issue Apr 26, 2024 · 3 comments
Labels
failed 程序运行出错

Comments

@MrTurtlelovel
Copy link

为了更好的解决问题,请认真回答下面的问题。等到问题解决,请及时关闭本issue。

  • 问:请您指明哪个版本运行出错(github版/PyPi版/全部)?

答:github

  • 问:您使用的是否是最新的程序(是/否)?

答:是

  • 问:爬取任意用户都会运行出错吗(是/否)?

答:是

  • 问:若只有爬特定微博时才出错,能否提供出错微博的weibo_id或url(非必填)?

答:

  • 问:若您已提供出错微博的weibo_id或url,可忽略此内容,否则能否提供出错账号的user_id及您配置的since_date,方便我们定位出错微博(非必填)?

答:

  • 问:如果方便,请您描述出错详情,最好附上错误提示。

答:
PS D:\下载\qq\3105088783\FileRecv\2024大二下\认识实习\weiboSpider-master> & D:/Anaconda/python.exe d:/下载/qq/3105088783/FileRecv/2024大二下/认识实习/weiboSpider-master/weiboSpider-master/weibo_spider/main.py
list index out of range
Traceback (most recent call last):
File "C:\Users\JackieTao\AppData\Roaming\Python\Python310\site-packages\weibo_spider\parser\index_parser.py", line 39, 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 "C:\Users\JackieTao\AppData\Roaming\Python\Python310\site-packages\weibo_spider\spider.py", line 226, 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 "C:\Users\JackieTao\AppData\Roaming\Python\Python310\site-packages\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
'NoneType' object has no attribute 'nickname'
Traceback (most recent call last):
File "C:\Users\JackieTao\AppData\Roaming\Python\Python310\site-packages\weibo_spider\spider.py", line 226, in _get_filepath
dir_name = self.user.nickname
AttributeError: 'NoneType' object has no attribute 'nickname'
'NoneType' object has no attribute 'dict'
Traceback (most recent call last):
File "C:\Users\JackieTao\AppData\Roaming\Python\Python310\site-packages\weibo_spider\spider.py", line 313, in get_one_user
self.write_user(self.user)
File "C:\Users\JackieTao\AppData\Roaming\Python\Python310\site-packages\weibo_spider\spider.py", line 137, in write_user
writer.write_user(user)
File "C:\Users\JackieTao\AppData\Roaming\Python\Python310\site-packages\weibo_spider\writer\txt_writer.py", line 29, in write_user
[v + ':' + str(self.user.dict[k]) for k, v in self.user_desc])
File "C:\Users\JackieTao\AppData\Roaming\Python\Python310\site-packages\weibo_spider\writer\txt_writer.py", line 29, in
[v + ':' + str(self.user.dict[k]) for k, v in self.user_desc])
AttributeError: 'NoneType' object has no attribute 'dict'
PS D:\下载\qq\3105088783\FileRecv\2024大二下\认识实习\weiboSpider-master>

@MrTurtlelovel MrTurtlelovel added the failed 程序运行出错 label Apr 26, 2024
@dataabc
Copy link
Owner

dataabc commented Apr 26, 2024

应该是速度太快被暂时限制了,一般来说,限制一段时间会自动解除。

@hz0ne
Copy link

hz0ne commented Jun 22, 2024

这段我尝试拆分下逻辑,目前到达限制后不会生成限制前的时间节点,报错的提示也比较模糊

@Rook213
Copy link

Rook213 commented Jul 9, 2024

同样问题,楼主后面运行成功了吗

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
failed 程序运行出错
Projects
None yet
Development

No branches or pull requests

4 participants