logo
Loading...

利用requests.get及Image.open(BytesIO(response.content))讀檔 發生Error: OSError: cannot identify image file <_io.BytesIO object at 0x00000184DD401BA0> - Cupoy

利用 response = requests.get (first_link) 及 img = Im...

ml100-2,try-except,ml100-2-d03

利用requests.get及Image.open(BytesIO(response.content))讀檔 發生Error: OSError: cannot identify image file <_io.BytesIO object at 0x00000184DD401BA0>

2019/04/20 下午 09:56
機器學習共學討論版
WenChun Huang
觀看數:22
回答數:3
收藏數:0
ml100-2
try-except
ml100-2-d03

回答列表

  • 2019/04/20 下午 10:33
    張維元 (WeiYuan)
    贊同數:0
    不贊同數:0
    留言數:0

  • 2019/04/27 下午 03:47
    WenChun Huang
    贊同數:0
    不贊同數:0
    留言數:0

    了解. Thanks.

  • 2019/05/01 下午 04:27
    YJ LIN
    贊同數:0
    不贊同數:0
    留言數:0

    要是早點看到這篇就不用浪費半小時debug了QAQ


    建議下次可以提示說「現實情況中,在讀取資料時有連結失效是很平常的,請加入try-excpet機制防止image2arr_fromURLs()程式中斷」