Closed nullscc closed 6 years ago
Could you give the full code of your example and the position of the cursor where you are running the GoTo
command (GoToDefinitionElseDeclaration
is deprecated in favor of GoTo
)? This way we can try to reproduce your issue with Python 3. Also, could you paste the contents of the :YcmDebugInfo
command and attach the ycmd and JediHTTP logfiles (use the :YcmToggleLogs
command to open the logfiles in Vim)?
Just noticed that there's an L missing in your config: if 'VIRTUA_ENV' in os.environ: Not sure if it's related, but it might break things :)
@aquatix thanks for your reminding. for it's just work as my expect,i don't take notice of it. but i change it like this
function! PyImports()
Py << EOF
import os.path
import sys
import vim
if 'VIRTUAL_ENV' in os.environ:
project_base_dir = os.environ['VIRTUAL_ENV']
sys.path.insert(0, project_base_dir)
activate_this = os.path.join(project_base_dir,'bin/activate_this.py')
try:
execfile(activate_this, dict(__file__=activate_this))
except:
exec(open(activate_this, encoding = 'utf-8').read(), dict(__file__=activate_this))
EOF
endfunction
it remains not ok for await keywords of GoTo
command. so i guess the problem is not the VIRTUAL_ENV
.
thanks for your reply anyway.
@micbou ,thanks for your reply, after i put the following code into .vimrc
let g:ycm_log_level = 'debug'
the output of :YcmDebugInfo
:
Printing YouCompleteMe debug information...
-- Client logfile: /var/folders/zw/ybz55yy53tqcy9ql0l0sw84w0000gn/T/ycm_cd310wz3.log
-- Server Python interpreter: /Users/null/api-service.shein.com/env/bin/python3
-- Server Python version: 3.6.2
-- Server has Clang support compiled in: False
-- Clang version: None
-- Extra configuration file found and loaded
-- Extra configuration path: /Users/null/.vim/bundle/PCompleteMe/third_party/ycmd/examples/.ycm_extra_conf.py
-- Python completer debug information:
-- JediHTTP running at: http://127.0.0.1:50723
-- JediHTTP process ID: 1149
-- JediHTTP executable: /Users/null/.vim/bundle/PCompleteMe/third_party/ycmd/third_party/JediHTTP/jedihttp.py
-- JediHTTP logfiles:
-- /var/folders/zw/ybz55yy53tqcy9ql0l0sw84w0000gn/T/jedihttp_50723_stdout_1ux9ojhw.log
-- /var/folders/zw/ybz55yy53tqcy9ql0l0sw84w0000gn/T/jedihttp_50723_stderr_4wxvs73_.log
-- Python interpreter: /Library/Frameworks/Python.framework/Versions/3.6/bin/python3
-- Server running at: http://127.0.0.1:50717
-- Server process ID: 1148
-- Server logfiles:
-- /var/folders/zw/ybz55yy53tqcy9ql0l0sw84w0000gn/T/ycmd_50717_stdout_myirg75o.log
-- /var/folders/zw/ybz55yy53tqcy9ql0l0sw84w0000gn/T/ycmd_50717_stderr_jwx5i3b9.log
the output of /var/folders/zw/ybz55yy53tqcy9ql0l0sw84w0000gn/T/ycm_cd310wz3.log
2017-12-21 11:14:31,661 - ERROR - Unable to connect to server
Traceback (most recent call last):
File "/Users/null/.vim/bundle/PCompleteMe/third_party/ycmd/third_party/requests/requests/packages/urllib3/connection.py", line 137, in _new_conn
(self.host, self.port), self.timeout, **extra_kw)
File "/Users/null/.vim/bundle/PCompleteMe/third_party/ycmd/third_party/requests/requests/packages/urllib3/util/connection.py", line 91, in create_connection
raise err
File "/Users/null/.vim/bundle/PCompleteMe/third_party/ycmd/third_party/requests/requests/packages/urllib3/util/connection.py", line 81, in create_connection
sock.connect(sa)
socket.timeout: timed out
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/null/.vim/bundle/PCompleteMe/third_party/ycmd/third_party/requests/requests/packages/urllib3/connectionpool.py", line 559, in urlopen
body=body, headers=headers)
File "/Users/null/.vim/bundle/PCompleteMe/third_party/ycmd/third_party/requests/requests/packages/urllib3/connectionpool.py", line 353, in _make_request
conn.request(method, url, **httplib_request_kw)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/http/client.py", line 1239, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/http/client.py", line 1285, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/http/client.py", line 1234, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/http/client.py", line 1026, in _send_output
self.send(msg)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/http/client.py", line 964, in send
self.connect()
File "/Users/null/.vim/bundle/PCompleteMe/third_party/ycmd/third_party/requests/requests/packages/urllib3/connection.py", line 162, in connect
conn = self._new_conn()
File "/Users/null/.vim/bundle/PCompleteMe/third_party/ycmd/third_party/requests/requests/packages/urllib3/connection.py", line 142, in _new_conn
(self.host, self.timeout))
requests.packages.urllib3.exceptions.ConnectTimeoutError: (<requests.packages.urllib3.connection.HTTPConnection object at 0x10aa124a8>, 'Connection to 127.0.0.1 timed out. (connect timeout=0.01)')
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/null/.vim/bundle/PCompleteMe/third_party/ycmd/third_party/requests/requests/adapters.py", line 376, in send
timeout=timeout
File "/Users/null/.vim/bundle/PCompleteMe/third_party/ycmd/third_party/requests/requests/packages/urllib3/connectionpool.py", line 609, in urlopen
_stacktrace=sys.exc_info()[2])
File "/Users/null/.vim/bundle/PCompleteMe/third_party/ycmd/third_party/requests/requests/packages/urllib3/util/retry.py", line 273, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
requests.packages.urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='127.0.0.1', port=50717): Max retries exceeded with url: /ready (Caused by ConnectTimeoutError(<requests.packages.urllib3.connection.HTTPConnection object at 0x10aa124a8>, 'Connection to 127.0.0.1 timed out. (connect timeout=0.01)'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/null/.vim/bundle/PCompleteMe/autoload/../python/ycm/client/base_request.py", line 214, in HandleServerException
yield
File "/Users/null/.vim/bundle/PCompleteMe/autoload/../python/ycm/youcompleteme.py", line 237, in CheckIfServerIsReady
'ready' )
File "/Users/null/.vim/bundle/PCompleteMe/autoload/../python/ycm/client/base_request.py", line 68, in GetDataFromHandler
timeout ) )
File "/Users/null/.vim/bundle/PCompleteMe/autoload/../python/ycm/client/base_request.py", line 180, in JsonFromFuture
response = future.result()
File "/Users/null/.vim/bundle/PCompleteMe/third_party/pythonfutures/concurrent/futures/_base.py", line 404, in result
return self.__get_result()
File "/Users/null/.vim/bundle/PCompleteMe/third_party/pythonfutures/concurrent/futures/_base.py", line 356, in __get_result
raise self._exception
File "/Users/null/.vim/bundle/PCompleteMe/autoload/../python/ycm/unsafe_thread_pool_executor.py", line 43, in run
result = self.fn(*self.args, **self.kwargs)
File "/Users/null/.vim/bundle/PCompleteMe/third_party/ycmd/third_party/requests/requests/sessions.py", line 468, in request
resp = self.send(prep, **send_kwargs)
File "/Users/null/.vim/bundle/PCompleteMe/third_party/ycmd/third_party/requests/requests/sessions.py", line 576, in send
r = adapter.send(request, **kwargs)
File "/Users/null/.vim/bundle/PCompleteMe/third_party/ycmd/third_party/requests/requests/adapters.py", line 432, in send
raise ConnectTimeout(e, request=request)
requests.exceptions.ConnectTimeout: HTTPConnectionPool(host='127.0.0.1', port=50717): Max retries exceeded with url: /ready (Caused by ConnectTimeoutError(<requests.packages.urllib3.connection.HTTPConnection object at 0x10aa124a8>, 'Connection to 127.0.0.1 timed out. (connect timeout=0.01)'))
2017-12-21 11:14:31,781 - ERROR - Unable to connect to server
Traceback (most recent call last):
File "/Users/null/.vim/bundle/PCompleteMe/third_party/ycmd/third_party/requests/requests/packages/urllib3/connection.py", line 137, in _new_conn
(self.host, self.port), self.timeout, **extra_kw)
File "/Users/null/.vim/bundle/PCompleteMe/third_party/ycmd/third_party/requests/requests/packages/urllib3/util/connection.py", line 91, in create_connection
raise err
File "/Users/null/.vim/bundle/PCompleteMe/third_party/ycmd/third_party/requests/requests/packages/urllib3/util/connection.py", line 81, in create_connection
sock.connect(sa)
socket.timeout: timed out
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/null/.vim/bundle/PCompleteMe/third_party/ycmd/third_party/requests/requests/packages/urllib3/connectionpool.py", line 559, in urlopen
body=body, headers=headers)
File "/Users/null/.vim/bundle/PCompleteMe/third_party/ycmd/third_party/requests/requests/packages/urllib3/connectionpool.py", line 353, in _make_request
conn.request(method, url, **httplib_request_kw)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/http/client.py", line 1239, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/http/client.py", line 1285, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/http/client.py", line 1234, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/http/client.py", line 1026, in _send_output
self.send(msg)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/http/client.py", line 964, in send
self.connect()
File "/Users/null/.vim/bundle/PCompleteMe/third_party/ycmd/third_party/requests/requests/packages/urllib3/connection.py", line 162, in connect
conn = self._new_conn()
File "/Users/null/.vim/bundle/PCompleteMe/third_party/ycmd/third_party/requests/requests/packages/urllib3/connection.py", line 142, in _new_conn
(self.host, self.timeout))
requests.packages.urllib3.exceptions.ConnectTimeoutError: (<requests.packages.urllib3.connection.HTTPConnection object at 0x10ab25780>, 'Connection to 127.0.0.1 timed out. (connect timeout=0.01)')
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/null/.vim/bundle/PCompleteMe/third_party/ycmd/third_party/requests/requests/adapters.py", line 376, in send
timeout=timeout
File "/Users/null/.vim/bundle/PCompleteMe/third_party/ycmd/third_party/requests/requests/packages/urllib3/connectionpool.py", line 609, in urlopen
_stacktrace=sys.exc_info()[2])
File "/Users/null/.vim/bundle/PCompleteMe/third_party/ycmd/third_party/requests/requests/packages/urllib3/util/retry.py", line 273, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
requests.packages.urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='127.0.0.1', port=50717): Max retries exceeded with url: /ready (Caused by ConnectTimeoutError(<requests.packages.urllib3.connection.HTTPConnection object at 0x10ab25780>, 'Connection to 127.0.0.1 timed out. (connect timeout=0.01)'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/null/.vim/bundle/PCompleteMe/autoload/../python/ycm/client/base_request.py", line 214, in HandleServerException
yield
File "/Users/null/.vim/bundle/PCompleteMe/autoload/../python/ycm/youcompleteme.py", line 237, in CheckIfServerIsReady
'ready' )
File "/Users/null/.vim/bundle/PCompleteMe/autoload/../python/ycm/client/base_request.py", line 68, in GetDataFromHandler
timeout ) )
File "/Users/null/.vim/bundle/PCompleteMe/autoload/../python/ycm/client/base_request.py", line 180, in JsonFromFuture
response = future.result()
File "/Users/null/.vim/bundle/PCompleteMe/third_party/pythonfutures/concurrent/futures/_base.py", line 404, in result
return self.__get_result()
File "/Users/null/.vim/bundle/PCompleteMe/third_party/pythonfutures/concurrent/futures/_base.py", line 356, in __get_result
raise self._exception
File "/Users/null/.vim/bundle/PCompleteMe/autoload/../python/ycm/unsafe_thread_pool_executor.py", line 43, in run
result = self.fn(*self.args, **self.kwargs)
File "/Users/null/.vim/bundle/PCompleteMe/third_party/ycmd/third_party/requests/requests/sessions.py", line 468, in request
resp = self.send(prep, **send_kwargs)
File "/Users/null/.vim/bundle/PCompleteMe/third_party/ycmd/third_party/requests/requests/sessions.py", line 576, in send
r = adapter.send(request, **kwargs)
File "/Users/null/.vim/bundle/PCompleteMe/third_party/ycmd/third_party/requests/requests/adapters.py", line 432, in send
raise ConnectTimeout(e, request=request)
requests.exceptions.ConnectTimeout: HTTPConnectionPool(host='127.0.0.1', port=50717): Max retries exceeded with url: /ready (Caused by ConnectTimeoutError(<requests.packages.urllib3.connection.HTTPConnection object at 0x10ab25780>, 'Connection to 127.0.0.1 timed out. (connect timeout=0.01)'))
2017-12-21 11:14:31,896 - ERROR - Unable to connect to server
Traceback (most recent call last):
File "/Users/null/.vim/bundle/PCompleteMe/third_party/ycmd/third_party/requests/requests/packages/urllib3/connection.py", line 137, in _new_conn
(self.host, self.port), self.timeout, **extra_kw)
File "/Users/null/.vim/bundle/PCompleteMe/third_party/ycmd/third_party/requests/requests/packages/urllib3/util/connection.py", line 91, in create_connection
raise err
File "/Users/null/.vim/bundle/PCompleteMe/third_party/ycmd/third_party/requests/requests/packages/urllib3/util/connection.py", line 81, in create_connection
sock.connect(sa)
socket.timeout: timed out
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/null/.vim/bundle/PCompleteMe/third_party/ycmd/third_party/requests/requests/packages/urllib3/connectionpool.py", line 559, in urlopen
body=body, headers=headers)
File "/Users/null/.vim/bundle/PCompleteMe/third_party/ycmd/third_party/requests/requests/packages/urllib3/connectionpool.py", line 353, in _make_request
conn.request(method, url, **httplib_request_kw)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/http/client.py", line 1239, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/http/client.py", line 1285, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/http/client.py", line 1234, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/http/client.py", line 1026, in _send_output
self.send(msg)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/http/client.py", line 964, in send
self.connect()
File "/Users/null/.vim/bundle/PCompleteMe/third_party/ycmd/third_party/requests/requests/packages/urllib3/connection.py", line 162, in connect
conn = self._new_conn()
File "/Users/null/.vim/bundle/PCompleteMe/third_party/ycmd/third_party/requests/requests/packages/urllib3/connection.py", line 142, in _new_conn
(self.host, self.timeout))
requests.packages.urllib3.exceptions.ConnectTimeoutError: (<requests.packages.urllib3.connection.HTTPConnection object at 0x10ab25c50>, 'Connection to 127.0.0.1 timed out. (connect timeout=0.01)')
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/null/.vim/bundle/PCompleteMe/third_party/ycmd/third_party/requests/requests/adapters.py", line 376, in send
timeout=timeout
File "/Users/null/.vim/bundle/PCompleteMe/third_party/ycmd/third_party/requests/requests/packages/urllib3/connectionpool.py", line 609, in urlopen
_stacktrace=sys.exc_info()[2])
File "/Users/null/.vim/bundle/PCompleteMe/third_party/ycmd/third_party/requests/requests/packages/urllib3/util/retry.py", line 273, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
requests.packages.urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='127.0.0.1', port=50717): Max retries exceeded with url: /ready (Caused by ConnectTimeoutError(<requests.packages.urllib3.connection.HTTPConnection object at 0x10ab25c50>, 'Connection to 127.0.0.1 timed out. (connect timeout=0.01)'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/null/.vim/bundle/PCompleteMe/autoload/../python/ycm/client/base_request.py", line 214, in HandleServerException
yield
File "/Users/null/.vim/bundle/PCompleteMe/autoload/../python/ycm/youcompleteme.py", line 237, in CheckIfServerIsReady
'ready' )
File "/Users/null/.vim/bundle/PCompleteMe/autoload/../python/ycm/client/base_request.py", line 68, in GetDataFromHandler
timeout ) )
File "/Users/null/.vim/bundle/PCompleteMe/autoload/../python/ycm/client/base_request.py", line 180, in JsonFromFuture
response = future.result()
File "/Users/null/.vim/bundle/PCompleteMe/third_party/pythonfutures/concurrent/futures/_base.py", line 404, in result
return self.__get_result()
File "/Users/null/.vim/bundle/PCompleteMe/third_party/pythonfutures/concurrent/futures/_base.py", line 356, in __get_result
raise self._exception
File "/Users/null/.vim/bundle/PCompleteMe/autoload/../python/ycm/unsafe_thread_pool_executor.py", line 43, in run
result = self.fn(*self.args, **self.kwargs)
File "/Users/null/.vim/bundle/PCompleteMe/third_party/ycmd/third_party/requests/requests/sessions.py", line 468, in request
resp = self.send(prep, **send_kwargs)
File "/Users/null/.vim/bundle/PCompleteMe/third_party/ycmd/third_party/requests/requests/sessions.py", line 576, in send
r = adapter.send(request, **kwargs)
File "/Users/null/.vim/bundle/PCompleteMe/third_party/ycmd/third_party/requests/requests/adapters.py", line 432, in send
raise ConnectTimeout(e, request=request)
requests.exceptions.ConnectTimeout: HTTPConnectionPool(host='127.0.0.1', port=50717): Max retries exceeded with url: /ready (Caused by ConnectTimeoutError(<requests.packages.urllib3.connection.HTTPConnection object at 0x10ab25c50>, 'Connection to 127.0.0.1 timed out. (connect timeout=0.01)'))
and after i use :YcmCompleter GoTo
, corresponding code(the position of cursor under the fetch
of the method of async def get
):
from tornado.httpclient import AsyncHTTPClient
from tornado.httpclient import HTTPRequest
class RequestService:
def __init__(self, rasie_unzero=True):
pass
async def get(self, domain, request_path, **kwargs):
return await self.fetch(request)
async def fetch(self, request):
begin_time = time.time()
try:
request_res = await self.async_http_client.fetch(request)
code, info, msg = self.query_result(json.loads(request_res.body))
if code != config.CODE_API_SUCCESS and code != config.CODE_API_SUCCESS:
if self.rasie_unzero:
raise RequestApiJsonUnZeroError(code, msg, info)
except Exception as e:
print(request.url)
raise e
print(request.url + ' time: {}'.format(time.time() - begin_time))
if self.rasie_unzero:
return code, info
else:
return code, info, msg
the output of /var/folders/zw/ybz55yy53tqcy9ql0l0sw84w0000gn/T/jedihttp_50274_stderr_z4tks6o_.log
2017-12-21 11:24:31,911 - DEBUG - received /ready request
2017-12-21 11:24:51,858 - DEBUG - received /gotodefinition request
Traceback (most recent call last):
File "/Users/null/.vim/bundle/PCompleteMe/third_party/ycmd/third_party/JediHTTP/vendor/bottle/bottle.py", line 862, in _handle
return route.call(**args)
File "/Users/null/.vim/bundle/PCompleteMe/third_party/ycmd/third_party/JediHTTP/vendor/bottle/bottle.py", line 1732, in wrapper
rv = callback(*a, **ka)
File "/Users/null/.vim/bundle/PCompleteMe/third_party/ycmd/third_party/JediHTTP/jedihttp/hmac_plugin.py", line 55, in wrapper
body = callback(*args, **kwargs)
File "/Users/null/.vim/bundle/PCompleteMe/third_party/ycmd/third_party/JediHTTP/jedihttp/handlers.py", line 77, in gotodefinition
response = _format_definitions(script.goto_definitions())
File "/Users/null/.vim/bundle/PCompleteMe/third_party/ycmd/third_party/JediHTTP/vendor/jedi/jedi/api/__init__.py", line 181, in goto_definitions
definitions = helpers.evaluate_goto_definition(self._evaluator, context, leaf)
File "/Users/null/.vim/bundle/PCompleteMe/third_party/ycmd/third_party/JediHTTP/vendor/jedi/jedi/api/helpers.py", line 201, in evaluate_goto_definition
return evaluator.goto_definitions(context, leaf)
File "/Users/null/.vim/bundle/PCompleteMe/third_party/ycmd/third_party/JediHTTP/vendor/jedi/jedi/evaluate/__init__.py", line 491, in goto_definitions
return helpers.evaluate_call_of_leaf(context, name)
File "/Users/null/.vim/bundle/PCompleteMe/third_party/ycmd/third_party/JediHTTP/vendor/jedi/jedi/evaluate/helpers.py", line 91, in evaluate_call_of_leaf
values = context.eval_trailer(values, trailer)
File "/Users/null/.vim/bundle/PCompleteMe/third_party/ycmd/third_party/JediHTTP/vendor/jedi/jedi/evaluate/context.py", line 53, in eval_trailer
return self.evaluator.eval_trailer(self, types, trailer)
File "/Users/null/.vim/bundle/PCompleteMe/third_party/ycmd/third_party/JediHTTP/vendor/jedi/jedi/evaluate/__init__.py", line 426, in eval_trailer
trailer_op, node = trailer.children[:2]
AttributeError: 'Name' object has no attribute 'children'
2017-12-21 11:24:51,921 - DEBUG - received /gotoassignment request
the file /var/folders/zw/ybz55yy53tqcy9ql0l0sw84w0000gn/T/jedihttp_50723_stdout_1ux9ojhw.log
is empty
/var/folders/zw/ybz55yy53tqcy9ql0l0sw84w0000gn/T/ycmd_50717_stdout_myirg75o.log
:
serving on http://127.0.0.1:50717
/var/folders/zw/ybz55yy53tqcy9ql0l0sw84w0000gn/T/ycmd_50717_stderr_jwx5i3b9.log
:
2017-12-21 11:14:31,888 - DEBUG - Global extra conf not loaded or no function YcmCorePreload
2017-12-21 11:14:32,003 - INFO - Received ready request
2017-12-21 11:14:32,020 - INFO - Received event notification
2017-12-21 11:14:32,021 - DEBUG - Event name: BufferVisit
2017-12-21 11:14:32,022 - INFO - Received event notification
2017-12-21 11:14:32,023 - DEBUG - Event name: FileReadyToParse
2017-12-21 11:14:32,023 - INFO - Adding buffer identifiers for file: /Users/null/api-service.shein.com/app/common/sheinRequestService.py
2017-12-21 11:14:32,024 - INFO - Starting JediHTTP server
2017-12-21 11:14:32,024 - INFO - using port 50723
2017-12-21 11:14:32,124 - INFO - Received filetype completion available request
2017-12-21 11:14:33,930 - INFO - Received debug info request
2017-12-21 11:24:31,468 - INFO - Received health request
2017-12-21 11:24:31,905 - DEBUG - Keeping subservers alive
2017-12-21 11:24:31,905 - DEBUG - Making JediHTTP request: POST b'http://127.0.0.1:50723/ready' {'content-type': 'application/json', 'x-jedihttp-hmac': b'Gjru1dHQD+IwU/Q+/0sHA4jcXzQsu57ncIj2L2JzwHk='} b''
2017-12-21 11:24:31,910 - INFO - Starting new HTTP connection (1): 127.0.0.1
2017-12-21 11:24:31,913 - DEBUG - "POST /ready HTTP/1.1" 200 4
2017-12-21 11:24:51,846 - INFO - Received command request
2017-12-21 11:24:51,855 - DEBUG - Making JediHTTP request: POST b'http://127.0.0.1:50723/gotodefinition' {'content-type': 'application/json', 'x-jedihttp-hmac': b'GddelGflntqQmqbcU/pvOPpAREwS/eu7XdIsV9Fyn/k='} b'{"source": "\\"\\"\\"\\n@author: Vic\\n@license: (C) Copyright 2013-2017\\n@contact: hunaipeng_all@163.com\\n@time: 2017/11/7\\n@software: PyCharm\\n@desc:\\n\\"\\"\\"\\nimport json\\nfrom tornado.gen import multi\\nfrom tornado.httpclient import AsyncHTTPClient\\nfrom tornado.httpclient import HTTPRequest\\nfrom urllib.parse import urlencode\\nfrom .exceptions import RequestApiJsonUnZeroError\\nfrom requests.models import PreparedRequest\\nfrom app.init_server import config\\nimport time\\nfrom pprint import pprint\\n\\n\\nclass SheinRequestService:\\n\\n def __init__(self, rasie_unzero=True):\\n \\"\\"\\"\\n :param rasie_unzero: \\u89e3\\u6790\\u540e\\u7684sjon\\u6570\\u636e\\u5982\\u679c\\u51fa\\u73b0code\\u975e\\u96f6\\u662f\\u662f\\u5426\\u5f15\\u53d1\\u5f02\\u5e38\\uff0c\\u9ed8\\u8ba4\\u662f\\u5f15\\u53d1\\n \\"\\"\\"\\n self.async_http_client = AsyncHTTPClient()\\n self.rasie_unzero = rasie_unzero\\n async def get(self, domain, request_path, **kwargs):\\n \\"\\"\\"\\n :param domain:\\n :param request_path:\\n :param kwargs:\\n :return:\\n \\"\\"\\"\\n request_url = self.format_url(domain, request_path, kwargs.pop(\'dict_url_args\', None))\\n request = self.make_request(request_url, \'GET\', **kwargs)\\n return await self.fetch(request)\\n\\n async def post(self, domain, request_path, **kwargs):\\n \\"\\"\\"\\n :param domain:\\n :param request_path:\\n :param kwargs:\\n :return:\\n \\"\\"\\"\\n request_url = self.format_url(domain, request_path, kwargs.pop(\'dict_url_args\', None))\\n request = self.make_request(request_url, \'POST\', **kwargs)\\n return await self.fetch(request)\\n\\n async def multi_get(self, dict_request_info):\\n \\"\\"\\"\\n \\u5982\\u679c\\u5176\\u4e2d\\u67d0\\u4e2a\\u63a5\\u53e3\\u5931\\u8d25\\u4f1a\\u76f4\\u63a5\\u629b\\u51fa\\u5f02\\u5e38\\n :param dict_request_info:\\n :return:\\n \\"\\"\\"\\n dict_request = self.make_multi_request_info(dict_request_info)\\n dict_response = await self.multi_fetch(dict_request)\\n return dict_response\\n\\n async def multi_post(self, dict_request_info):\\n \\"\\"\\"\\n \\u5982\\u679c\\u5176\\u4e2d\\u67d0\\u4e2a\\u63a5\\u53e3\\u5931\\u8d25\\u4f1a\\u76f4\\u63a5\\u629b\\u51fa\\u5f02\\u5e38\\n :param dict_request_info:\\n :return:\\n \\"\\"\\"\\n dict_request = self.make_multi_request_info(dict_request_info, method=\'POST\')\\n dict_response = await self.multi_fetch(dict_request)\\n return dict_response\\n\\n @staticmethod\\n def make_multi_request_info(dict_request_info, method=\'GET\'):\\n \\"\\"\\"\\n :param dict_request_info:\\n :param method:\\n :return:\\n \\"\\"\\"\\n dict_request = dict()\\n for key, value in dict_request_info.items():\\n domain = value[\'domain\']\\n request_path = value[\'request_path\']\\n dict_args = value[\'dict_args\']\\n request_url = SheinRequestService.format_url(domain, request_path, dict_args.pop(\'dict_url_args\', None))\\n request = SheinRequestService.make_request(request_url, method, **dict_args)\\n dict_request[key] = request\\n return dict_request\\n\\n @staticmethod\\n def format_url(domain, request_path, url_args=None):\\n \\"\\"\\"\\n :param domain:\\n :param request_path:\\n :param url_args:\\n :return:\\n \\"\\"\\"\\n if url_args:\\n args_str = urlencode(url_args)\\n else:\\n args_str = \'\'\\n return \'%s%s?%s\' % (domain, request_path, args_str)\\n\\n @staticmethod\\n def make_request(url, method=\'GET\', **kwargs):\\n \\"\\"\\"\\n :param url:\\n :param method:\\n :param kwargs:\\n :return:\\n \\"\\"\\"\\n\\n if \'body\' in kwargs:\\n kwargs[\'body\'] = urlencode(kwargs[\'body\'])\\n else:\\n if method == \'POST\':\\n kwargs[\'body\'] = \'\'\\n return HTTPRequest(url=url, method=method, **kwargs)\\n\\n @staticmethod\\n def query_result(json_data):\\n code = json_data.get(\'code\', \'99999\')\\n info = json_data.get(\'info\', None)\\n msg = json_data.get(\'msg\', \'\')\\n return code, info, msg\\n\\n async def fetch(self, request):\\n \\"\\"\\"\\n :param request:\\n :return:\\n \\"\\"\\"\\n begin_time = time.time()\\n try:\\n request_res = await self.async_http_client.fetch(request)\\n code, info, msg = self.query_result(json.loads(request_res.body))\\n if code != config.CODE_API_SUCCESS and code != config.CODE_API_SUCCESS:\\n if self.rasie_unzero:\\n raise RequestApiJsonUnZeroError(code, msg, info)\\n except Exception as e:\\n print(request.url)\\n raise e\\n\\n print(request.url + \' time: {}\'.format(time.time() - begin_time))\\n if self.rasie_unzero:\\n return code, info\\n else:\\n return code, info, msg\\n\\n async def multi_fetch(self, dict_request):\\n \\"\\"\\"\\n :param dict_request:\\n :return:\\n \\"\\"\\"\\n try:\\n dict_result = dict()\\n dict_response = await multi({key: self.async_http_client.fetch(request) for\\n key, request in dict_request.items()})\\n for key, response in dict_response.items():\\n code, info ,msg = self.query_result(json.loads(response.body))\\n if code != \'0\':\\n if self.rasie_unzero:\\n raise RequestApiJsonUnZeroError(code, msg)\\n if self.rasie_unzero:\\n dict_result[key] = (code, info)\\n else:\\n dict_result[key] = (code, info, msg)\\n except Exception as e:\\n raise e\\n return dict_result\\n\\n async def post_file(self, domain, request_path, **kwargs):\\n request_url = self.format_url(domain, request_path, kwargs.pop(\'dict_url_args\', None))\\n p = PreparedRequest()\\n p.headers = kwargs.get(\\"headers\\", {})\\n data = kwargs.get(\'body\', None)\\n p.prepare_body(data, kwargs.get(\\"files\\", {}))\\n request = HTTPRequest(url=request_url, method=\'POST\', body=p.body, headers=p.headers)\\n code, info = await self.fetch(request)\\n return code, info\\n", "line": 38, "col": 26, "source_path": "/Users/null/api-service.shein.com/app/common/sheinRequestService.py"}'
2017-12-21 11:24:51,856 - INFO - Starting new HTTP connection (1): 127.0.0.1
2017-12-21 11:24:51,917 - DEBUG - "POST /gotodefinition HTTP/1.1" 500 2175
2017-12-21 11:24:51,918 - ERROR - 500 Server Error: Internal Server Error for url: http://127.0.0.1:50723/gotodefinition
Traceback (most recent call last):
File "/Users/null/.vim/bundle/PCompleteMe/third_party/ycmd/ycmd/../ycmd/completers/python/jedi_completer.py", line 348, in _GetDefinitionsList
response = self._GetResponse( handler, request_data )
File "/Users/null/.vim/bundle/PCompleteMe/third_party/ycmd/ycmd/../ycmd/completers/python/jedi_completer.py", line 215, in _GetResponse
response.raise_for_status()
File "/Users/null/.vim/bundle/PCompleteMe/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:50723/gotodefinition
2017-12-21 11:24:51,919 - ERROR - Cannot follow nothing. Put your cursor on a valid name.
Traceback (most recent call last):
File "/Users/null/.vim/bundle/PCompleteMe/third_party/ycmd/ycmd/../ycmd/completers/python/jedi_completer.py", line 348, in _GetDefinitionsList
response = self._GetResponse( handler, request_data )
File "/Users/null/.vim/bundle/PCompleteMe/third_party/ycmd/ycmd/../ycmd/completers/python/jedi_completer.py", line 215, in _GetResponse
response.raise_for_status()
File "/Users/null/.vim/bundle/PCompleteMe/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:50723/gotodefinition
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/null/.vim/bundle/PCompleteMe/third_party/ycmd/ycmd/../ycmd/completers/python/jedi_completer.py", line 317, in _GoTo
return self._GoToDefinition( request_data )
File "/Users/null/.vim/bundle/PCompleteMe/third_party/ycmd/ycmd/../ycmd/completers/python/jedi_completer.py", line 301, in _GoToDefinition
request_data )
File "/Users/null/.vim/bundle/PCompleteMe/third_party/ycmd/ycmd/../ycmd/completers/python/jedi_completer.py", line 352, in _GetDefinitionsList
raise RuntimeError( 'Cannot follow nothing. '
RuntimeError: Cannot follow nothing. Put your cursor on a valid name.
2017-12-21 11:24:51,919 - DEBUG - Making JediHTTP request: POST b'http://127.0.0.1:50723/gotoassignment' {'content-type': 'application/json', 'x-jedihttp-hmac': b'fjF4at6hZ8LWrn536JEYvEOCUEjn9srWTJmm2oD4LL0='} b'{"source": "\\"\\"\\"\\n@author: Vic\\n@license: (C) Copyright 2013-2017\\n@contact: hunaipeng_all@163.com\\n@time: 2017/11/7\\n@software: PyCharm\\n@desc:\\n\\"\\"\\"\\nimport json\\nfrom tornado.gen import multi\\nfrom tornado.httpclient import AsyncHTTPClient\\nfrom tornado.httpclient import HTTPRequest\\nfrom urllib.parse import urlencode\\nfrom .exceptions import RequestApiJsonUnZeroError\\nfrom requests.models import PreparedRequest\\nfrom app.init_server import config\\nimport time\\nfrom pprint import pprint\\n\\n\\nclass SheinRequestService:\\n\\n def __init__(self, rasie_unzero=True):\\n \\"\\"\\"\\n :param rasie_unzero: \\u89e3\\u6790\\u540e\\u7684sjon\\u6570\\u636e\\u5982\\u679c\\u51fa\\u73b0code\\u975e\\u96f6\\u662f\\u662f\\u5426\\u5f15\\u53d1\\u5f02\\u5e38\\uff0c\\u9ed8\\u8ba4\\u662f\\u5f15\\u53d1\\n \\"\\"\\"\\n self.async_http_client = AsyncHTTPClient()\\n self.rasie_unzero = rasie_unzero\\n async def get(self, domain, request_path, **kwargs):\\n \\"\\"\\"\\n :param domain:\\n :param request_path:\\n :param kwargs:\\n :return:\\n \\"\\"\\"\\n request_url = self.format_url(domain, request_path, kwargs.pop(\'dict_url_args\', None))\\n request = self.make_request(request_url, \'GET\', **kwargs)\\n return await self.fetch(request)\\n\\n async def post(self, domain, request_path, **kwargs):\\n \\"\\"\\"\\n :param domain:\\n :param request_path:\\n :param kwargs:\\n :return:\\n \\"\\"\\"\\n request_url = self.format_url(domain, request_path, kwargs.pop(\'dict_url_args\', None))\\n request = self.make_request(request_url, \'POST\', **kwargs)\\n return await self.fetch(request)\\n\\n async def multi_get(self, dict_request_info):\\n \\"\\"\\"\\n \\u5982\\u679c\\u5176\\u4e2d\\u67d0\\u4e2a\\u63a5\\u53e3\\u5931\\u8d25\\u4f1a\\u76f4\\u63a5\\u629b\\u51fa\\u5f02\\u5e38\\n :param dict_request_info:\\n :return:\\n \\"\\"\\"\\n dict_request = self.make_multi_request_info(dict_request_info)\\n dict_response = await self.multi_fetch(dict_request)\\n return dict_response\\n\\n async def multi_post(self, dict_request_info):\\n \\"\\"\\"\\n \\u5982\\u679c\\u5176\\u4e2d\\u67d0\\u4e2a\\u63a5\\u53e3\\u5931\\u8d25\\u4f1a\\u76f4\\u63a5\\u629b\\u51fa\\u5f02\\u5e38\\n :param dict_request_info:\\n :return:\\n \\"\\"\\"\\n dict_request = self.make_multi_request_info(dict_request_info, method=\'POST\')\\n dict_response = await self.multi_fetch(dict_request)\\n return dict_response\\n\\n @staticmethod\\n def make_multi_request_info(dict_request_info, method=\'GET\'):\\n \\"\\"\\"\\n :param dict_request_info:\\n :param method:\\n :return:\\n \\"\\"\\"\\n dict_request = dict()\\n for key, value in dict_request_info.items():\\n domain = value[\'domain\']\\n request_path = value[\'request_path\']\\n dict_args = value[\'dict_args\']\\n request_url = SheinRequestService.format_url(domain, request_path, dict_args.pop(\'dict_url_args\', None))\\n request = SheinRequestService.make_request(request_url, method, **dict_args)\\n dict_request[key] = request\\n return dict_request\\n\\n @staticmethod\\n def format_url(domain, request_path, url_args=None):\\n \\"\\"\\"\\n :param domain:\\n :param request_path:\\n :param url_args:\\n :return:\\n \\"\\"\\"\\n if url_args:\\n args_str = urlencode(url_args)\\n else:\\n args_str = \'\'\\n return \'%s%s?%s\' % (domain, request_path, args_str)\\n\\n @staticmethod\\n def make_request(url, method=\'GET\', **kwargs):\\n \\"\\"\\"\\n :param url:\\n :param method:\\n :param kwargs:\\n :return:\\n \\"\\"\\"\\n\\n if \'body\' in kwargs:\\n kwargs[\'body\'] = urlencode(kwargs[\'body\'])\\n else:\\n if method == \'POST\':\\n kwargs[\'body\'] = \'\'\\n return HTTPRequest(url=url, method=method, **kwargs)\\n\\n @staticmethod\\n def query_result(json_data):\\n code = json_data.get(\'code\', \'99999\')\\n info = json_data.get(\'info\', None)\\n msg = json_data.get(\'msg\', \'\')\\n return code, info, msg\\n\\n async def fetch(self, request):\\n \\"\\"\\"\\n :param request:\\n :return:\\n \\"\\"\\"\\n begin_time = time.time()\\n try:\\n request_res = await self.async_http_client.fetch(request)\\n code, info, msg = self.query_result(json.loads(request_res.body))\\n if code != config.CODE_API_SUCCESS and code != config.CODE_API_SUCCESS:\\n if self.rasie_unzero:\\n raise RequestApiJsonUnZeroError(code, msg, info)\\n except Exception as e:\\n print(request.url)\\n raise e\\n\\n print(request.url + \' time: {}\'.format(time.time() - begin_time))\\n if self.rasie_unzero:\\n return code, info\\n else:\\n return code, info, msg\\n\\n async def multi_fetch(self, dict_request):\\n \\"\\"\\"\\n :param dict_request:\\n :return:\\n \\"\\"\\"\\n try:\\n dict_result = dict()\\n dict_response = await multi({key: self.async_http_client.fetch(request) for\\n key, request in dict_request.items()})\\n for key, response in dict_response.items():\\n code, info ,msg = self.query_result(json.loads(response.body))\\n if code != \'0\':\\n if self.rasie_unzero:\\n raise RequestApiJsonUnZeroError(code, msg)\\n if self.rasie_unzero:\\n dict_result[key] = (code, info)\\n else:\\n dict_result[key] = (code, info, msg)\\n except Exception as e:\\n raise e\\n return dict_result\\n\\n async def post_file(self, domain, request_path, **kwargs):\\n request_url = self.format_url(domain, request_path, kwargs.pop(\'dict_url_args\', None))\\n p = PreparedRequest()\\n p.headers = kwargs.get(\\"headers\\", {})\\n data = kwargs.get(\'body\', None)\\n p.prepare_body(data, kwargs.get(\\"files\\", {}))\\n request = HTTPRequest(url=request_url, method=\'POST\', body=p.body, headers=p.headers)\\n code, info = await self.fetch(request)\\n return code, info\\n", "line": 38, "col": 26, "source_path": "/Users/null/api-service.shein.com/app/common/sheinRequestService.py"}'
2017-12-21 11:24:51,920 - INFO - Starting new HTTP connection (1): 127.0.0.1
2017-12-21 11:24:51,922 - DEBUG - "POST /gotoassignment HTTP/1.1" 500 2095
2017-12-21 11:24:51,922 - ERROR - 500 Server Error: Internal Server Error for url: http://127.0.0.1:50723/gotoassignment
Traceback (most recent call last):
File "/Users/null/.vim/bundle/PCompleteMe/third_party/ycmd/ycmd/../ycmd/completers/python/jedi_completer.py", line 348, in _GetDefinitionsList
response = self._GetResponse( handler, request_data )
File "/Users/null/.vim/bundle/PCompleteMe/third_party/ycmd/ycmd/../ycmd/completers/python/jedi_completer.py", line 215, in _GetResponse
response.raise_for_status()
File "/Users/null/.vim/bundle/PCompleteMe/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:50723/gotoassignment
2017-12-21 11:24:51,923 - ERROR - Cannot follow nothing. Put your cursor on a valid name.
Traceback (most recent call last):
File "/Users/null/.vim/bundle/PCompleteMe/third_party/ycmd/ycmd/../ycmd/completers/python/jedi_completer.py", line 348, in _GetDefinitionsList
response = self._GetResponse( handler, request_data )
File "/Users/null/.vim/bundle/PCompleteMe/third_party/ycmd/ycmd/../ycmd/completers/python/jedi_completer.py", line 215, in _GetResponse
response.raise_for_status()
File "/Users/null/.vim/bundle/PCompleteMe/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:50723/gotoassignment
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/null/.vim/bundle/PCompleteMe/third_party/ycmd/ycmd/../ycmd/completers/python/jedi_completer.py", line 323, in _GoTo
return self._GoToDeclaration( request_data )
File "/Users/null/.vim/bundle/PCompleteMe/third_party/ycmd/ycmd/../ycmd/completers/python/jedi_completer.py", line 309, in _GoToDeclaration
request_data )
File "/Users/null/.vim/bundle/PCompleteMe/third_party/ycmd/ycmd/../ycmd/completers/python/jedi_completer.py", line 352, in _GetDefinitionsList
raise RuntimeError( 'Cannot follow nothing. '
RuntimeError: Cannot follow nothing. Put your cursor on a valid name.
Traceback (most recent call last):
File "/Users/null/.vim/bundle/PCompleteMe/third_party/ycmd/ycmd/../ycmd/completers/python/jedi_completer.py", line 348, in _GetDefinitionsList
response = self._GetResponse( handler, request_data )
File "/Users/null/.vim/bundle/PCompleteMe/third_party/ycmd/ycmd/../ycmd/completers/python/jedi_completer.py", line 215, in _GetResponse
response.raise_for_status()
File "/Users/null/.vim/bundle/PCompleteMe/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:50723/gotoassignment
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/null/.vim/bundle/PCompleteMe/third_party/ycmd/ycmd/../ycmd/completers/python/jedi_completer.py", line 323, in _GoTo
return self._GoToDeclaration( request_data )
File "/Users/null/.vim/bundle/PCompleteMe/third_party/ycmd/ycmd/../ycmd/completers/python/jedi_completer.py", line 309, in _GoToDeclaration
request_data )
File "/Users/null/.vim/bundle/PCompleteMe/third_party/ycmd/ycmd/../ycmd/completers/python/jedi_completer.py", line 352, in _GetDefinitionsList
raise RuntimeError( 'Cannot follow nothing. '
RuntimeError: Cannot follow nothing. Put your cursor on a valid name.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/null/.vim/bundle/PCompleteMe/third_party/ycmd/third_party/bottle/bottle.py", line 862, in _handle
return route.call(**args)
File "/Users/null/.vim/bundle/PCompleteMe/third_party/ycmd/third_party/bottle/bottle.py", line 1740, in wrapper
rv = callback(*a, **ka)
File "/Users/null/.vim/bundle/PCompleteMe/third_party/ycmd/ycmd/../ycmd/watchdog_plugin.py", line 108, in wrapper
return callback( *args, **kwargs )
File "/Users/null/.vim/bundle/PCompleteMe/third_party/ycmd/ycmd/../ycmd/hmac_plugin.py", line 70, in wrapper
body = callback( *args, **kwargs )
File "/Users/null/.vim/bundle/PCompleteMe/third_party/ycmd/ycmd/../ycmd/handlers.py", line 85, in RunCompleterCommand
request_data ) )
File "/Users/null/.vim/bundle/PCompleteMe/third_party/ycmd/ycmd/../ycmd/completers/completer.py", line 333, in OnUserCommand
return command( self, request_data, arguments[ 1: ] )
File "/Users/null/.vim/bundle/PCompleteMe/third_party/ycmd/ycmd/../ycmd/completers/python/jedi_completer.py", line 287, in <lambda>
self._GoTo( request_data ) ),
File "/Users/null/.vim/bundle/PCompleteMe/third_party/ycmd/ycmd/../ycmd/completers/python/jedi_completer.py", line 326, in _GoTo
raise RuntimeError( 'Can\'t jump to definition or declaration.' )
RuntimeError: Can't jump to definition or declaration.
2017-12-21 11:25:01,206 - INFO - Received debug info request
it seems like the problem is the ycm client can't connect to ycm server? and how can i solve the problem?
Thanks for all that info.
it seems like the problem is the ycm client can't connect to ycm server?
These errors occur because the server is not ready yet. That's not the problem here. The issue is that Jedi (the semantic engine used by YCM for Python) returns an error when trying to jump to the fetch
method in your example:
Traceback (most recent call last):
File "/Users/null/.vim/bundle/PCompleteMe/third_party/ycmd/third_party/JediHTTP/vendor/bottle/bottle.py", line 862, in _handle
return route.call(**args)
File "/Users/null/.vim/bundle/PCompleteMe/third_party/ycmd/third_party/JediHTTP/vendor/bottle/bottle.py", line 1732, in wrapper
rv = callback(*a, **ka)
File "/Users/null/.vim/bundle/PCompleteMe/third_party/ycmd/third_party/JediHTTP/jedihttp/hmac_plugin.py", line 55, in wrapper
body = callback(*args, **kwargs)
File "/Users/null/.vim/bundle/PCompleteMe/third_party/ycmd/third_party/JediHTTP/jedihttp/handlers.py", line 77, in gotodefinition
response = _format_definitions(script.goto_definitions())
File "/Users/null/.vim/bundle/PCompleteMe/third_party/ycmd/third_party/JediHTTP/vendor/jedi/jedi/api/__init__.py", line 181, in goto_definitions
definitions = helpers.evaluate_goto_definition(self._evaluator, context, leaf)
File "/Users/null/.vim/bundle/PCompleteMe/third_party/ycmd/third_party/JediHTTP/vendor/jedi/jedi/api/helpers.py", line 201, in evaluate_goto_definition
return evaluator.goto_definitions(context, leaf)
File "/Users/null/.vim/bundle/PCompleteMe/third_party/ycmd/third_party/JediHTTP/vendor/jedi/jedi/evaluate/__init__.py", line 491, in goto_definitions
return helpers.evaluate_call_of_leaf(context, name)
File "/Users/null/.vim/bundle/PCompleteMe/third_party/ycmd/third_party/JediHTTP/vendor/jedi/jedi/evaluate/helpers.py", line 91, in evaluate_call_of_leaf
values = context.eval_trailer(values, trailer)
File "/Users/null/.vim/bundle/PCompleteMe/third_party/ycmd/third_party/JediHTTP/vendor/jedi/jedi/evaluate/context.py", line 53, in eval_trailer
return self.evaluator.eval_trailer(self, types, trailer)
File "/Users/null/.vim/bundle/PCompleteMe/third_party/ycmd/third_party/JediHTTP/vendor/jedi/jedi/evaluate/__init__.py", line 426, in eval_trailer
trailer_op, node = trailer.children[:2]
AttributeError: 'Name' object has no attribute 'children'
This is the same issue as https://github.com/davidhalter/jedi/issues/797 and it's apparently fixed in the latest version of Jedi. So, we need to update Jedi. See PR https://github.com/Valloric/ycmd/pull/888.
Keeping it open until we update ycmd submodule.
@micbou the issue of jedi i have see it already. i just guess it has update already. so what i can do now is just waiting ycmd submodule to be updated?
Yes. If you don't want to wait, go to the ~/.vim/bundle/YouCompleteMe/third_party/ycmd
folder and run the commands:
git checkout master
git pull
git submodule update --init --recursive
Probably git fetch origin; git checkout origin/master
?
Right. I edited my comment.
@micbou wow, it just worked, thanks very much.
platform: mac os x 10.13
for some reason, i must use python2 and python3 on same machine, so i installed two vim, the only different is the python support.
one vim:
the other:
and then i compiled ycm use the two python version defferent:
and then, the corresponding
.vimrc
:ok, every thing is fine, but the only bad thing is when i use vim(with python3 support) it just can't
GoToDefinitionElseDeclaration
with the following sample code:what werid is when using vim2(with python2 support) it just work as expect.