我尝试过为 mysqlclient 错误编写的常见解决方案
brew install mysql-connector-cLDFLAGS=-L/usr/local/opt/openssl/lib pip install mysqlclientbrew install zstd并且mysql服务器运行良好。但错误尚未修复..
我越来越clang linker error想说library not found for -lzstd
clang -bundle -undefined dynamic_lookup -L/usr/local/opt/readline/lib -L/usr/local/opt/readline/lib -L/Users/user/.asdf/installs/python/3.7.10/lib -L/usr/local/opt/llvm/lib -L/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib -L/usr/local/opt/readline/lib -L/usr/local/opt/readline/lib -L/Users/user/.asdf/installs/python/3.7.10/lib -L/usr/local/opt/llvm/lib -L/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib -L/usr/local/opt/llvm/lib -I/usr/local/opt/llvm/include build/temp.macosx-11.2-x86_64-3.7/MySQLdb/_mysql.o -L/usr/local/Cellar/mysql/8.0.25_1/lib -lmysqlclient -lzstd -lresolv -o build/lib.macosx-11.2-x86_64-3.7/MySQLdb/_mysql.cpython-37m-darwin.so
ld: library not found for -lzstd
clang-12: error: linker command failed with exit code 1 (use -v to see invocation)
error: command 'clang' failed with exit status 1
Run Code Online (Sandbox Code Playgroud) 我正在使用 asyncio.gather,并在出现异常时尝试重试。但它无法重试,并出现如下错误。我应该如何修复它以重试?
11 -- RETRY Server disconnected without sending a response.
11 -- RETRY cannot reuse already awaited coroutine
11 -- RETRY cannot reuse already awaited coroutine
Run Code Online (Sandbox Code Playgroud)
我的代码:
for i in range((len(tasks) // TASK_CHUNK_SIZE) + 1):
while True:
try:
res = await asyncio.gather(*tasks[TASK_CHUNK_SIZE * i:TASK_CHUNK_SIZE * (i + 1)])
for rows in res:
f.writelines([f'{row}\n' for row in rows])
await asyncio.sleep(1)
break
except Exception as e:
print(f'{(i + 1) * TASK_CHUNK_SIZE} -- RETRY {e}')
await asyncio.sleep(10)
continue
Run Code Online (Sandbox Code Playgroud)