我正在尝试将图片上传到我的 Firebase 存储帐户,但每当运行代码时,都会出现 403 HTTP 错误:“要计费的项目与不存在的计费帐户关联”。
更详细的错误:
"error": {
"code": 403,
"message": "The project to be billed is associated with an absent billing account.",
"errors": [
{
"message": "The project to be billed is associated with an absent billing account.",
"domain": "global",
"reason": "accountDisabled",
"locationType": "header",
"location": "Authorization"
}
]
}
这是我的 Python 代码:
import firebase_admin
from firebase_admin import credentials, storage
import os
cred = credentials.Certificate(os.getenv("FIREBASE_CREDS"))
firebase_admin.initialize_app(cred)
bucket = storage.bucket('profile_pictures')
blob = bucket.blob("test_image.jpg")
blob.upload_from_string(test_image_path)
问题是来自我的 python 代码,还是来自我需要在 firebase 中修复的某些设置?通过 Spark 计划,我们应该有一些免费存储空间(目前,我没有存储任何东西......)
小怪兽爱吃肉
相关分类