bblfsh/python-client

Function `supported_languages` raises unimplemented exception

EgorBu opened this issue · 2 comments

Hi,
I tried to call https://github.com/bblfsh/client-python/blob/master/bblfsh/client.py#L103:

client.supported_languages()

and it gives me

_Rendezvous                               Traceback (most recent call last)
<ipython-input-11-50b543ce587c> in <module>()
----> 1 client.supported_languages()

/usr/local/lib/python3.5/dist-packages/bblfsh/client.py in supported_languages(self)
    102 
    103     def supported_languages(self):
--> 104         sup_response = self._stub.SupportedLanguages(SupportedLanguagesRequest())
    105         return sup_response.languages
    106 

/usr/local/lib/python3.5/dist-packages/grpc/_channel.py in __call__(self, request, timeout, metadata, credentials)
    512     def __call__(self, request, timeout=None, metadata=None, credentials=None):
    513         state, call, = self._blocking(request, timeout, metadata, credentials)
--> 514         return _end_unary_response_blocking(state, call, False, None)
    515 
    516     def with_call(self, request, timeout=None, metadata=None, credentials=None):

/usr/local/lib/python3.5/dist-packages/grpc/_channel.py in _end_unary_response_blocking(state, call, with_call, deadline)
    446             return state.response
    447     else:
--> 448         raise _Rendezvous(state, None, None, deadline)
    449 
    450 

_Rendezvous: <_Rendezvous of RPC that terminated with:
	status = StatusCode.UNIMPLEMENTED
	details = "unknown method SupportedLanguages"
	debug_error_string = "{"created":"@1536337572.354363571","description":"Error received from peer","file":"src/core/lib/surface/call.cc","file_line":1083,"grpc_message":"unknown method SupportedLanguages","grpc_status":12}"
>

I updated bblfsh-client version to bblfsh-2.12.1 but in python it still shows client version:

elapsed {
}
version: "v2.4.1"
build {
  seconds: -62135596800
}
bzz commented

Could not reproduce it with latest bblfsh-client

$ virtualenv -p python3 .venv3-bblfsh-client.v1
$ source .venv3-bblfsh-client.v1/bin/activate
$ CFLAGS=-stdlib=libc++ pip3 install bblfsh
$ pip3 freeze | grep bblfsh
bblfsh==2.12.7
$ python
>>> import bblfsh
>>> client = bblfsh.BblfshClient("0.0.0.0:9432")
>>> client.supported_languages()

[name: "JavaScript"
language: "javascript"
version: "v2.5.0"
status: "beta"
features: "ast"
features: "uast"
features: "roles"
]

@EgorBu could you please try and check if this is still the issue?

bzz commented

Closing as it seems to be fixed now, but please, feel free to re-open if that is not the case.