气流网络服务器开始值错误:Samesite

Gui*_*nha 7 python anaconda airflow

我在我的一个环境中使用 Anaconda 安装了 Airflow 1.10.12。

但是当我尝试按照快速入门指南(在https://airflow.apache.org/docs/stable/start.html)访问 http://localhost:8080/admin/ 后出现以下错误

Traceback (most recent call last):
  File "/home/guilherme/anaconda3/envs/engdados/lib/python3.8/site-packages/flask/app.py", line 2447, in wsgi_app
    response = self.full_dispatch_request()
  File "/home/guilherme/anaconda3/envs/engdados/lib/python3.8/site-packages/flask/app.py", line 1953, in full_dispatch_request
    return self.finalize_request(rv)
  File "/home/guilherme/anaconda3/envs/engdados/lib/python3.8/site-packages/flask/app.py", line 1970, in finalize_request
    response = self.process_response(response)
  File "/home/guilherme/anaconda3/envs/engdados/lib/python3.8/site-packages/flask/app.py", line 2269, in process_response
    self.session_interface.save_session(self, ctx.session, response)
  File "/home/guilherme/anaconda3/envs/engdados/lib/python3.8/site-packages/flask/sessions.py", line 379, in save_session
    response.set_cookie(
  File "/home/guilherme/anaconda3/envs/engdados/lib/python3.8/site-packages/werkzeug/wrappers/base_response.py", line 468, in set_cookie
    dump_cookie(
  File "/home/guilherme/anaconda3/envs/engdados/lib/python3.8/site-packages/werkzeug/http.py", line 1217, in dump_cookie
    raise ValueError("SameSite must be 'Strict', 'Lax', or 'None'.")
ValueError: SameSite must be 'Strict', 'Lax', or 'None'.
Run Code Online (Sandbox Code Playgroud)

我试图cookie_samesitedefault_airflow.cfg文件中的变量设置为 None、Lax 或 Strict,但错误仍然存​​在。

我的气流环境的一些细节:

我使用conda install -c anaconda airflow 之后在我的工作区中安装了 Apache 气流,然后我在 Anaconda 上创建了一个环境并在这个环境中安装了气流包。然后我打开终端并运行airflow initdbairflow webserver -p 8080。然后我去了网页,看到了错误。

在此先感谢您的帮助。

kax*_*xil 10

凹凸werkzeug版本如下:

pip install 'werkzeug<1.0.0'
Run Code Online (Sandbox Code Playgroud)

对于 Airflow >=2.0.0 更改配置(airflow.cfg)[webserver] cookie_samesite以使用Laxhttps://github.com/apache/airflow/blob/2.0.1/UPDATING.md#the-default-value-for-webserver- cookie_samesite-has-been-change-to-lax)。

  • 根据您在这里的提交,它应该是 `werkzeug&lt;1.0.0` 吗?https://github.com/apache/airflow/pull/11872 (3认同)