You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Completions don't work for python on large (ish) files since JediHTTP was merged
Detail
The new JediHTTP completer is throwing an error when getting completions in a moderately large module:
Here's the error from stderr:
2016-01-11 14:03:10,946 - ERROR - Exception from semantic completer (using general): Traceback (most recent call last):
File "/mma/users/benj/.vim/bundle/YouCompleteMe/third_party/ycmd/ycmd/../ycmd/handlers.py", line 104, in GetCompletions
.ComputeCandidates( request_data ) )
File "/mma/users/benj/.vim/bundle/YouCompleteMe/third_party/ycmd/ycmd/../ycmd/completers/completer.py", line 168, in ComputeCandidates
candidates = self._GetCandidatesFromSubclass( request_data )
File "/mma/users/benj/.vim/bundle/YouCompleteMe/third_party/ycmd/ycmd/../ycmd/completers/completer.py", line 184, in _GetCandidatesFromSubclass
raw_completions = self.ComputeCandidatesInner( request_data )
File "/mma/users/benj/.vim/bundle/YouCompleteMe/third_party/ycmd/ycmd/../ycmd/completers/python/jedi_completer.py", line 217, in ComputeCandidatesInner
for completion in self._JediCompletions( request_data ) ]
File "/mma/users/benj/.vim/bundle/YouCompleteMe/third_party/ycmd/ycmd/../ycmd/completers/python/jedi_completer.py", line 221, in _JediCompletions
return self._GetResponse( '/completions', request_data )[ 'completions' ]
File "/mma/users/benj/.vim/bundle/YouCompleteMe/third_party/ycmd/ycmd/../ycmd/completers/python/jedi_completer.py", line 168, in _GetResponse
response.raise_for_status()
File "/mma/users/benj/.vim/bundle/YouCompleteMe/third_party/ycmd/third_party/requests/requests/models.py", line 837, in raise_for_status
raise HTTPError(http_error_msg, response=self)
HTTPError: 413 Client Error: Request Entity Too Large for url: http://127.0.0.1:58005/completions
An example file I get this in is git-p4 from the git distribution. On my system that's in /opt/rh/devtoolset-2/root/usr/libexec/git-core/git-p4 though it's unlikely to be there on most systems. It's 3388 lines long and 124K.
It works fine if I revert to prior to JediHTTP landing.
Bottle has a max-size for request buffers. It is 100K by default. ycmd increases this to 1MB
ycmd has this code:
# num bytes for the request body buffer; request.json only works if the request# size is less than thisbottle.Request.MEMFILE_MAX=1000*1024
bottle has this code:
MEMFILE_MAX=102400def_get_body_string(self):
''' read body until content-length or MEMFILE_MAX into a string. Raise HTTPError(413) on requests that are to large. '''clen=self.content_lengthifclen>self.MEMFILE_MAX:
raiseHTTPError(413, 'Request to large')
ifclen<0: clen=self.MEMFILE_MAX+1data=self.body.read(clen)
iflen(data) >self.MEMFILE_MAX: # Fail fastraiseHTTPError(413, 'Request to large')
returndata
I think we need something in JediHTTP for this? Agree?
The text was updated successfully, but these errors were encountered:
Problem
Completions don't work for python on large (ish) files since JediHTTP was merged
Detail
The new JediHTTP completer is throwing an error when getting completions in a moderately large module:
Here's the error from stderr:
An example file I get this in is
git-p4
from thegit
distribution. On my system that's in/opt/rh/devtoolset-2/root/usr/libexec/git-core/git-p4
though it's unlikely to be there on most systems. It's 3388 lines long and 124K.It works fine if I revert to prior to JediHTTP landing.
@vheon
Steps to reproduce (at least on my system):
git-p4
from git'slibexec/git-core
directoryimport pprint
to the list of importsp4_build_cmd
add something likepprint.
and observe the error in Vim and the log.:version
Both the jediHTTP stdout and stderr log files are empty.
Explanation
Bottle has a max-size for request buffers. It is 100K by default.
ycmd
increases this to 1MBycmd
has this code:bottle
has this code:I think we need something in
JediHTTP
for this? Agree?The text was updated successfully, but these errors were encountered: