python-3.6arangodbpyarango

TypeError: string indices must be integers on ArangoDB


Arango module gives a weird error while accessing databases:

from arango import ArangoClient 
client = ArangoClient(hosts='http://localhost:8529/') 
sys_db = client.db('_system', username='root', password='root')
sys_db.databases()

below is the error:

Traceback (most recent call last): File "", line 1, in File "/home/ubuntu/arangovenv/lib/python3.6/site-packages/arango/database.py", line 699, in databases return self._execute(request, response_handler) File "/home/ubuntu/arangovenv/lib/python3.6/site-packages/arango/api.py", line 66, in _execute return self._executor.execute(request, response_handler) File "/home/ubuntu/arangovenv/lib/python3.6/site-packages/arango/executor.py", line 82, in execute return response_handler(resp) File "/home/ubuntu/arangovenv/lib/python3.6/site-packages/arango/database.py", line 697, in response_handler return resp.body['result'] TypeError: string indices must be integers

calling database module from "packages/arango/database.py" giving me the same error.

my env:

1) ubuntu 16.4

2) python-arango==5.2.1

any help appreciated.


Solution

  • If you are running it on some server, it may be a server issue. It was in my case at least. I ran the following to clear the proxy and it worked fine.

    export http_proxy=''