Discord.py bot 未连接 Firebase 实时数据库

时间:2021-02-28 14:50:34

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

您好,我正在将 discord.py bot 连接到 firebase 实时数据库,但出现错误,您可以在以下位置检查我的 github 存储库 https://github.com/reyyan987/organic 我想将数据发送到我的 firebase 实时数据库,但出现错误,如果我的 requirements.text 有任何错误,请告诉我,因为我还没有向某些数据库添加版本 错误

2021-02-28T14:40:30.757844+00:00 app[worker.1]: /app/.heroku/python/lib/python3.8/site-packages/Crypto/Random/Fortuna/FortunaGenerator.py:28: SyntaxWarning: "is" with a literal. Did you mean "=="?
2021-02-28T14:40:30.773458+00:00 app[worker.1]:   if sys.version_info[0] is 2 and  sys.version_info[1] is 1:
2021-02-28T14:40:30.773469+00:00 app[worker.1]: /app/.heroku/python/lib/python3.8/site-packages/Crypto/Random/Fortuna/FortunaGenerator.py:28: SyntaxWarning: "is" with a literal. Did you mean "=="?
2021-02-28T14:40:30.773470+00:00 app[worker.1]:   if sys.version_info[0] is 2 and  sys.version_info[1] is 1:
2021-02-28T14:40:31.209376+00:00 app[worker.1]: Traceback (most recent call last):
2021-02-28T14:40:31.209411+00:00 app[worker.1]:   File "filename.py", line 19, in <module>
2021-02-28T14:40:31.209424+00:00 app[worker.1]:     result = firebase.post('/organic-pe-form-default-rtdb/discord', data)
2021-02-28T14:40:31.209425+00:00 app[worker.1]:   File "/app/.heroku/python/lib/python3.8/site-packages/firebase/decorators.py", line 20, in wrapped
2021-02-28T14:40:31.209425+00:00 app[worker.1]:     return f(*args, **kwargs)
2021-02-28T14:40:31.209426+00:00 app[worker.1]:   File "/app/.heroku/python/lib/python3.8/site-packages/firebase/firebase.py", line 328, in post
2021-02-28T14:40:31.209426+00:00 app[worker.1]:     return make_post_request(endpoint, data, params, headers,
2021-02-28T14:40:31.209427+00:00 app[worker.1]:   File "/app/.heroku/python/lib/python3.8/site-packages/firebase/decorators.py", line 20, in wrapped
2021-02-28T14:40:31.209427+00:00 app[worker.1]:     return f(*args, **kwargs)
2021-02-28T14:40:31.209427+00:00 app[worker.1]:   File "/app/.heroku/python/lib/python3.8/site-packages/firebase/firebase.py", line 101, in make_post_request
2021-02-28T14:40:31.209428+00:00 app[worker.1]:     response.raise_for_status()
2021-02-28T14:40:31.209428+00:00 app[worker.1]:   File "/app/.heroku/python/lib/python3.8/site-packages/requests/models.py", line 943, in raise_for_status
2021-02-28T14:40:31.209428+00:00 app[worker.1]:     raise HTTPError(http_error_msg, response=self)
2021-02-28T14:40:31.209429+00:00 app[worker.1]: requests.exceptions.HTTPError: 401 Client Error: Unauthorized for url: https://organic-pe-form-default-rtdb.firebaseio.com/organic-pe-form-default-rtdb/discord/.json
2021-02-28T14:40:31.584951+00:00 heroku[worker.1]: Process exited with status 1
2021-02-28T14:40:31.701294+00:00 heroku[worker.1]: State changed from up to crashed
2021-02-28T14:40:31.710554+00:00 heroku[worker.1]: State changed from crashed to starting
2021-02-28T14:40:38.130215+00:00 heroku[worker.1]: Starting process with command `python filename.py`
2021-02-28T14:40:38.737638+00:00 heroku[worker.1]: State changed from starting to up
2021-02-28T14:40:44.963705+00:00 app[worker.1]: /app/.heroku/python/lib/python3.8/site-packages/Crypto/Random/Fortuna/FortunaGenerator.py:28: SyntaxWarning: "is" with a literal. Did you mean "=="?
2021-02-28T14:40:44.963732+00:00 app[worker.1]:   if sys.version_info[0] is 2 and  sys.version_info[1] is 1:
2021-02-28T14:40:44.963739+00:00 app[worker.1]: /app/.heroku/python/lib/python3.8/site-packages/Crypto/Random/Fortuna/FortunaGenerator.py:28: SyntaxWarning: "is" with a literal. Did you mean "=="?
2021-02-28T14:40:44.963740+00:00 app[worker.1]:   if sys.version_info[0] is 2 and  sys.version_info[1] is 1:
2021-02-28T14:40:45.307204+00:00 app[worker.1]: Traceback (most recent call last):
2021-02-28T14:40:45.307265+00:00 app[worker.1]:   File "filename.py", line 19, in <module>
2021-02-28T14:40:45.307266+00:00 app[worker.1]:     result = firebase.post('/organic-pe-form-default-rtdb/discord', data)
2021-02-28T14:40:45.307268+00:00 app[worker.1]:   File "/app/.heroku/python/lib/python3.8/site-packages/firebase/decorators.py", line 20, in wrapped
2021-02-28T14:40:45.307269+00:00 app[worker.1]:     return f(*args, **kwargs)
2021-02-28T14:40:45.307269+00:00 app[worker.1]:   File "/app/.heroku/python/lib/python3.8/site-packages/firebase/firebase.py", line 328, in post
2021-02-28T14:40:45.307270+00:00 app[worker.1]:     return make_post_request(endpoint, data, params, headers,
2021-02-28T14:40:45.307271+00:00 app[worker.1]:   File "/app/.heroku/python/lib/python3.8/site-packages/firebase/decorators.py", line 20, in wrapped
2021-02-28T14:40:45.307271+00:00 app[worker.1]:     return f(*args, **kwargs)
2021-02-28T14:40:45.307271+00:00 app[worker.1]:   File "/app/.heroku/python/lib/python3.8/site-packages/firebase/firebase.py", line 101, in make_post_request
2021-02-28T14:40:45.308145+00:00 app[worker.1]:     response.raise_for_status()
2021-02-28T14:40:45.311194+00:00 app[worker.1]:   File "/app/.heroku/python/lib/python3.8/site-packages/requests/models.py", line 943, in raise_for_status
2021-02-28T14:40:45.311195+00:00 app[worker.1]:     raise HTTPError(http_error_msg, response=self)
2021-02-28T14:40:45.311201+00:00 app[worker.1]: requests.exceptions.HTTPError: 401 Client Error: Unauthorized for url: https://organic-pe-form-default-rtdb.firebaseio.com/organic-pe-form-default-rtdb/discord/.json
2021-02-28T14:40:45.566468+00:00 heroku[worker.1]: Process exited with status 1
2021-02-28T14:40:45.659530+00:00 heroku[worker.1]: State changed from up to crashed

0 个答案:

没有答案