gpt4 book ai didi

python - malloc() : unsorted double linked list corrupted Aborted (core dumped) python

转载 作者:行者123 更新时间:2023-12-04 03:49:28 25 4
gpt4 key购买 nike

在尝试使用 concurrent.futures 模块同时从谷歌驱动器下载文件时,以下脚本抛出 malloc(): unsorted double linked list corrupted.

files = [
{"id": "2131easd232", "name": "image1.jpg"},
{"id": "2131easdfsd232", "name": "image2.jpg"},
{"id": "2131ea32cesd232", "name": "image3.jpg"}
]

def download_file(data):
request = drive_service.files().get_media(fileId=data['id'])
fh = io.FileIO(data['name'], 'wb')
downloader = MediaIoBaseDownload(fh, request)
done = False
while done is False:
status, done = downloader.next_chunk()

with concurrent.futures.ThreadPoolExecutor() as executor:
executor.map(download_file, files)

malloc(): unsorted double linked list corrupted Aborted (core dumped)


该脚本被快速执行(在 2 秒内)并且只创建垃圾文件(大小为 0bytes 的文件)。但是我能够同步下载文件而没有任何中断。

最佳答案

我也遇到了这个问题。我正在使用谷歌目录 api。我认为为我解决的问题是在线程化的函数中创建服务对象。

def get_user_data(useremail):
Threadedservice = build('admin', 'directory_v1', credentials=delegated_credentials)

userresults = Threadedservice.users().get(userKey=useremail, viewType='admin_view', fields='recoveryPhone, name(fullName)').execute()

关于python - malloc() : unsorted double linked list corrupted Aborted (core dumped) python,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64631883/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com