thisbejim / Pyrebase

A simple python wrapper for the Firebase API.
2.07k stars 528 forks source link

Error with request #393

Open AlfonsoAgAr opened 3 years ago

AlfonsoAgAr commented 3 years ago

Hi, I've seen that is a common issue. "error": "orderBy must be a valid JSON encode path."

image

According to the documentation the query must be users_by_name = db.child("users").order_by_child("name").limit_to_first(3).get()

When I try the query users = db.child("example01").order_by_child('uid').get()

throw me this execption "error": "orderBy must be a valid JSON encode path."

So, the request is the problem

The request must be json?orderBy="uid"

but is json?orderBy=%2522uid%2522

Pyrebase is double encoding the commas, as a result, instead of put in the query "uid", it puts %2522uid%2522

shkarlsson commented 3 years ago

This repo is dead. Check out this fork instead: https://github.com/nhorvath/Pyrebase4