milesrichardson / ParsePy

A relatively up-to-date fork of ParsePy, the Python wrapper for the Parse.com API. Originally maintained by @dgrtwo
MIT License
515 stars 184 forks source link

Importing datatypes, user etc. does not work if done before setting the API_ROOT #137

Closed swapnilgt closed 8 years ago

swapnilgt commented 8 years ago

I have written a python script for my self hosted parse-server and I am using a function written as a part of my cloud code. The problem is that if I import the datatypes (from parse_rest.datatypes import Function in my case) before setting the API_ROOT:

parse_rest.connection.API_ROOT = 'my.api.url'

I get the following exception:

parse_rest.core.ResourceRequestLoginRequired: {"error":"unauthorized"}

The modules seem to be initialized with an existing api url (maybe the default parse.com url). Is this a known issue?

milesrichardson commented 8 years ago

I submitted PR #138 to fix this

danrobinson commented 8 years ago

Fixed by #138