ArangoDBのPyArangoドライバを使用しようとしています。私はPython 3.5.2 for Windows(私の組織が提供するもの)とArangoDB 3.0を自分のコンピュータ上でローカルに実行しています。PyArango.Connectionがjson.decoderで失敗しました.JSONDecodeErrorがユーザコードによって処理されませんでした。
Iは、Python対話シェルで次の(またはスクリプトで)を実行します接続()行が評価されると
from pyArango.connection import *
myConnection = Connection()
以下がコンソールに出力される。
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\xxxxx\AppData\Local\Programs\Python\Python35-32\lib\site-packages\pyArango\connection.py", line 88, in __init__
self.reload()
File "C:\Users\xxxxx\AppData\Local\Programs\Python\Python35-32\lib\site-packages\pyArango\connection.py", line 107, in reload
data = r.json()
File "C:\Users\xxxxx\AppData\Local\Programs\Python\Python35-32\lib\site-packages\requests\models.py", line 812, in json
return complexjson.loads(self.text, **kwargs)
File "C:\Users\xxxxx\AppData\Local\Programs\Python\Python35-32\lib\json\__init__.py", line 319, in loads
return _default_decoder.decode(s)
File "C:\Users\xxxxx\AppData\Local\Programs\Python\Python35-32\lib\json\decoder.py", line 339, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "C:\Users\xxxxx\AppData\Local\Programs\Python\Python35-32\lib\json\decoder.py", line 357, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
https://www.arangodb.com/tutorials/tutorial-python/とhttps://github.com/tariqdaouda/pyArangoのオンラインチュートリアル/ドキュメンテーションは、ArangoDB 3.xとPython 3.4のサポートを示しています。 pyArangoドライバでPython 3.5を使用しようとすると、この問題が発生しましたか?もしそうなら、この問題に解決策がありますか?
ありがとうございました
pyArangoは2.7と3.5の両方で自動的にテストされます。私は、json()への呼び出しが失敗したときに常に要求コンテンツを出力するための更新をプッシュしました。 git pullをやり直して再試行できますか?それは何が起こっているかについて私たちにもっと多くの情報を与えるはずです。 – tariqdaouda
ありがとうございます。私は最新のアップデートを引っ張った。この問題は、プロキシサーバーがPython httpクライアントのArangoDBサーバーへの接続を拒否したためです。プロキシサーバーは、jsonパーサーによって解析できないhtmlエラーページを返します。 – muddlednbefuddled