
[英]convert io.BytesIO type to werkzeug.datastructures FileStrorage type Flask
如何將 io.BytesIo 類型轉換為 werkzeug.datastructures FileStrorage 類型 Flask 我嘗試通過強制轉換 FileStorage(File) 進行簡單轉換,但沒有返回 ...
[英]convert io.BytesIO type to werkzeug.datastructures FileStrorage type Flask
如何將 io.BytesIo 類型轉換為 werkzeug.datastructures FileStrorage 類型 Flask 我嘗試通過強制轉換 FileStorage(File) 進行簡單轉換,但沒有返回 ...
[英]Flask End Point Not Building: Could not build url for endpoint 'edittenant'. Did you forget to specify values
我收到這個錯誤 我的代碼看起來很簡單。 也許我錯過了一些簡單的東西? 但只有當我添加render_template function 時,我才會收到錯誤。 ...
[英]check_password_hash ever return False
我正在創建一個帶有登錄身份驗證的 flask api 但是 check_password_hash 曾經返回 false 並且我得到一個錯誤在我的 app.py 中,我正在嘗試這個 當我打印 user.password 和 request.form["password"] 它返回散列通過 -> ...
[英]"No module named manage" error when trying to debug a Werkzeug Django app in VSCode
正如標題所說。 我有一個 Django 4.1 應用程序,它使用 Werkzeug 啟用 https。我有以下 launch.json 設置: 當我通過 VSCode 調試器運行它時,它立即在get_wsgi_application() function 中退出,並顯示“No module name ...
[英]Different Werkzeug test clients are affecting each other. Why?
客觀的我正在使用 werkzeug.test.Client 在我的燒瓶應用程序上運行測試,而無需運行服務器。 我想測試登錄用戶是否可以訪問某些資源,而未登錄用戶不能。 程序我使用test_client=Client(app)創建了一個名為 test_client 的客戶端,然后使用 flask_s ...
[英]ImportError: cannot import name 'FileWrapper' from 'werkzeug'
為什么會這樣? 以及我該如何解決。 ...
[英]Upload an Excel File using Flask test client without mocking
查看我的 API: PyTest function 具有客戶端,在功能 scope 中作為夾具傳遞的標頭用於測試 ZA2F2ED4F8EBC2CBBDZC2A: 我已經正確實施了設置和拆卸方法,這些方法也關閉了打開的文件以避免錯誤。 我仍然在 POST 方法上收到 400 錯誤。 我的 API 在 ...
[英]ImportError: cannot import name 'parse_rule' from 'werkzeug.routing'
在另一個系統上運行我的 Flask 項目后,我收到以下消息。 該應用程序一直運行沒有問題: 我的要求.txt ...
[英]Override default values with Flask's url_for
我有一個包含兩個可變部分的路線,並使用defaults來指定每個部分的默認值。 @app.route("/api/<a>/<b>", defaults={"a": 0, "b": 0}) def api(a, b): return f"{a=}, {b=}" 我想 ...
[英]How to send credentials from DevTools in a Chrome extension to a custom Werkzeug-based server?
在我的 chrome 擴展中,我想將自定義 DevTools 面板中的憑據發送到本地運行的基於 Werkzeug 的自定義服務器。 我對服務器的請求如下所示: 服務器收到此請求,甚至將我想要的數據發送回擴展程序。 問題是我找不到我在 Werkzeug 的請求服務器端對象中發送的憑據的跡象。 我 ...
[英]Werkzeug crashes with "No module named run" when debugging
我有一個燒瓶應用程序運行良好,直到我嘗試調試它,然后它總是崩潰, No module named run 我將其縮小到werkzeug中的exit_code = subprocess.call(args, env=new_environ, close_fds=False) 這里可能是什么問題? ...
[英]Werkzeug server is shutting down in Django application
將 Werkzeug 版本從 2.0.3 更新到 2.1.0 后,每次運行服務器時都會出現錯誤,這是錯誤日志: 此異常在遞增 2 時不斷出現( ('127.0.0.1', 44612) -> ('127.0.0.1', 44628) 並且服務器崩潰 檢查更改日志,我發現了這個細節: 這 ...
[英]flask_bcrypt, werkzeug.security.safe_str_cmp fails after upgrade to latest flask 2.1
我已經將我的項目升級到最新的 flask(2.1.2,現在我收到以下錯誤: 在我的__init__.py我有 然后在下面的 create_app 中: 我已經閱讀了 Werkzeug 發行說明關於從 Werkzeug 2.1 中刪除了 safe_str_cmp 並且需要用等效的 hmac 函數替換, ...
[英]Error when running flask app - function not defined when I make a call to the python script
我試圖讓本質上是拼寫檢查工具的東西發揮作用。 當我在本地運行時,html 在瀏覽器中顯示正常,但是當我輸入要傳遞到 python 腳本的數據時,出現錯誤:spell() 未定義,即使它是 python 部分工作正常。 我是 Flask 應用程序的新手,希望有人能提供幫助,謝謝 ...
[英]Flask CORS work only for first request, what's the bug in my code?
背景 有一個 JS 應用程序服務於 127.0.0.1:8080,它引用了 Flask 應用程序在 127.0.0.1:5000 服務的一些 API。 [見燒瓶代碼] 當我在 Chrome 中打開這個 js 應用程序時,第一個請求運行良好,第二個請求以 CORS 問題結束,[參見 Chro ...
[英]Flask - strict_slashes redirects to http instead of https
我有一個運行在 localhost:8080 上的 flask 服務器。 我已經將 nginx 設置為從我的域到 localhost:8080 的反向代理,並設置了 SSL。自動 HTTPS 工作正常,除非 Flask 返回 308 並由於 strict_slashes 規則重定向客戶端。 它將用 ...
[英]ImportError: cannot import name 'run_with_reloader' from 'werkzeug.serving'
當我嘗試運行 Web 應用程序的后端時出現以下錯誤: ImportError: cannot import name 'run_with_reloader' from 'werkzeug.serving' 。 它來自 \lib\site-packages\werkzeug\serving.py 文 ...
[英]WTForms how to use description paramter
我有一些簡單的 boolean 字段,我想添加一個簡短的描述。 我指定了一個description參數,但似乎沒有效果。 它應該如何工作? 我找到了這個答案,但不確定這是我的情況 ...
[英]flask _app_ctx_stack.__ident_func__ error due to __ident_func__ deprecated in werkzeug 2.1
I was using _app_ctx_stack.__ident_func__ for sqlalchemy scoped_session for accessing sqlalchemy models inside flask, without using flask sqlalchemy. ...
[英]ImportError: cannot import name 'safe_str_cmp' from 'werkzeug.security'
關於我為什么會收到此錯誤的任何想法? 我的項目運行良好。 我將它復制到外部驅動器和筆記本電腦上,以便在路上工作; 它工作得很好。 我將它復制回我的桌面並遇到了無效解釋器等問題,所以我創建了一個新項目並僅復制了腳本,創建了一個新的 requirements.txt 並安裝了所有包,但是當我運行它時, ...