Airflow webserver gettins valueError:Samesite
Airflow webserver gettins valueError:Samesite
我在我的一个环境中使用 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'.
我尝试将 default_airflow.cfg
文件中的 cookie_samesite
变量设置为 None、Lax 或 Strict,但错误仍然存在。
我的气流环境的一些细节:
我使用 conda install -c anaconda airflow
在我的工作区中安装了 Apache airflow
之后我在 Anaconda 上创建了一个环境并在这个环境中安装了 airflow 包。然后我打开终端和 运行 airflow initdb
和 airflow webserver -p 8080
。然后我去网页看到了错误。
在此先感谢您的帮助。
将 werkzeug
版本更改为以下版本:
pip install 'werkzeug<1.0.0'
对于 Airflow >=2.0.0,更改配置 (airflow.cfg) [webserver] cookie_samesite
以使用 Lax
(https://github.com/apache/airflow/blob/2.0.1/UPDATING.md#the-default-value-for-webserver-cookie_samesite-has-been-changed-to-lax).
我在我的一个环境中使用 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'.
我尝试将 default_airflow.cfg
文件中的 cookie_samesite
变量设置为 None、Lax 或 Strict,但错误仍然存在。
我的气流环境的一些细节:
我使用 conda install -c anaconda airflow
在我的工作区中安装了 Apache airflow
之后我在 Anaconda 上创建了一个环境并在这个环境中安装了 airflow 包。然后我打开终端和 运行 airflow initdb
和 airflow webserver -p 8080
。然后我去网页看到了错误。
在此先感谢您的帮助。
将 werkzeug
版本更改为以下版本:
pip install 'werkzeug<1.0.0'
对于 Airflow >=2.0.0,更改配置 (airflow.cfg) [webserver] cookie_samesite
以使用 Lax
(https://github.com/apache/airflow/blob/2.0.1/UPDATING.md#the-default-value-for-webserver-cookie_samesite-has-been-changed-to-lax).