OSError: exception: access violation writing 0x0000000000000050
此错误代码出现在
将获取的网页头location信息导入到model表格在tableview显示中产生
解决方法:
将获取的location信息转换成str字符格式完美解决
html=requests.get(url,allow_redirects=False)
text=str(html.headers.get('location')) #注意将此处内容转换成str格式,不然出现"OSError: exception: access violation writing 0x000"错误
在尝试将获取的网页头location信息导入到表格并显示时遇到了'OSError: exception: access violation writing 0x0000000000000050'错误。解决方法是将requests.get()返回的headers中的'location'信息转换为str类型。通过执行`text=str(html.headers.get('location'))`可以避免该错误,确保数据正确导入并显示在tableview中。

4万+

被折叠的 条评论
为什么被折叠?



