Coder Social home page Coder Social logo

jedihttp's People

Contributors

hexchain avatar micbou avatar ptrv avatar vheon avatar vincentwoo avatar zzbot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

jedihttp's Issues

AttributeError: 'ValuesArguments' object has no attribute 'argument_node'

Hi!
Using JediHTTP with YouCompleteMe in Vim, I'm not getting completions for the python lib networkx. It seems that there is a parsing issue with the response from jedi leading to the error in the title, subsequently failing to generate a list of completion candidates. I have tracked this issue down to be 99% with JediHTTP, as I was able to get completions for jedi via its Python-API (i.e. via "import jedi").

A test case and the full stack trace follow below.

Test case

# I did this in a virtualenv, but systemwide is the same
$ pip install networkx
$ .venv/bin/python /path/to/jedihttp.py --port 38241 &
$ curl -X POST 127.0.0.1:38241/completions \
    -H 'content-type: application/json' \
    -d '{"source": "import networkx as nx\n\ng = nx.G\n",
        "line": 3,
        "col": 7,
        "source_path": "/home/baumanno/code/foo.py"}'
# The result of this call is an error containing the stack trace;
# the output of the jedihttp.py call is, again, the stack trace

# This call, however, succeeds!
$ curl -X POST 127.0.0.1:38241/completions \
    -H 'content-type: application/json' \
    -d '{"source": "import networkx as nx\n\ng = nx.G\n",
        "line": 3,
        "col": 8,
        "source_path": "/home/baumanno/code/foo.py"}'

As you can see, something seems to be amiss with the column number. It may well be that it is an issue with networkx itself, but I can't tell. I'll be happy to provide further information if required!

Jedi lib

For completeness, here is the jedi-only code that works:

import jedi

script = '''import networkx as nx

g = nx.G'''
# both of these work and list different sets of completions
jedi.Script(script, 3, 7).completions()
jedi.Script(script, 3, 8).completions()

Stacktrace

python .venv/bin/python /path/to/jedihttp.py --port 38241 --log=debug
serving on http://127.0.0.1:38241
2018-01-12 00:02:06,176 - DEBUG - received /completions request
2018-01-12 00:02:17,834 - DEBUG - received /completions request
Traceback (most recent call last):
  File "/home/baumanno/dotfiles/vim/pack/plugins/start/YouCompleteMe/third_party/ycmd/third_party/JediHTTP/vendor/bottle/bottle.py", line 862, in _handle
    return route.call(**args)
  File "/home/baumanno/dotfiles/vim/pack/plugins/start/YouCompleteMe/third_party/ycmd/third_party/JediHTTP/vendor/bottle/bottle.py", line 1732, in wrapper
    rv = callback(*a, **ka)
  File "/home/baumanno/dotfiles/vim/pack/plugins/start/YouCompleteMe/third_party/ycmd/third_party/JediHTTP/jedihttp/handlers.py", line 66, in completions
    response = _format_completions(script.completions())
  File "/home/baumanno/dotfiles/vim/pack/plugins/start/YouCompleteMe/third_party/ycmd/third_party/JediHTTP/jedihttp/handlers.py", line 155, in _format_completions
    } for completion in completions]
  File "/home/baumanno/dotfiles/vim/pack/plugins/start/YouCompleteMe/third_party/ycmd/third_party/JediHTTP/jedihttp/handlers.py", line 155, in <listcomp>
    } for completion in completions]
  File "/home/baumanno/dotfiles/vim/pack/plugins/start/YouCompleteMe/third_party/ycmd/third_party/JediHTTP/vendor/jedi/jedi/api/classes.py", line 148, in type
    for context in self._name.infer():
  File "/home/baumanno/dotfiles/vim/pack/plugins/start/YouCompleteMe/third_party/ycmd/third_party/JediHTTP/vendor/jedi/jedi/evaluate/filters.py", line 97, in infer
    return _name_to_types(self.parent_context.evaluator, self.parent_context, self.tree_name)
  File "/home/baumanno/dotfiles/vim/pack/plugins/start/YouCompleteMe/third_party/ycmd/third_party/JediHTTP/vendor/jedi/jedi/evaluate/finder.py", line 231, in _name_to_types
    types = imports.infer_import(context, tree_name)
  File "/home/baumanno/dotfiles/vim/pack/plugins/start/YouCompleteMe/third_party/ycmd/third_party/JediHTTP/vendor/jedi/jedi/evaluate/cache.py", line 42, in wrapper
    rv = function(obj, *args, **kwargs)
  File "/home/baumanno/dotfiles/vim/pack/plugins/start/YouCompleteMe/third_party/ycmd/third_party/JediHTTP/vendor/jedi/jedi/evaluate/imports.py", line 75, in infer_import
    ) for t in types
  File "/home/baumanno/dotfiles/vim/pack/plugins/start/YouCompleteMe/third_party/ycmd/third_party/JediHTTP/vendor/jedi/jedi/common.py", line 105, in unite
    return set(typ for types in iterable for typ in types)
  File "/home/baumanno/dotfiles/vim/pack/plugins/start/YouCompleteMe/third_party/ycmd/third_party/JediHTTP/vendor/jedi/jedi/common.py", line 105, in <genexpr>
    return set(typ for types in iterable for typ in types)
  File "/home/baumanno/dotfiles/vim/pack/plugins/start/YouCompleteMe/third_party/ycmd/third_party/JediHTTP/vendor/jedi/jedi/evaluate/imports.py", line 75, in <genexpr>
    ) for t in types
  File "/home/baumanno/dotfiles/vim/pack/plugins/start/YouCompleteMe/third_party/ycmd/third_party/JediHTTP/vendor/jedi/jedi/_compatibility.py", line 212, in <lambda>
    return lambda *args, **kwargs: self.func(obj, *args, **kwargs)
  File "/home/baumanno/dotfiles/vim/pack/plugins/start/YouCompleteMe/third_party/ycmd/third_party/JediHTTP/vendor/jedi/jedi/evaluate/context.py", line 63, in py__getattribute__
    analysis_errors)
  File "/home/baumanno/dotfiles/vim/pack/plugins/start/YouCompleteMe/third_party/ycmd/third_party/JediHTTP/vendor/jedi/jedi/evaluate/__init__.py", line 159, in find_types
    return f.find(filters, attribute_lookup=not search_global)
  File "/home/baumanno/dotfiles/vim/pack/plugins/start/YouCompleteMe/third_party/ycmd/third_party/JediHTTP/vendor/jedi/jedi/debug.py", line 79, in wrapper
    return func(*args, **kwargs)
  File "/home/baumanno/dotfiles/vim/pack/plugins/start/YouCompleteMe/third_party/ycmd/third_party/JediHTTP/vendor/jedi/jedi/evaluate/finder.py", line 68, in find
    types = self._names_to_types(names, attribute_lookup)
  File "/home/baumanno/dotfiles/vim/pack/plugins/start/YouCompleteMe/third_party/ycmd/third_party/JediHTTP/vendor/jedi/jedi/evaluate/finder.py", line 163, in _names_to_types
    types = unite(name.infer() for name in names)
  File "/home/baumanno/dotfiles/vim/pack/plugins/start/YouCompleteMe/third_party/ycmd/third_party/JediHTTP/vendor/jedi/jedi/common.py", line 105, in unite
    return set(typ for types in iterable for typ in types)
  File "/home/baumanno/dotfiles/vim/pack/plugins/start/YouCompleteMe/third_party/ycmd/third_party/JediHTTP/vendor/jedi/jedi/common.py", line 105, in <genexpr>
    return set(typ for types in iterable for typ in types)
  File "/home/baumanno/dotfiles/vim/pack/plugins/start/YouCompleteMe/third_party/ycmd/third_party/JediHTTP/vendor/jedi/jedi/evaluate/finder.py", line 163, in <genexpr>
    types = unite(name.infer() for name in names)
  File "/home/baumanno/dotfiles/vim/pack/plugins/start/YouCompleteMe/third_party/ycmd/third_party/JediHTTP/vendor/jedi/jedi/evaluate/filters.py", line 97, in infer
    return _name_to_types(self.parent_context.evaluator, self.parent_context, self.tree_name)
  File "/home/baumanno/dotfiles/vim/pack/plugins/start/YouCompleteMe/third_party/ycmd/third_party/JediHTTP/vendor/jedi/jedi/evaluate/finder.py", line 233, in _name_to_types
    types = _apply_decorators(evaluator, context, node)
  File "/home/baumanno/dotfiles/vim/pack/plugins/start/YouCompleteMe/third_party/ycmd/third_party/JediHTTP/vendor/jedi/jedi/evaluate/finder.py", line 281, in _apply_decorators
    for dec_value in dec_values)
  File "/home/baumanno/dotfiles/vim/pack/plugins/start/YouCompleteMe/third_party/ycmd/third_party/JediHTTP/vendor/jedi/jedi/common.py", line 105, in unite
    return set(typ for types in iterable for typ in types)
  File "/home/baumanno/dotfiles/vim/pack/plugins/start/YouCompleteMe/third_party/ycmd/third_party/JediHTTP/vendor/jedi/jedi/common.py", line 105, in <genexpr>
    return set(typ for types in iterable for typ in types)
  File "/home/baumanno/dotfiles/vim/pack/plugins/start/YouCompleteMe/third_party/ycmd/third_party/JediHTTP/vendor/jedi/jedi/evaluate/finder.py", line 281, in <genexpr>
    for dec_value in dec_values)
  File "/home/baumanno/dotfiles/vim/pack/plugins/start/YouCompleteMe/third_party/ycmd/third_party/JediHTTP/vendor/jedi/jedi/evaluate/context.py", line 36, in execute
    return self.evaluator.execute(self, arguments)
  File "/home/baumanno/dotfiles/vim/pack/plugins/start/YouCompleteMe/third_party/ycmd/third_party/JediHTTP/vendor/jedi/jedi/debug.py", line 79, in wrapper
    return func(*args, **kwargs)
  File "/home/baumanno/dotfiles/vim/pack/plugins/start/YouCompleteMe/third_party/ycmd/third_party/JediHTTP/vendor/jedi/jedi/evaluate/__init__.py", line 465, in execute
    types = func(arguments)
  File "/home/baumanno/dotfiles/vim/pack/plugins/start/YouCompleteMe/third_party/ycmd/third_party/JediHTTP/vendor/jedi/jedi/evaluate/representation.py", line 275, in py__call__
    return self.infer_function_execution(function_execution)
  File "/home/baumanno/dotfiles/vim/pack/plugins/start/YouCompleteMe/third_party/ycmd/third_party/JediHTTP/vendor/jedi/jedi/evaluate/representation.py", line 265, in infer_function_execution
    return function_execution.get_return_values()
  File "/home/baumanno/dotfiles/vim/pack/plugins/start/YouCompleteMe/third_party/ycmd/third_party/JediHTTP/vendor/jedi/jedi/evaluate/cache.py", line 42, in wrapper
    rv = function(obj, *args, **kwargs)
  File "/home/baumanno/dotfiles/vim/pack/plugins/start/YouCompleteMe/third_party/ycmd/third_party/JediHTTP/vendor/jedi/jedi/evaluate/recursion.py", line 83, in wrapper
    result = func(execution, **kwargs)
  File "/home/baumanno/dotfiles/vim/pack/plugins/start/YouCompleteMe/third_party/ycmd/third_party/JediHTTP/vendor/jedi/jedi/evaluate/representation.py", line 343, in get_return_values
    types |= self.eval_node(children[1])
  File "/home/baumanno/dotfiles/vim/pack/plugins/start/YouCompleteMe/third_party/ycmd/third_party/JediHTTP/vendor/jedi/jedi/evaluate/context.py", line 47, in eval_node
    return self.evaluator.eval_element(self, node)
  File "/home/baumanno/dotfiles/vim/pack/plugins/start/YouCompleteMe/third_party/ycmd/third_party/JediHTTP/vendor/jedi/jedi/evaluate/__init__.py", line 282, in eval_element
    return self._eval_element_if_evaluated(context, element)
  File "/home/baumanno/dotfiles/vim/pack/plugins/start/YouCompleteMe/third_party/ycmd/third_party/JediHTTP/vendor/jedi/jedi/evaluate/__init__.py", line 294, in _eval_element_if_evaluated
    return self._eval_element_cached(context, element)
  File "/home/baumanno/dotfiles/vim/pack/plugins/start/YouCompleteMe/third_party/ycmd/third_party/JediHTTP/vendor/jedi/jedi/evaluate/cache.py", line 42, in wrapper
    rv = function(obj, *args, **kwargs)
  File "/home/baumanno/dotfiles/vim/pack/plugins/start/YouCompleteMe/third_party/ycmd/third_party/JediHTTP/vendor/jedi/jedi/evaluate/__init__.py", line 298, in _eval_element_cached
    return self._eval_element_not_cached(context, element)
  File "/home/baumanno/dotfiles/vim/pack/plugins/start/YouCompleteMe/third_party/ycmd/third_party/JediHTTP/vendor/jedi/jedi/debug.py", line 79, in wrapper
    return func(*args, **kwargs)
  File "/home/baumanno/dotfiles/vim/pack/plugins/start/YouCompleteMe/third_party/ycmd/third_party/JediHTTP/vendor/jedi/jedi/evaluate/__init__.py", line 107, in wrapper
    return func(evaluator, context, *args, **kwargs)
  File "/home/baumanno/dotfiles/vim/pack/plugins/start/YouCompleteMe/third_party/ycmd/third_party/JediHTTP/vendor/jedi/jedi/evaluate/__init__.py", line 326, in _eval_element_not_cached
    types = self.eval_trailer(context, types, trailer)
  File "/home/baumanno/dotfiles/vim/pack/plugins/start/YouCompleteMe/third_party/ycmd/third_party/JediHTTP/vendor/jedi/jedi/evaluate/__init__.py", line 443, in eval_trailer
    new_types |= self.execute(typ, arguments)
  File "/home/baumanno/dotfiles/vim/pack/plugins/start/YouCompleteMe/third_party/ycmd/third_party/JediHTTP/vendor/jedi/jedi/debug.py", line 79, in wrapper
    return func(*args, **kwargs)
  File "/home/baumanno/dotfiles/vim/pack/plugins/start/YouCompleteMe/third_party/ycmd/third_party/JediHTTP/vendor/jedi/jedi/evaluate/__init__.py", line 465, in execute
    types = func(arguments)
  File "/home/baumanno/dotfiles/vim/pack/plugins/start/YouCompleteMe/third_party/ycmd/third_party/JediHTTP/vendor/jedi/jedi/evaluate/representation.py", line 275, in py__call__
    return self.infer_function_execution(function_execution)
  File "/home/baumanno/dotfiles/vim/pack/plugins/start/YouCompleteMe/third_party/ycmd/third_party/JediHTTP/vendor/jedi/jedi/evaluate/representation.py", line 265, in infer_function_execution
    return function_execution.get_return_values()
  File "/home/baumanno/dotfiles/vim/pack/plugins/start/YouCompleteMe/third_party/ycmd/third_party/JediHTTP/vendor/jedi/jedi/evaluate/cache.py", line 42, in wrapper
    rv = function(obj, *args, **kwargs)
  File "/home/baumanno/dotfiles/vim/pack/plugins/start/YouCompleteMe/third_party/ycmd/third_party/JediHTTP/vendor/jedi/jedi/evaluate/recursion.py", line 83, in wrapper
    result = func(execution, **kwargs)
  File "/home/baumanno/dotfiles/vim/pack/plugins/start/YouCompleteMe/third_party/ycmd/third_party/JediHTTP/vendor/jedi/jedi/evaluate/representation.py", line 343, in get_return_values
    types |= self.eval_node(children[1])
  File "/home/baumanno/dotfiles/vim/pack/plugins/start/YouCompleteMe/third_party/ycmd/third_party/JediHTTP/vendor/jedi/jedi/evaluate/context.py", line 47, in eval_node
    return self.evaluator.eval_element(self, node)
  File "/home/baumanno/dotfiles/vim/pack/plugins/start/YouCompleteMe/third_party/ycmd/third_party/JediHTTP/vendor/jedi/jedi/evaluate/__init__.py", line 282, in eval_element
    return self._eval_element_if_evaluated(context, element)
  File "/home/baumanno/dotfiles/vim/pack/plugins/start/YouCompleteMe/third_party/ycmd/third_party/JediHTTP/vendor/jedi/jedi/evaluate/__init__.py", line 294, in _eval_element_if_evaluated
    return self._eval_element_cached(context, element)
  File "/home/baumanno/dotfiles/vim/pack/plugins/start/YouCompleteMe/third_party/ycmd/third_party/JediHTTP/vendor/jedi/jedi/evaluate/cache.py", line 42, in wrapper
    rv = function(obj, *args, **kwargs)
  File "/home/baumanno/dotfiles/vim/pack/plugins/start/YouCompleteMe/third_party/ycmd/third_party/JediHTTP/vendor/jedi/jedi/evaluate/__init__.py", line 298, in _eval_element_cached
    return self._eval_element_not_cached(context, element)
  File "/home/baumanno/dotfiles/vim/pack/plugins/start/YouCompleteMe/third_party/ycmd/third_party/JediHTTP/vendor/jedi/jedi/debug.py", line 79, in wrapper
    return func(*args, **kwargs)
  File "/home/baumanno/dotfiles/vim/pack/plugins/start/YouCompleteMe/third_party/ycmd/third_party/JediHTTP/vendor/jedi/jedi/evaluate/__init__.py", line 107, in wrapper
    return func(evaluator, context, *args, **kwargs)
  File "/home/baumanno/dotfiles/vim/pack/plugins/start/YouCompleteMe/third_party/ycmd/third_party/JediHTTP/vendor/jedi/jedi/evaluate/__init__.py", line 307, in _eval_element_not_cached
    types = self.eval_atom(context, element)
  File "/home/baumanno/dotfiles/vim/pack/plugins/start/YouCompleteMe/third_party/ycmd/third_party/JediHTTP/vendor/jedi/jedi/evaluate/__init__.py", line 378, in eval_atom
    search_global=True
  File "/home/baumanno/dotfiles/vim/pack/plugins/start/YouCompleteMe/third_party/ycmd/third_party/JediHTTP/vendor/jedi/jedi/_compatibility.py", line 212, in <lambda>
    return lambda *args, **kwargs: self.func(obj, *args, **kwargs)
  File "/home/baumanno/dotfiles/vim/pack/plugins/start/YouCompleteMe/third_party/ycmd/third_party/JediHTTP/vendor/jedi/jedi/evaluate/context.py", line 63, in py__getattribute__
    analysis_errors)
  File "/home/baumanno/dotfiles/vim/pack/plugins/start/YouCompleteMe/third_party/ycmd/third_party/JediHTTP/vendor/jedi/jedi/evaluate/__init__.py", line 159, in find_types
    return f.find(filters, attribute_lookup=not search_global)
  File "/home/baumanno/dotfiles/vim/pack/plugins/start/YouCompleteMe/third_party/ycmd/third_party/JediHTTP/vendor/jedi/jedi/debug.py", line 79, in wrapper
    return func(*args, **kwargs)
  File "/home/baumanno/dotfiles/vim/pack/plugins/start/YouCompleteMe/third_party/ycmd/third_party/JediHTTP/vendor/jedi/jedi/evaluate/finder.py", line 60, in find
    names = self.filter_name(filters)
  File "/home/baumanno/dotfiles/vim/pack/plugins/start/YouCompleteMe/third_party/ycmd/third_party/JediHTTP/vendor/jedi/jedi/evaluate/finder.py", line 125, in filter_name
    names = filter.get(self._string_name)
  File "/home/baumanno/dotfiles/vim/pack/plugins/start/YouCompleteMe/third_party/ycmd/third_party/JediHTTP/vendor/jedi/jedi/evaluate/filters.py", line 167, in get
    return self._convert_names(self._filter(names))
  File "/home/baumanno/dotfiles/vim/pack/plugins/start/YouCompleteMe/third_party/ycmd/third_party/JediHTTP/vendor/jedi/jedi/evaluate/filters.py", line 199, in _filter
    return list(self._check_flows(names))
  File "/home/baumanno/dotfiles/vim/pack/plugins/start/YouCompleteMe/third_party/ycmd/third_party/JediHTTP/vendor/jedi/jedi/evaluate/filters.py", line 213, in _check_flows
    self._node_context, self._parser_scope, name, self._origin_scope
  File "/home/baumanno/dotfiles/vim/pack/plugins/start/YouCompleteMe/third_party/ycmd/third_party/JediHTTP/vendor/jedi/jedi/evaluate/flow_analysis.py", line 76, in reachability_check
    return _break_check(context, context_scope, first_flow_scope, node)
  File "/home/baumanno/dotfiles/vim/pack/plugins/start/YouCompleteMe/third_party/ycmd/third_party/JediHTTP/vendor/jedi/jedi/evaluate/flow_analysis.py", line 84, in _break_check
    reachable = _check_if(context, check_node)
  File "/home/baumanno/dotfiles/vim/pack/plugins/start/YouCompleteMe/third_party/ycmd/third_party/JediHTTP/vendor/jedi/jedi/evaluate/flow_analysis.py", line 107, in _check_if
    types = context.eval_node(node)
  File "/home/baumanno/dotfiles/vim/pack/plugins/start/YouCompleteMe/third_party/ycmd/third_party/JediHTTP/vendor/jedi/jedi/evaluate/context.py", line 47, in eval_node
    return self.evaluator.eval_element(self, node)
  File "/home/baumanno/dotfiles/vim/pack/plugins/start/YouCompleteMe/third_party/ycmd/third_party/JediHTTP/vendor/jedi/jedi/evaluate/__init__.py", line 277, in eval_element
    return self._eval_element_if_evaluated(context, element)
  File "/home/baumanno/dotfiles/vim/pack/plugins/start/YouCompleteMe/third_party/ycmd/third_party/JediHTTP/vendor/jedi/jedi/evaluate/__init__.py", line 294, in _eval_element_if_evaluated
    return self._eval_element_cached(context, element)
  File "/home/baumanno/dotfiles/vim/pack/plugins/start/YouCompleteMe/third_party/ycmd/third_party/JediHTTP/vendor/jedi/jedi/evaluate/cache.py", line 42, in wrapper
    rv = function(obj, *args, **kwargs)
  File "/home/baumanno/dotfiles/vim/pack/plugins/start/YouCompleteMe/third_party/ycmd/third_party/JediHTTP/vendor/jedi/jedi/evaluate/__init__.py", line 298, in _eval_element_cached
    return self._eval_element_not_cached(context, element)
  File "/home/baumanno/dotfiles/vim/pack/plugins/start/YouCompleteMe/third_party/ycmd/third_party/JediHTTP/vendor/jedi/jedi/debug.py", line 79, in wrapper
    return func(*args, **kwargs)
  File "/home/baumanno/dotfiles/vim/pack/plugins/start/YouCompleteMe/third_party/ycmd/third_party/JediHTTP/vendor/jedi/jedi/evaluate/__init__.py", line 107, in wrapper
    return func(evaluator, context, *args, **kwargs)
  File "/home/baumanno/dotfiles/vim/pack/plugins/start/YouCompleteMe/third_party/ycmd/third_party/JediHTTP/vendor/jedi/jedi/evaluate/__init__.py", line 358, in _eval_element_not_cached
    types = precedence.calculate_children(self, context, element.children)
  File "/home/baumanno/dotfiles/vim/pack/plugins/start/YouCompleteMe/third_party/ycmd/third_party/JediHTTP/vendor/jedi/jedi/evaluate/precedence.py", line 44, in calculate_children
    types = context.eval_node(next(iterator))
  File "/home/baumanno/dotfiles/vim/pack/plugins/start/YouCompleteMe/third_party/ycmd/third_party/JediHTTP/vendor/jedi/jedi/evaluate/context.py", line 47, in eval_node
    return self.evaluator.eval_element(self, node)
  File "/home/baumanno/dotfiles/vim/pack/plugins/start/YouCompleteMe/third_party/ycmd/third_party/JediHTTP/vendor/jedi/jedi/evaluate/__init__.py", line 277, in eval_element
    return self._eval_element_if_evaluated(context, element)
  File "/home/baumanno/dotfiles/vim/pack/plugins/start/YouCompleteMe/third_party/ycmd/third_party/JediHTTP/vendor/jedi/jedi/evaluate/__init__.py", line 294, in _eval_element_if_evaluated
    return self._eval_element_cached(context, element)
  File "/home/baumanno/dotfiles/vim/pack/plugins/start/YouCompleteMe/third_party/ycmd/third_party/JediHTTP/vendor/jedi/jedi/evaluate/cache.py", line 42, in wrapper
    rv = function(obj, *args, **kwargs)
  File "/home/baumanno/dotfiles/vim/pack/plugins/start/YouCompleteMe/third_party/ycmd/third_party/JediHTTP/vendor/jedi/jedi/evaluate/__init__.py", line 298, in _eval_element_cached
    return self._eval_element_not_cached(context, element)
  File "/home/baumanno/dotfiles/vim/pack/plugins/start/YouCompleteMe/third_party/ycmd/third_party/JediHTTP/vendor/jedi/jedi/debug.py", line 79, in wrapper
    return func(*args, **kwargs)
  File "/home/baumanno/dotfiles/vim/pack/plugins/start/YouCompleteMe/third_party/ycmd/third_party/JediHTTP/vendor/jedi/jedi/evaluate/__init__.py", line 107, in wrapper
    return func(evaluator, context, *args, **kwargs)
  File "/home/baumanno/dotfiles/vim/pack/plugins/start/YouCompleteMe/third_party/ycmd/third_party/JediHTTP/vendor/jedi/jedi/evaluate/__init__.py", line 307, in _eval_element_not_cached
    types = self.eval_atom(context, element)
  File "/home/baumanno/dotfiles/vim/pack/plugins/start/YouCompleteMe/third_party/ycmd/third_party/JediHTTP/vendor/jedi/jedi/evaluate/__init__.py", line 378, in eval_atom
    search_global=True
  File "/home/baumanno/dotfiles/vim/pack/plugins/start/YouCompleteMe/third_party/ycmd/third_party/JediHTTP/vendor/jedi/jedi/_compatibility.py", line 212, in <lambda>
    return lambda *args, **kwargs: self.func(obj, *args, **kwargs)
  File "/home/baumanno/dotfiles/vim/pack/plugins/start/YouCompleteMe/third_party/ycmd/third_party/JediHTTP/vendor/jedi/jedi/evaluate/context.py", line 63, in py__getattribute__
    analysis_errors)
  File "/home/baumanno/dotfiles/vim/pack/plugins/start/YouCompleteMe/third_party/ycmd/third_party/JediHTTP/vendor/jedi/jedi/evaluate/__init__.py", line 159, in find_types
    return f.find(filters, attribute_lookup=not search_global)
  File "/home/baumanno/dotfiles/vim/pack/plugins/start/YouCompleteMe/third_party/ycmd/third_party/JediHTTP/vendor/jedi/jedi/debug.py", line 79, in wrapper
    return func(*args, **kwargs)
  File "/home/baumanno/dotfiles/vim/pack/plugins/start/YouCompleteMe/third_party/ycmd/third_party/JediHTTP/vendor/jedi/jedi/evaluate/finder.py", line 68, in find
    types = self._names_to_types(names, attribute_lookup)
  File "/home/baumanno/dotfiles/vim/pack/plugins/start/YouCompleteMe/third_party/ycmd/third_party/JediHTTP/vendor/jedi/jedi/evaluate/finder.py", line 163, in _names_to_types
    types = unite(name.infer() for name in names)
  File "/home/baumanno/dotfiles/vim/pack/plugins/start/YouCompleteMe/third_party/ycmd/third_party/JediHTTP/vendor/jedi/jedi/common.py", line 105, in unite
    return set(typ for types in iterable for typ in types)
  File "/home/baumanno/dotfiles/vim/pack/plugins/start/YouCompleteMe/third_party/ycmd/third_party/JediHTTP/vendor/jedi/jedi/common.py", line 105, in <genexpr>
    return set(typ for types in iterable for typ in types)
  File "/home/baumanno/dotfiles/vim/pack/plugins/start/YouCompleteMe/third_party/ycmd/third_party/JediHTTP/vendor/jedi/jedi/evaluate/finder.py", line 163, in <genexpr>
    types = unite(name.infer() for name in names)
  File "/home/baumanno/dotfiles/vim/pack/plugins/start/YouCompleteMe/third_party/ycmd/third_party/JediHTTP/vendor/jedi/jedi/evaluate/filters.py", line 115, in infer
    return self.get_param().infer()
  File "/home/baumanno/dotfiles/vim/pack/plugins/start/YouCompleteMe/third_party/ycmd/third_party/JediHTTP/vendor/jedi/jedi/evaluate/filters.py", line 118, in get_param
    params = self.parent_context.get_params()
  File "/home/baumanno/dotfiles/vim/pack/plugins/start/YouCompleteMe/third_party/ycmd/third_party/JediHTTP/vendor/jedi/jedi/evaluate/cache.py", line 42, in wrapper
    rv = function(obj, *args, **kwargs)
  File "/home/baumanno/dotfiles/vim/pack/plugins/start/YouCompleteMe/third_party/ycmd/third_party/JediHTTP/vendor/jedi/jedi/evaluate/representation.py", line 419, in get_params
    return self.var_args.get_params(self)
  File "/home/baumanno/dotfiles/vim/pack/plugins/start/YouCompleteMe/third_party/ycmd/third_party/JediHTTP/vendor/jedi/jedi/evaluate/param.py", line 80, in get_params
    return get_params(execution_context, self)
  File "/home/baumanno/dotfiles/vim/pack/plugins/start/YouCompleteMe/third_party/ycmd/third_party/JediHTTP/vendor/jedi/jedi/evaluate/param.py", line 322, in get_params
    for node in var_args.get_calling_nodes():
  File "/home/baumanno/dotfiles/vim/pack/plugins/start/YouCompleteMe/third_party/ycmd/third_party/JediHTTP/vendor/jedi/jedi/evaluate/param.py", line 210, in get_calling_nodes
    return [arguments.argument_node or arguments.trailer]
AttributeError: 'ValuesArguments' object has no attribute 'argument_node'

RecursionError while completing pymongo objects

description

I use Vim with YCM, and they worked very well most of the time, but it seems that something is wrong completing pymongo objects.

Relevant piece of code:

import pymongo
pymongo.MongoClient().[cursor-here]

After I inputed the dot after pymongo.MongoClient(), nothing shows up.
I looked at the log file of YCM, and it shows:

2017-12-27 23:24:27,851 - INFO - Starting new HTTP connection (1): 127.0.0.1
2017-12-27 23:24:28,609 - ERROR - Exception from semantic completer (using general): Traceback (most recent call last):
  File "/Users/zhaoxiaoyu/k-vim/bundle/YouCompleteMe/third_party/ycmd/ycmd/../ycmd/handlers.py", line 103, in GetCompletions
    .ComputeCandidates( request_data ) )
  File "/Users/zhaoxiaoyu/k-vim/bundle/YouCompleteMe/third_party/ycmd/ycmd/../ycmd/completers/completer.py", line 218, in ComputeCandidates
    candidates = self._GetCandidatesFromSubclass( request_data )
  File "/Users/zhaoxiaoyu/k-vim/bundle/YouCompleteMe/third_party/ycmd/ycmd/../ycmd/completers/completer.py", line 231, in _GetCandidatesFromSubclass
    raw_completions = self.ComputeCandidatesInner( request_data )
  File "/Users/zhaoxiaoyu/k-vim/bundle/YouCompleteMe/third_party/ycmd/ycmd/../ycmd/completers/python/jedi_completer.py", line 272, in ComputeCandidatesInner
    for completion in self._JediCompletions( request_data ) ]
  File "/Users/zhaoxiaoyu/k-vim/bundle/YouCompleteMe/third_party/ycmd/ycmd/../ycmd/completers/python/jedi_completer.py", line 277, in _JediCompletions
    request_data )[ 'completions' ]
  File "/Users/zhaoxiaoyu/k-vim/bundle/YouCompleteMe/third_party/ycmd/ycmd/../ycmd/completers/python/jedi_completer.py", line 215, in _GetResponse
    response.raise_for_status()
  File "/Users/zhaoxiaoyu/k-vim/bundle/YouCompleteMe/third_party/ycmd/third_party/requests/requests/models.py", line 840, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 500 Server Error: Internal Server Error for url: http://127.0.0.1:58047/completions

I manually started JediHTTP server:

python jedihttp/__main__.py  --port=39621 --host=0.0.0.0

And call it with curl command:

curl -X POST \
  http://127.0.0.1:39621/completions \
  -H 'Cache-Control: no-cache' \
  -H 'Postman-Token: d2722db6-77a4-14bb-874f-57300fc70471' \
  -H 'content-type: application/json' \
  -d '{
    "col": 22,
    "line": 2,
    "source": "import pymongo\npymongo.MongoClient().",
    "source_path": "test.py"
}'

RecursionError shows in the server console output:

  File "/root/JediHTTP/vendor/jedi/jedi/evaluate/cache.py", line 40, in wrapper
    rv = function(obj, *args, **kwargs)
  File "/root/JediHTTP/vendor/jedi/jedi/evaluate/context/function.py", line 226, in get_params
    return self.var_args.get_params(self)
  File "/root/JediHTTP/vendor/jedi/jedi/evaluate/arguments.py", line 70, in get_params
    return get_params(execution_context, self)
  File "/root/JediHTTP/vendor/jedi/jedi/evaluate/param.py", line 51, in get_params
    param_dict[param.name.value] = param
  File "/root/JediHTTP/vendor/parso/parso/python/tree.py", line 1104, in name
    if self._tfpdef().type == 'tfpdef':
  File "/root/JediHTTP/vendor/parso/parso/python/tree.py", line 1096, in _tfpdef
    offset = int(self.children[0] in ('*', '**'))
RecursionError: maximum recursion depth exceeded while calling a Python object

My environment:
JediHTTP: latest commit of master branch, commit id is: d283a73
OS: macOS 10.13.2
Python: 3.5.1

I can also reproduce the issue on:

OS: Debian 8
python: 3.6.4

Hope the info above may help, thx!

Tests failed with latest jedi

Hi,

JediHTTP self tests generate the following error message with the latest jedi (0.12.0):

FAIL: jedihttp.tests.handlers_test.test_completion_socket_module

Expected: (a sequence containing a dictionary containing ['name': 'connect'] and a sequence containing a dictionary containing ['name': 'connect_ex'])
    but: a sequence containing a dictionary containing ['name': 'connect'] was <[]>

JediHTTP never calls `b64decode` on the hmac_secret it receives

As part of updating ycmd to be Python 3 compatible, I'm auditing how we handle strings vs. bytes everywhere. I noticed that while JediHTTP seems to need the hmac_secret it receives on startup to be base64 encoded (since it can't be raw bytes because of JSON), it never decodes the secret. This places an artificial limit on what the secret can be, because it must be ASCII data.

The JediHTTP client in ycmd works because it makes the same assumption.

Anyway, not at all urgent, just something you may want to fix. Probably not before ycmd starts supporting Python3 though because I'd have to change stuff yet again. :)

Crash on autocompleting PyQt5.QtWidgets

Here is my python code:

import PyQt5.QtWidgets
PyQt5.QtWidgets.

now when I try to trigger autocomplite nothing happens. So I decided to check jediHttp logs and this is
what I found:

Traceback (most recent call last):
  File "/home/atfoc/.config/nvim/bundle/YouCompleteMe/third_party/ycmd/third_party/JediHTTP/vendor/jedi/jedi/cache.py", line 46, in wrapper
    return getattr(self, name)
AttributeError: 'CompiledName' object has no attribute '_infer'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/atfoc/.config/nvim/bundle/YouCompleteMe/third_party/ycmd/third_party/JediHTTP/vendor/jedi/jedi/evaluate/compiled/__init__.py", line 555, in wrapper
    return cache[key][0]
KeyError: (140100081884040, 140099280898536)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/atfoc/.config/nvim/bundle/YouCompleteMe/third_party/ycmd/third_party/JediHTTP/vendor/jedi/jedi/evaluate/compiled/fake.py", line 156, in memoizer
    result = cache[key]
KeyError: (<function _get_faked at 0x7f6b97b36158>, (None, <PyQt5.QtWidgets.QApplication object at 0x7f6b979d1b88>, None), frozenset())

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/atfoc/.config/nvim/bundle/YouCompleteMe/third_party/ycmd/third_party/JediHTTP/vendor/bottle/bottle.py", line 862, in _handle
    return route.call(**args)
  File "/home/atfoc/.config/nvim/bundle/YouCompleteMe/third_party/ycmd/third_party/JediHTTP/vendor/bottle/bottle.py", line 1732, in wrapper
    rv = callback(*a, **ka)
  File "/home/atfoc/.config/nvim/bundle/YouCompleteMe/third_party/ycmd/third_party/JediHTTP/jedihttp/hmac_plugin.py", line 58, in wrapper
    body = callback( *args, **kwargs )
  File "/home/atfoc/.config/nvim/bundle/YouCompleteMe/third_party/ycmd/third_party/JediHTTP/jedihttp/handlers.py", line 84, in completions
    response = _FormatCompletions( script.completions() )
  File "/home/atfoc/.config/nvim/bundle/YouCompleteMe/third_party/ycmd/third_party/JediHTTP/jedihttp/handlers.py", line 153, in _FormatCompletions
    } for completion in completions ]
  File "/home/atfoc/.config/nvim/bundle/YouCompleteMe/third_party/ycmd/third_party/JediHTTP/jedihttp/handlers.py", line 153, in <listcomp>
    } for completion in completions ]
  File "/home/atfoc/.config/nvim/bundle/YouCompleteMe/third_party/ycmd/third_party/JediHTTP/vendor/jedi/jedi/api/classes.py", line 148, in type
    return self._name.api_type
  File "/home/atfoc/.config/nvim/bundle/YouCompleteMe/third_party/ycmd/third_party/JediHTTP/vendor/jedi/jedi/evaluate/compiled/__init__.py", line 275, in api_type
    return next(iter(self.infer())).api_type
  File "/home/atfoc/.config/nvim/bundle/YouCompleteMe/third_party/ycmd/third_party/JediHTTP/vendor/jedi/jedi/cache.py", line 48, in wrapper
    result = func(self)
  File "/home/atfoc/.config/nvim/bundle/YouCompleteMe/third_party/ycmd/third_party/JediHTTP/vendor/jedi/jedi/evaluate/compiled/__init__.py", line 280, in infer
    return [_create_from_name(self._evaluator, module, self.parent_context, self.string_name)]
  File "/home/atfoc/.config/nvim/bundle/YouCompleteMe/third_party/ycmd/third_party/JediHTTP/vendor/jedi/jedi/evaluate/compiled/__init__.py", line 515, in _create_from_name
    return create(evaluator, obj, parent_context=compiled_object, faked=faked)
  File "/home/atfoc/.config/nvim/bundle/YouCompleteMe/third_party/ycmd/third_party/JediHTTP/vendor/jedi/jedi/evaluate/compiled/__init__.py", line 558, in wrapper
    result = func(evaluator, obj, parent_context, module, faked)
  File "/home/atfoc/.config/nvim/bundle/YouCompleteMe/third_party/ycmd/third_party/JediHTTP/vendor/jedi/jedi/evaluate/compiled/__init__.py", line 582, in create
    faked = fake.get_faked(evaluator, module, obj, parent_context=parent_context)
  File "/home/atfoc/.config/nvim/bundle/YouCompleteMe/third_party/ycmd/third_party/JediHTTP/vendor/jedi/jedi/evaluate/compiled/fake.py", line 199, in get_faked
    faked, fake_module = _get_faked(module and module.obj, obj, name)
  File "/home/atfoc/.config/nvim/bundle/YouCompleteMe/third_party/ycmd/third_party/JediHTTP/vendor/jedi/jedi/evaluate/compiled/fake.py", line 160, in memoizer
    result = obj(*args, **kwargs)
  File "/home/atfoc/.config/nvim/bundle/YouCompleteMe/third_party/ycmd/third_party/JediHTTP/vendor/jedi/jedi/evaluate/compiled/fake.py", line 171, in _get_faked
    result, fake_module = _faked(module, obj, name)
  File "/home/atfoc/.config/nvim/bundle/YouCompleteMe/third_party/ycmd/third_party/JediHTTP/vendor/jedi/jedi/evaluate/compiled/fake.py", line 110, in _faked
    module = get_module(obj)
  File "/home/atfoc/.config/nvim/bundle/YouCompleteMe/third_party/ycmd/third_party/JediHTTP/vendor/jedi/jedi/evaluate/compiled/fake.py", line 86, in get_module
    obj = obj.__objclass__
RuntimeError: wrapped C/C++ object of type QApplication has been deleted
Traceback (most recent call last):
  File "/home/atfoc/.config/nvim/bundle/YouCompleteMe/third_party/ycmd/third_party/JediHTTP/vendor/jedi/jedi/cache.py", line 46, in wrapper
    return getattr(self, name)
AttributeError: 'CompiledName' object has no attribute '_infer'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/atfoc/.config/nvim/bundle/YouCompleteMe/third_party/ycmd/third_party/JediHTTP/vendor/jedi/jedi/evaluate/compiled/__init__.py", line 555, in wrapper
    return cache[key][0]
KeyError: (140100081884040, 140099280655584)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/atfoc/.config/nvim/bundle/YouCompleteMe/third_party/ycmd/third_party/JediHTTP/vendor/jedi/jedi/evaluate/compiled/fake.py", line 156, in memoizer
    result = cache[key]
KeyError: (<function _get_faked at 0x7f6b97b36158>, (None, <PyQt5.QtWidgets.QApplication object at 0x7f6b979d1b88>, None), frozenset())

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/atfoc/.config/nvim/bundle/YouCompleteMe/third_party/ycmd/third_party/JediHTTP/vendor/bottle/bottle.py", line 862, in _handle
    return route.call(**args)
  File "/home/atfoc/.config/nvim/bundle/YouCompleteMe/third_party/ycmd/third_party/JediHTTP/vendor/bottle/bottle.py", line 1732, in wrapper
    rv = callback(*a, **ka)
  File "/home/atfoc/.config/nvim/bundle/YouCompleteMe/third_party/ycmd/third_party/JediHTTP/jedihttp/hmac_plugin.py", line 58, in wrapper
    body = callback( *args, **kwargs )
  File "/home/atfoc/.config/nvim/bundle/YouCompleteMe/third_party/ycmd/third_party/JediHTTP/jedihttp/handlers.py", line 84, in completions
    response = _FormatCompletions( script.completions() )
  File "/home/atfoc/.config/nvim/bundle/YouCompleteMe/third_party/ycmd/third_party/JediHTTP/jedihttp/handlers.py", line 153, in _FormatCompletions
    } for completion in completions ]
  File "/home/atfoc/.config/nvim/bundle/YouCompleteMe/third_party/ycmd/third_party/JediHTTP/jedihttp/handlers.py", line 153, in <listcomp>
    } for completion in completions ]
  File "/home/atfoc/.config/nvim/bundle/YouCompleteMe/third_party/ycmd/third_party/JediHTTP/vendor/jedi/jedi/api/classes.py", line 148, in type
    return self._name.api_type
  File "/home/atfoc/.config/nvim/bundle/YouCompleteMe/third_party/ycmd/third_party/JediHTTP/vendor/jedi/jedi/evaluate/compiled/__init__.py", line 275, in api_type
    return next(iter(self.infer())).api_type
  File "/home/atfoc/.config/nvim/bundle/YouCompleteMe/third_party/ycmd/third_party/JediHTTP/vendor/jedi/jedi/cache.py", line 48, in wrapper
    result = func(self)
  File "/home/atfoc/.config/nvim/bundle/YouCompleteMe/third_party/ycmd/third_party/JediHTTP/vendor/jedi/jedi/evaluate/compiled/__init__.py", line 280, in infer
    return [_create_from_name(self._evaluator, module, self.parent_context, self.string_name)]
  File "/home/atfoc/.config/nvim/bundle/YouCompleteMe/third_party/ycmd/third_party/JediHTTP/vendor/jedi/jedi/evaluate/compiled/__init__.py", line 515, in _create_from_name
    return create(evaluator, obj, parent_context=compiled_object, faked=faked)
  File "/home/atfoc/.config/nvim/bundle/YouCompleteMe/third_party/ycmd/third_party/JediHTTP/vendor/jedi/jedi/evaluate/compiled/__init__.py", line 558, in wrapper
    result = func(evaluator, obj, parent_context, module, faked)
  File "/home/atfoc/.config/nvim/bundle/YouCompleteMe/third_party/ycmd/third_party/JediHTTP/vendor/jedi/jedi/evaluate/compiled/__init__.py", line 582, in create
    faked = fake.get_faked(evaluator, module, obj, parent_context=parent_context)
  File "/home/atfoc/.config/nvim/bundle/YouCompleteMe/third_party/ycmd/third_party/JediHTTP/vendor/jedi/jedi/evaluate/compiled/fake.py", line 199, in get_faked
    faked, fake_module = _get_faked(module and module.obj, obj, name)
  File "/home/atfoc/.config/nvim/bundle/YouCompleteMe/third_party/ycmd/third_party/JediHTTP/vendor/jedi/jedi/evaluate/compiled/fake.py", line 160, in memoizer
    result = obj(*args, **kwargs)
  File "/home/atfoc/.config/nvim/bundle/YouCompleteMe/third_party/ycmd/third_party/JediHTTP/vendor/jedi/jedi/evaluate/compiled/fake.py", line 171, in _get_faked
    result, fake_module = _faked(module, obj, name)
  File "/home/atfoc/.config/nvim/bundle/YouCompleteMe/third_party/ycmd/third_party/JediHTTP/vendor/jedi/jedi/evaluate/compiled/fake.py", line 110, in _faked
    module = get_module(obj)
  File "/home/atfoc/.config/nvim/bundle/YouCompleteMe/third_party/ycmd/third_party/JediHTTP/vendor/jedi/jedi/evaluate/compiled/fake.py", line 86, in get_module
    obj = obj.__objclass__
RuntimeError: wrapped C/C++ object of type QApplication has been deleted

So I was wondering is this something easy to fix
Thanks in an advance

function param type hint support?

Seems type hint support is not complete(python 3.6):
not with full functionality that jedi can provide, while davidhalter/jedi-vim could do both?
Is there anything I am missing?

#notworking, but working under jedi.vim
def notworking(n: str) :
    n.*

#working under ycm and jedi.vim
def working():
    v = whatever() # type: str
    n.*

gotoassignment tests are giving error

Hi. I am maintainer of vim-youcompleteme/ycmd packages for Debian and Ubuntu. I am trying to update packages to latest version but some tests are giving error for some reason with a message: goto_assignments() takes exactly 1 argument (2 given)

Do you have any idea what is causing this error?

I am using JediHTTP 33082a3. Full output:

#1 jedihttp.tests.handlers_test.test_healthy ... ok
#2 jedihttp.tests.handlers_test.test_ready ... ok
#3 jedihttp.tests.handlers_test.test_completion ... ok
#4 jedihttp.tests.handlers_test.test_py3 ... SKIP: Python 3.x only test
#5 jedihttp.tests.handlers_test.test_good_gotodefinition ... ok
#6 jedihttp.tests.handlers_test.test_bad_gotodefinitions_blank_line ... ok
#7 jedihttp.tests.handlers_test.test_bad_gotodefinitions_not_on_valid_position ... ok
#8 jedihttp.tests.handlers_test.test_good_gotoassignment ... ERROR
#9 jedihttp.tests.handlers_test.test_good_gotoassignment_do_not_follow_imports ... ERROR
#10 jedihttp.tests.handlers_test.test_good_gotoassignment_follow_imports ... ERROR
#11 jedihttp.tests.handlers_test.test_usages ... ok
#12 jedihttp.tests.end_to_end_test.test_client_bad_request_with_parameters ... ok
#13 jedihttp.tests.end_to_end_test.test_client_python3_specific_syntax_completion ... ok
#14 jedihttp.tests.end_to_end_test.test_client_request_with_parameters ... ok
#15 jedihttp.tests.end_to_end_test.test_client_request_without_parameters ... ok

======================================================================
ERROR: jedihttp.tests.handlers_test.test_good_gotoassignment
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "$YCMD_DIR/ycmd/third_party/JediHTTP/jedihttp/tests/handlers_test.py", line 144, in test_good_gotoassignment
    request_data ).json[ 'definitions' ]
  File "/usr/lib/python2.7/dist-packages/webtest/utils.py", line 36, in wrapper
    return self._gen_request(method, url, **kw)
  File "/usr/lib/python2.7/dist-packages/webtest/app.py", line 740, in _gen_request
    expect_errors=expect_errors)
  File "/usr/lib/python2.7/dist-packages/webtest/app.py", line 636, in do_request
    self._check_status(status, res)
  File "/usr/lib/python2.7/dist-packages/webtest/app.py", line 668, in _check_status
    res)
AppError: Bad response: 500 Internal Server Error (not 200 OK or 3xx redirect for http://localhost/gotoassignment)
'{"exception": {"TYPE": "TypeError"}, "traceback": "Traceback (most recent call last):\\n  File \\"/usr/lib/python2.7/dist-packages/bottle.py\\", line 862, in _handle\\n    return route.call(**args)\\n  File \\"/usr/lib/python2.7/dist-packages/bottle.py\\", line 1740, in wrapper\\n    rv = callback(*a, **ka)\\n  File \\"$YCMD_DIR/ycmd/third_party/JediHTTP/jedihttp/handlers.py\\", line 91, in gotoassignments\\n    response = _FormatDefinitions( script.goto_assignments( follow_imports ) )\\nTypeError: goto_assignments() takes exactly 1 argument (2 given)\\n", "message": "goto_assignments() takes exactly 1 argument (2 given)"}'
-------------------- >> begin captured logging << --------------------
jedihttp.handlers: DEBUG: received /gotoassignment request
--------------------- >> end captured logging << ---------------------

======================================================================
ERROR: jedihttp.tests.handlers_test.test_good_gotoassignment_do_not_follow_imports
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "$YCMD_DIR/ycmd/third_party/JediHTTP/jedihttp/tests/handlers_test.py", line 181, in test_good_gotoassignment_do_not_follow_imports
    request_data ).json[ 'definitions' ]
  File "/usr/lib/python2.7/dist-packages/webtest/utils.py", line 36, in wrapper
    return self._gen_request(method, url, **kw)
  File "/usr/lib/python2.7/dist-packages/webtest/app.py", line 740, in _gen_request
    expect_errors=expect_errors)
  File "/usr/lib/python2.7/dist-packages/webtest/app.py", line 636, in do_request
    self._check_status(status, res)
  File "/usr/lib/python2.7/dist-packages/webtest/app.py", line 668, in _check_status
    res)
AppError: Bad response: 500 Internal Server Error (not 200 OK or 3xx redirect for http://localhost/gotoassignment)
'{"exception": {"TYPE": "TypeError"}, "traceback": "Traceback (most recent call last):\\n  File \\"/usr/lib/python2.7/dist-packages/bottle.py\\", line 862, in _handle\\n    return route.call(**args)\\n  File \\"/usr/lib/python2.7/dist-packages/bottle.py\\", line 1740, in wrapper\\n    rv = callback(*a, **ka)\\n  File \\"$YCMD_DIR/ycmd/third_party/JediHTTP/jedihttp/handlers.py\\", line 91, in gotoassignments\\n    response = _FormatDefinitions( script.goto_assignments( follow_imports ) )\\nTypeError: goto_assignments() takes exactly 1 argument (2 given)\\n", "message": "goto_assignments() takes exactly 1 argument (2 given)"}'
-------------------- >> begin captured logging << --------------------
jedihttp.handlers: DEBUG: received /gotoassignment request
--------------------- >> end captured logging << ---------------------

======================================================================
ERROR: jedihttp.tests.handlers_test.test_good_gotoassignment_follow_imports
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "$YCMD_DIR/ycmd/third_party/JediHTTP/jedihttp/tests/handlers_test.py", line 208, in test_good_gotoassignment_follow_imports
    request_data ).json[ 'definitions' ]
  File "/usr/lib/python2.7/dist-packages/webtest/utils.py", line 36, in wrapper
    return self._gen_request(method, url, **kw)
  File "/usr/lib/python2.7/dist-packages/webtest/app.py", line 740, in _gen_request
    expect_errors=expect_errors)
  File "/usr/lib/python2.7/dist-packages/webtest/app.py", line 636, in do_request
    self._check_status(status, res)
  File "/usr/lib/python2.7/dist-packages/webtest/app.py", line 668, in _check_status
    res)
AppError: Bad response: 500 Internal Server Error (not 200 OK or 3xx redirect for http://localhost/gotoassignment)
'{"exception": {"TYPE": "TypeError"}, "traceback": "Traceback (most recent call last):\\n  File \\"/usr/lib/python2.7/dist-packages/bottle.py\\", line 862, in _handle\\n    return route.call(**args)\\n  File \\"/usr/lib/python2.7/dist-packages/bottle.py\\", line 1740, in wrapper\\n    rv = callback(*a, **ka)\\n  File \\"$YCMD_DIR/ycmd/third_party/JediHTTP/jedihttp/handlers.py\\", line 91, in gotoassignments\\n    response = _FormatDefinitions( script.goto_assignments( follow_imports ) )\\nTypeError: goto_assignments() takes exactly 1 argument (2 given)\\n", "message": "goto_assignments() takes exactly 1 argument (2 given)"}'
-------------------- >> begin captured logging << --------------------
jedihttp.handlers: DEBUG: received /gotoassignment request
--------------------- >> end captured logging << ---------------------

----------------------------------------------------------------------
Ran 15 tests in 0.596s

FAILED (SKIP=1, errors=3)

Provide setup script

I'm not too familiar with Python development, but a setup.py script to install a Python program on the system seems commonplace.

As I'd like to package this or a Linux distro, such a script would be very convenient.

Update Jedi?

The vendored submodule version is over a year old—is there a reason it's stuck at old version, other than maintainer time to make sure JediHTTP works with a current version?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.