weibo-search icon indicating copy to clipboard operation
weibo-search copied to clipboard

出现文件写入错误

Open jfj123555 opened this issue 3 years ago • 2 comments

运行过程报错

'user_id': '3188536654', 'video_url': ''}, 'keyword': '刘畊宏'} Traceback (most recent call last): File "e:\python\lib\site-packages\twisted\internet\defer.py", line 858, in _runCallbacks current.result, *args, **kwargs File "e:\python\lib\site-packages\scrapy\utils\defer.py", line 162, in f return deferred_from_coro(coro_f(*coro_args, **coro_kwargs)) File "D:\weibo-search-master\weibo-search-master\weibo\pipelines.py", line 32, in process_item with open(file_path, 'a', encoding='utf-8-sig', newline='') as f: PermissionError: [Errno 13] Permission denied: '结果文件\刘畊宏\刘畊宏.csv' {'article_url': '', 'at_users': '', 'attitudes_count': '0', 'bid': 'Lr2tEg5YN', 'comments_count': '0', 'created_at': '2022-05-01 22:29', 'id': '4764443823836237', 请问一下是文件夹权限问题吗?

jfj123555 avatar May 08 '22 18:05 jfj123555

程序运行时不要打开文件,否则会出现上面的错误。

dataabc avatar May 09 '22 13:05 dataabc

程序运行时不要打开文件,否则会出现上面的错误。

问题成功解决,谢谢作者!!

jfj123555 avatar May 09 '22 16:05 jfj123555