【问题标题】:HTTPError: 400 Client Error: Bad Request using python-firebaseHTTPError:400 客户端错误:使用 python-firebase 的错误请求
【发布时间】:2020-02-07 08:58:56
【问题描述】:

我正在尝试使用 python-firebase 将数据上传到 firebase 实时数据库,但出现以下错误: HTTPError:400 客户端错误:对 url 的错误请求:https://app.firebaseio.com/essential/activepassive/.json 我的代码:

from firebase import firebase 
firebase=firebase.FirebaseApplication('https://app.firebaseio.com/',None)
firebase.post('/essential/activepassive',dictionary)

【问题讨论】:

    标签: python-3.x firebase rest firebase-realtime-database


    【解决方案1】:

    错误 400 表示您的请求中的 JSON 无效:您的 json 文件中可能包含“#”或其他无效字符。

    您可以使用此数据进行测试

    data_good = {'url': 'url1', 'address': 'address1','name': 'name1'}
    

    【讨论】:

      猜你喜欢
      • 2014-09-05
      • 2022-10-13
      • 2015-08-17
      • 1970-01-01
      • 1970-01-01
      • 2015-04-03
      • 2019-11-10
      • 2020-05-20
      • 1970-01-01
      相关资源
      最近更新 更多