Monday, 15 June 2015

python - Getting 501 Server Error: Not Implemented error when trying to backup Firebase from a remote server -


I have a python script that pulls back the firebase db and saves it on the server. I execute it successfully from my machine However, when I run it on the server, I get the following error:

  Traceback (the most recent call last): File "somescript.py", line 58 , & Lt; Module & gt; Data = json.dumps (f.get ('/', none), sort_keys = false, indent = 4) file "/home/<username>/.local/lib/python2.7/site-packages/firebase / Decorators.py ", line 19, in the wrapped return f (* args, ** quarges) file" / home /<ususername>/.local/lib/python2.7/site-packages/firebase/firebase.py " , Line 274, get back to make_get_request (endpoint, ultimate, header, connection = connection) file "/home/<username>/.local/lib/python2.7/site-packages/firebase/decorators.py", line 19, wrapped in return (* args, ** kwargs), file "/home/<username>/.local/lib/python2.7/site-packages/firebase/firebase.py" line 42, make_get_request in response . Raise_for_status (), the file "/home/<username>/.local/lib/python2.7/site-packages/requests/models.py", raise_for_status in line 638, increased HTTP_ERROR requests.exceptions.HTTPError: 501 server error: Not applicable 2015-03-17 15:01:12 - Completed work took 4.00 seconds, return code was 1. Here is the rewrite NT part of the script:  
  def connect_firebase (configuration): firebaseUrl = configs.get ('Firebase', 'ProdFirebaseURL') firebaseSecret = Configs.get ('Firebase', 'FirebaseSecret') f = firebase.firebaseApplication (firebaseUrl, none) return f.authentication = firebase.firebaseAuthentication (firebaseSecret, "", admin = true) f ... f = connect_firebase ( Config) data = json.dumps (f.get ('/', none), sort_keys = false, indent = 4) just here  

similar script The same parameter was running fine a few weeks ago by pythoneverywhere Using pip on both Sean and Server, has reinstalled request 1.1.0 and Python-Firebase and still can access it from me I'm capable of machine but pythoneverywhere with no idea what the server will do?

If you can get the certification portion past, then connection should be done / not it Is a proxy problem.

Maybe your ProdFirebaseURL check again is correct?

I <<> Code> F.G.T. (& Lt; the-full-url & gt;) Just double check / make sure.


No comments:

Post a Comment