簡體   English   中英

python gdown DistributionNotFound; 文件是exe期間的錯誤

[英]python gdown DistributionNotFound; Error during file is exe

當我將文件作為 EXE 時出現錯誤,但當文件為 PY 時我沒有出現錯誤。 我的代碼是:

import gdown

url = 'https://drive.google.com/uc?id=18TFG11iQl2de6afdTE9802IHBL7Bq0Tn'
output = 'C:\TakeNotes_Temp\TakeNotes.zip'
gdown.download ( url, output, quiet = False )

此代碼在 PY 文件中完美運行,但是當我使用 pyinstaller 並將其轉換為 EXE 時,我收到此錯誤: 錯誤

可能是什么問題? 我執行了這個命令來轉換為 EXE:

pyinstaller --noconfirm --onefile --console --name "test" --log-level "DEBUG" "C:/Desktop/Python/Test.py"

Python 版本 3.9.1; Pyinstaller 4.1 版; Pip 已更新(最新版本)。

請幫幫我! 任何回復將不勝感激! 謝謝!

通過從 gdown 切換到 Google Drive Downloader 解決了問題:

from google_drive_downloader import GoogleDriveDownloader as g

g.download_file_from_google_drive ( file_id = '1cqjRLBrgrlSI7KR3VNa64A4l0_TpOB3z', dest_path = 'C:\Desktop\test.zip', unzip = True )

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM