Skip to main content
deleted 71 characters in body; edited title
Source Link
TylerH
  • 21.3k
  • 86
  • 84
  • 122

Pyrebase, Firebase - Weird Behavior Error using Get - Provided string key index is invalid

I am using Firebase RTDB, using the pyrebase4 python3 wrapper: pyrebase

I have two python3 modules that have almost the same code for this small sample project, but when I run the code it fails.

attendance.py

attendance_within_date = self.firebase_db.child(f"{w_game}/{attendance_db_child}").order_by_key().start_at(str(t_start_time)).end_at(str(t_end_time)).get()

quest.py

quest_within_date = self.firebase_db.child("genshin/quests").order_by_key().start_at(str(e_start_time)).end_at(str(e_end_time)).get()

The quest.py line of code works just fine, but attendance.py over here keeps getting this error, traceback from logs:

2021-06-23 13:41:26,638 ERROR A1RPGAttendance, aggregate_attendance_firebase - Incorrect inputs?: [Errno 400 Client Error: Bad Request for url: https://SECRET.firebaseio.com/%20genshin/attendance_test.json?orderBy=%22%24key%22&startAt=%221621839600.0%22&endAt=%221621839600.0%22] {
  "error" : "Provided string key index is invalid"
}

I am unsure what the problem is. The Firebase rules have the same rules for each document/collection...

If more information is needed, please let me know, thank you.

Pyrebase, Firebase - Weird Behavior Error using Get - Provided string key index is invalid

I am using Firebase RTDB, using the pyrebase4 python3 wrapper: pyrebase

I have two python3 modules that have almost the same code for this small sample project, but when I run the code it fails.

attendance.py

attendance_within_date = self.firebase_db.child(f"{w_game}/{attendance_db_child}").order_by_key().start_at(str(t_start_time)).end_at(str(t_end_time)).get()

quest.py

quest_within_date = self.firebase_db.child("genshin/quests").order_by_key().start_at(str(e_start_time)).end_at(str(e_end_time)).get()

The quest.py line of code works just fine, but attendance.py over here keeps getting this error, traceback from logs:

2021-06-23 13:41:26,638 ERROR A1RPGAttendance, aggregate_attendance_firebase - Incorrect inputs?: [Errno 400 Client Error: Bad Request for url: https://SECRET.firebaseio.com/%20genshin/attendance_test.json?orderBy=%22%24key%22&startAt=%221621839600.0%22&endAt=%221621839600.0%22] {
  "error" : "Provided string key index is invalid"
}

I am unsure what the problem is. The Firebase rules have the same rules for each document/collection...

If more information is needed, please let me know, thank you.

Weird Behavior Error using Get - Provided string key index is invalid

I am using Firebase RTDB, using the pyrebase4 python3 wrapper: pyrebase

I have two python3 modules that have almost the same code for this small sample project, but when I run the code it fails.

attendance.py

attendance_within_date = self.firebase_db.child(f"{w_game}/{attendance_db_child}").order_by_key().start_at(str(t_start_time)).end_at(str(t_end_time)).get()

quest.py

quest_within_date = self.firebase_db.child("genshin/quests").order_by_key().start_at(str(e_start_time)).end_at(str(e_end_time)).get()

The quest.py line of code works just fine, but attendance.py over here keeps getting this error, traceback from logs:

2021-06-23 13:41:26,638 ERROR A1RPGAttendance, aggregate_attendance_firebase - Incorrect inputs?: [Errno 400 Client Error: Bad Request for url: https://SECRET.firebaseio.com/%20genshin/attendance_test.json?orderBy=%22%24key%22&startAt=%221621839600.0%22&endAt=%221621839600.0%22] {
  "error" : "Provided string key index is invalid"
}

I am unsure what the problem is. The Firebase rules have the same rules for each document/collection.

edited tags
Link
Frank van Puffelen
  • 604k
  • 85
  • 897
  • 870
Source Link
Royce
  • 199
  • 6
  • 20

Pyrebase, Firebase - Weird Behavior Error using Get - Provided string key index is invalid

I am using Firebase RTDB, using the pyrebase4 python3 wrapper: pyrebase

I have two python3 modules that have almost the same code for this small sample project, but when I run the code it fails.

attendance.py

attendance_within_date = self.firebase_db.child(f"{w_game}/{attendance_db_child}").order_by_key().start_at(str(t_start_time)).end_at(str(t_end_time)).get()

quest.py

quest_within_date = self.firebase_db.child("genshin/quests").order_by_key().start_at(str(e_start_time)).end_at(str(e_end_time)).get()

The quest.py line of code works just fine, but attendance.py over here keeps getting this error, traceback from logs:

2021-06-23 13:41:26,638 ERROR A1RPGAttendance, aggregate_attendance_firebase - Incorrect inputs?: [Errno 400 Client Error: Bad Request for url: https://SECRET.firebaseio.com/%20genshin/attendance_test.json?orderBy=%22%24key%22&startAt=%221621839600.0%22&endAt=%221621839600.0%22] {
  "error" : "Provided string key index is invalid"
}

I am unsure what the problem is. The Firebase rules have the same rules for each document/collection...

If more information is needed, please let me know, thank you.