Skip to content

failed to find highlights of sys module #362

@pixystone

Description

@pixystone
2018-05-29 17:27:57,151 UTC - ERROR - pyls.jsonrpc.endpoint - Failed to handle request 16
Traceback (most recent call last):
  File "/Users/pixy/work/idea-projects/python-language-server/data/virtualenv/lib/python2.7/site-packages/pyls/jsonrpc/endpoint.py", line 113
, in consume
    self._handle_request(message['id'], message['method'], message.get('params'))
  File "/Users/pixy/work/idea-projects/python-language-server/data/virtualenv/lib/python2.7/site-packages/pyls/jsonrpc/endpoint.py", line 182
, in _handle_request
    handler_result = handler(params)
  File "/Users/pixy/work/idea-projects/python-language-server/data/virtualenv/lib/python2.7/site-packages/pyls/jsonrpc/dispatchers.py", line 
23, in handler
    return method(**(params or {}))
  File "/Users/pixy/work/idea-projects/python-language-server/data/virtualenv/lib/python2.7/site-packages/pyls/python_ls.py", line 246, in m_
text_document__document_highlight
    return self.highlight(textDocument['uri'], position)
  File "/Users/pixy/work/idea-projects/python-language-server/data/virtualenv/lib/python2.7/site-packages/pyls/python_ls.py", line 190, in hi
ghlight
    return flatten(self._hook('pyls_document_highlight', doc_uri, position=position)) or None
  File "/Users/pixy/work/idea-projects/python-language-server/data/virtualenv/lib/python2.7/site-packages/pyls/python_ls.py", line 113, in _h
ook
    return hook_handlers(config=self.config, workspace=self.workspace, document=doc, **kwargs)
  File "/usr/local/Cellar/python/2.7.14/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pluggy/__init__.py", line 617, i
n __call__
    return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs)
  File "/usr/local/Cellar/python/2.7.14/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pluggy/__init__.py", line 222, i
n _hookexec
    return self._inner_hookexec(hook, methods, kwargs)
  File "/usr/local/Cellar/python/2.7.14/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pluggy/__init__.py", line 182, i
n __call__
    return outcome.get_result()
  File "/usr/local/Cellar/python/2.7.14/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pluggy/callers.py", line 77, in 
get_result
    _reraise(*ex)  # noqa
  File "/usr/local/Cellar/python/2.7.14/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pluggy/callers.py", line 48, in 
from_call
    result = func()
  File "/usr/local/Cellar/python/2.7.14/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pluggy/__init__.py", line 180, i
n <lambda>
    outcome = _Result.from_call(lambda: self.oldcall(hook, hook_impls, kwargs))
  File "/usr/local/Cellar/python/2.7.14/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pluggy/__init__.py", line 216, i
n <lambda>
    firstresult=hook.spec_opts.get('firstresult'),
  File "/usr/local/Cellar/python/2.7.14/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pluggy/callers.py", line 201, in _multicall
    return outcome.get_result()
  File "/usr/local/Cellar/python/2.7.14/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pluggy/callers.py", line 77, in get_result
    _reraise(*ex)  # noqa
  File "/usr/local/Cellar/python/2.7.14/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pluggy/callers.py", line 180, in _multicall
    res = hook_impl.function(*args)
  File "/Users/pixy/work/idea-projects/python-language-server/data/virtualenv/lib/python2.7/site-packages/pyls/plugins/highlight.py", line 31, in pyls_document_highlight
    } for d in usages if local_to_document(d)]
TypeError: unsupported operand type(s) for -: 'NoneType' and 'int'

d.line is None in one of definitions

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions