首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >正在尝试配置pyrebase

正在尝试配置pyrebase
EN

Stack Overflow用户
提问于 2018-11-15 00:36:10
回答 1查看 1.2K关注 0票数 0

目前,我正在运行以下python脚本:

代码语言:javascript
复制
import pyrebase

# Config the firebase
# Create a stream
# Attatch the streamHandler
# Push the data to the firebase after analysis

config = {
  "apiKey": "Yl6***************OigD",
  "authDomain": "********.firebaseapp.com",
  "databaseURL": "https://****.firebaseio.com",
  "storageBucket": "*****.appspot.com",
  "serviceAccount": "/Users/ndh/Desktop/ConditioningMaintainanceAnalysis/**************.json"
}

firebase = pyrebase.initialize_app(config)
db = firebase.database()

这会给出以下错误:

代码语言:javascript
复制
  File "/Users/ndh/anaconda3/lib/python3.6/site-packages/requests_toolbelt/auth/guess.py", line 6, in <module>
    from . import _digest_auth_compat as auth_compat, http_proxy_digest

  File "/Users/ndh/anaconda3/lib/python3.6/site-packages/requests_toolbelt/auth/_digest_auth_compat.py", line 17, in <module>
    class _HTTPDigestAuth(requests.auth.HTTPDigestAuth):

AttributeError: module 'requests' has no attribute 'auth'

如何解决此错误?

EN

回答 1

Stack Overflow用户

发布于 2020-10-25 14:48:25

这对我很有效

代码语言:javascript
复制
from Pyrebase import pyrebase

#只需在C:\Users\Agil\AppData\Local\Programs\Python\Python39\Lib\site-packages\Pyrebase中查看您的pyrebase库

或默认的pyrebase库C:\Users\Agil\AppData\Local\Programs\Python\Python39\Lib\site-packages\Pyrebase-master

使用

代码语言:javascript
复制
from Pyrebase-master import pyrebase
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/53304879

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档