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

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

我有一个 Python 脚本可以提取 Firebase 数据库的备份并将其保存到服务器。我能够从我的机器成功执行它,但是,当我从 pythoneverywhere 服务器 运行 它时,我收到以下错误:

Traceback (most recent call last):
  File "somescript.py", line 58, in <module>
    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 wrapped
    return f(*args, **kwargs)
  File "/home/<username>/.local/lib/python2.7/site-packages/firebase/firebase.py", line 274, in get
    return make_get_request(endpoint, params, headers, connection=connection)
  File "/home/<username>/.local/lib/python2.7/site-packages/firebase/decorators.py", line 19, in wrapped
    return f(*args, **kwargs)
  File "/home/<username>/.local/lib/python2.7/site-packages/firebase/firebase.py", line 42, in make_get_request
    response.raise_for_status()
  File "/home/<username>/.local/lib/python2.7/site-packages/requests/models.py", line 638, in raise_for_status
    raise http_error
requests.exceptions.HTTPError: 501 Server Error: Not Implemented

2015-03-17 15:01:12 -- Completed task, took 4.00 seconds, return code was 1.

这是脚本的相关部分:

def connect_firebase(configs):
    firebaseUrl = configs.get('Firebase', 'ProdFirebaseURL')
    firebaseSecret = configs.get('Firebase', 'FirebaseSecret')

    f = firebase.FirebaseApplication(firebaseUrl, None)
    f.authentication = firebase.FirebaseAuthentication(firebaseSecret, "", admin=True)
    return f

...

f = connect_firebase(config)
data = json.dumps(f.get('/', None), sort_keys = False, indent = 4) #busts here

具有相同参数的相同脚本几周前在pythoneverywhere服务器上运行正常。我已经在我的机器和服务器上使用 pip 重新安装了 requests 1.1.0python-firebase,我仍然可以从我的机器访问它,但不能从 pythoneverywhere 服务器访问它。知道什么会导致这个吗?

如果您可以通过身份验证部分,那么连接应该是 through/it 不是代理问题。

也许仔细检查一下您的 ProdFirebaseURL 是否正确? 并仔细检查您调用 f.get()'/' 是否是有效的终点?

我会尝试做 f.get(<the-full-url>) 只是为了加倍 check/make 当然。

已通过从服务器卸载 requests 1.1.0 库修复此问题。仍然不知道出了什么问题,因为 Firebaseadvise 在安装 Firebase.

之前安装了那个库