Python firebase_admin.exceptions.InvalidArgumentError

Python firebase_admin.exceptions.InvalidArgumentError,python,firebase,firebase-admin,Python,Firebase,Firebase Admin,当我运行此代码时,我得到一个firebase\u admin.exceptions.InvalidArgumentError错误 data = {'DC': {'channel_id': 'simple', 'fpd': 50, 'pffb': 2, 'pivd': 80, 'pivr': 100, 'prf': 75}, 'DF': {'115139684': 'yotyteam', 'yotyteam': 115139684}, 'GC': {'code1': {'NUs': 20, 'P'

当我运行此代码时,我得到一个
firebase\u admin.exceptions.InvalidArgumentError
错误

data = {'DC': {'channel_id': 'simple', 'fpd': 50, 'pffb': 2, 'pivd': 80, 'pivr': 100, 'prf': 75}, 'DF': {'115139684': 'yotyteam', 'yotyteam': 115139684}, 'GC': {'code1': {'NUs': 20, 'P': 200, 'UIs': [115139684, 1626410362]}}, 'I': {'115139684': [1598613302, 1164987371, 1296554610]}, 'RF': {'1296554610': 17}, 'RJRF': {'1296554610': '14/05/21 21:55:04'}, 'RL': {'13': [115139684]}, 'WA': {'101785936': 115139684, '595638422': 115139684, '1045502102': 115139684, '1284686826': 115139684, '1626410362': 115139684, '1798740505': 115139684}, 'B': {}, 'FL': {'OL': {}, '14/05/21': {'1296554610': 115139684}}, 'DFL': {}}

db.reference("bot_data").update(data)
您的一把钥匙是
“14/05/21”
。这在RTDB中可能是不允许的。谢谢。它起作用了……,$,#,[,],/在firebase中不允许
Traceback (most recent call last):
  File "/app/.heroku/python/lib/python3.9/site-packages/firebase_admin/db.py", line 930, in request
    return super(_Client, self).request(method, url, **kwargs)
  File "/app/.heroku/python/lib/python3.9/site-packages/firebase_admin/_http_client.py", line 119, in request
    resp.raise_for_status()
  File "/app/.heroku/python/lib/python3.9/site-packages/requests/models.py", line 940, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://example.firebaseio.com/bot_data.json?print=silent

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/app/.heroku/python/lib/python3.9/site-packages/telegram/ext/dispatcher.py", line 568, in __update_persistence
    self.persistence.update_bot_data(self.bot_data)
  File "/app/.heroku/python/lib/python3.9/site-packages/telegram/ext/basepersistence.py", line 105, in update_bot_data_replace_bot
    return update_bot_data(instance.replace_bot(data))
  File "/app/firebase_persistence_ptb/firebase_persistence.py", line 81, in update_bot_data
    self.fb_bot_data.update(data)
  File "/app/.heroku/python/lib/python3.9/site-packages/firebase_admin/db.py", line 342, in update
    self._client.request('patch', self._add_suffix(), json=value, params='print=silent')
  File "/app/.heroku/python/lib/python3.9/site-packages/firebase_admin/db.py", line 932, in request
    raise _Client.handle_rtdb_error(error)
firebase_admin.exceptions.InvalidArgumentError: Invalid data; couldn't parse JSON object. Are you sending a JSON object with valid key names?