【概要】
Mac環境にて作成したPythonコードがあるのですが、Windows環境にて実行するとエラーが出ます。
具体的には大量の画像を描画する際、Mac環境では成功するのですがWindows環境だとメモリが足りていても
fail to allocate bitmap
もしくは
fail to create pixmap with tk_getpixmap in tkimgphotoinstancesetsize
と表示されて停止します。
添付ファイルにコード本文を載せますので、この問題を解消できる方はおりませんでしょうか。
【概要】Flaskで、WEB上からアップロードされた画像を保存することが出来ないというものです。
【エラー内容】
①ローカルにて、image.jpgをアップロードしてみた結果。画像は保存すらされていません。
File "C:\Users\○○○\anaconda3\lib\site-packages\werkzeug\datastructures.py", line 3021, in save
dst = open(dst, "wb")
FileNotFoundError: [Errno 2] No such file or directory: './static/image/image.jpg'
127.0.0.1 - - [28/Nov/2021 20:55:28] "POST /upload/ HTTP/1.1" 500 -
②ちなみに、アップロード後に送信ボタンを押すと、Web上には下記のように表示されます。
Internal Server Error
The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.
タブには、500Internal Server Errorと表示されます。