python - Airflow 网络服务器获取值错误 :Samesite

标签 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'.
我试图设置 cookie_samesite default_airflow.cfg 处的变量文件设置为 None、Lax 或 Strict,但错误仍然存​​在。
我的 Airflow 环境的一些细节:
我使用 conda install -c anaconda airflow 在我的工作区中安装了 Apache Airflow
之后我在 Anaconda 上创建了一个环境并在这个环境中安装了 Airflow 包。然后我打开终端并运行 airflow initdbairflow 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 )。

关于python - Airflow 网络服务器获取值错误 :Samesite,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64971281/

相关文章:

python - 在Ubuntu服务器上使用tmux运行tensorflow错误

ubuntu - Airflow upstart 脚本在启动/运行状态后立即进入停止/等待状态

python - BeautifulSoup:提取不在给定标签中的文本

python - MongoDB 最近 30 天的数据

python - 使用漂亮的汤来获取html属性值

python - 参数 'src'的预期Ptr <cv::UMat>

python - 如何使 Anaconda python 在 Windows 上的 Emacs 中工作

macos - anaconda macOS 导入错误 : cannot import name 'MappingProxyType'

python - 使用DockerOperator时如何同时使用xcom_push=True和auto_remove=True?

python - Airflow :从上游任务访问模板字段