thisbejim / Pyrebase

A simple python wrapper for the Firebase API.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error with request

AlfonsoAgAr opened this issue · comments

  • Check that your version of Python is 3.4+
  • Check that you are on the newest version of Pyrebase
  • Check that Email/password provider is enabled in your Firebase dashboard under Auth -> Sign In Method.

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

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