------------------------------已获取央视新闻(2656274875)的第20页微博------------------------------
('Error: ', UnicodeDecodeError('ascii', '/home/tz/weibo-crawler(\xe5\x91\xa8\xe7\x8b\x97)/weibo/', 23, 24, 'ordinal not in range(128)'))
Traceback (most recent call last):
File "weibo.py", line 689, in get_filepath
)[0] + os.sep + 'weibo' + os.sep + self.user['screen_name']
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe5 in position 23: ordinal not in range(128)
Progress: 0%| | 19/12753 [15:47<176:28:54, 49.89s/it]
('Error: ', TypeError('coercing to Unicode: need string or buffer, NoneType found',))
Traceback (most recent call last):
File "weibo.py", line 997, in get_pages
self.write_data(wrote_count)
File "weibo.py", line 960, in write_data
self.write_csv(wrote_count)
File "weibo.py", line 721, in write_csv
self.csv_helper(result_headers, result_data, file_path)
File "weibo.py", line 725, in csv_helper
if not os.path.isfile(file_path):
File "/usr/lib/python2.7/genericpath.py", line 37, in isfile
st = os.stat(path)
TypeError: coercing to Unicode: need string or buffer, NoneType found
信息抓取完毕
------------------------------已获取央视新闻(2656274875)的第20页微博------------------------------ ('Error: ', UnicodeDecodeError('ascii', '/home/tz/weibo-crawler(\xe5\x91\xa8\xe7\x8b\x97)/weibo/', 23, 24, 'ordinal not in range(128)')) Traceback (most recent call last): File "weibo.py", line 689, in get_filepath )[0] + os.sep + 'weibo' + os.sep + self.user['screen_name'] UnicodeDecodeError: 'ascii' codec can't decode byte 0xe5 in position 23: ordinal not in range(128) Progress: 0%| | 19/12753 [15:47<176:28:54, 49.89s/it] ('Error: ', TypeError('coercing to Unicode: need string or buffer, NoneType found',)) Traceback (most recent call last): File "weibo.py", line 997, in get_pages self.write_data(wrote_count) File "weibo.py", line 960, in write_data self.write_csv(wrote_count) File "weibo.py", line 721, in write_csv self.csv_helper(result_headers, result_data, file_path) File "weibo.py", line 725, in csv_helper if not os.path.isfile(file_path): File "/usr/lib/python2.7/genericpath.py", line 37, in isfile st = os.stat(path) TypeError: coercing to Unicode: need string or buffer, NoneType found 信息抓取完毕