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
Please complete these steps and check these boxes (by putting an x inside
the brackets) before filing your issue:
I have read and understood YCM's [CONTRIBUTING][cont] document.
I have read and understood YCM's [CODE_OF_CONDUCT][code] document.
I have read and understood YCM's [README][readme], especially the
[Frequently Asked Questions][faq] section.
I have searched YCM's issue tracker to find issues similar to the one I'm
about to report and couldn't find an answer to my problem. ([Example Google
search.][search])
If filing a bug report, I have included the output of vim --version.
If filing a bug report, I have included the output of :YcmDebugInfo.
If filing a bug report, I have attached the contents of the logfiles using
the :YcmToggleLogs command.
If filing a bug report, I have included which OS (including specific OS
version) I am using.
If filing a bug report, I have included a minimal test case that reproduces
my issue, including what I expected to happen and what actually happened.
If filing a installation failure report, I have included the entire output
of install.py (or cmake/make/ninja) including its invocation
I understand this is an open-source project staffed by volunteers and
that any help I receive is a selfless, heartfelt gift of their free time. I
know I am not entitled to anything and will be polite and courteous.
I understand my issue may be closed if it becomes obvious I didn't
actually perform all of these steps.
Thank you for adhering to this process! It ensures your issue is resolved
quickly and that neither your nor our time is needlessly wasted.
Issue Details
After the recent changes to typescript support, any YCM command just prints the error LookupError: unknown encoding:
What did you do?
I had previously installed typescript via npm in the same manner as described in the readme. I did update it from 2.8.3 to the latest when I first encountered this issue, but to no avail
Repro is simply to open any typescript file and see that none of the usual YCM features work
What did you expect to happen?
I expected YCM to work for typescript files
What actually happened?
Using YcmCompleter commands result in the error message noted above
Also
Commenting out the parts of TsserverCommand() that try to read from PATH_TO_TSSERVER fixes everything—YcmDebugInfo prints all the correct info about TSServer and everything.
Opening the tsserver file in a separate python repl (the same one pointed to by YcmDebugInfo) seems to work okay
I did recently install python3 from homebrew, which is somewhat new; I know MacVim has historically had some issues when trying to use both python3 and python2. But, echo has('python3') prints 0, for what it's worth. And, as mentioned, everything works fine if I just blindly suppress the error.
Wrapping that bit in a try...except and defaulting to return [ PATH_TO_TSSERVER ] also works as a bandaid for me.
Printing YouCompleteMe debug information...
-- Client logfile: /var/folders/9q/s674cplx7qv122xbwcchw3jm0000gn/T/ycm_DTVqsG.log
-- Server Python interpreter: /usr/bin/python
-- Server Python version: 2.7.10
-- Server has Clang support compiled in: True
-- Clang version: clang version 6.0.0 (tags/RELEASE_600/final)
-- No extra configuration file found
-- Server running at: http://127.0.0.1:61460
-- Server process ID: 29167
-- Server logfiles:
-- /var/folders/9q/s674cplx7qv122xbwcchw3jm0000gn/T/ycmd_61460_stdout_Hlf7BT.log
-- /var/folders/9q/s674cplx7qv122xbwcchw3jm0000gn/T/ycmd_61460_stderr__a94py.log
Contents of YCM, ycmd and completion engine logfiles
ycm_*.log
2018-08-03 16:27:41,504 - ERROR - Unable to connect to server
Traceback (most recent call last):
File "/Users/dhleong/.dotfiles/profile/.vim/bundle/YouCompleteMe/autoload/../python/ycm/client/base_request.py", line 79, in HandleFuture
return _JsonFromFuture( future )
File "/Users/dhleong/.dotfiles/profile/.vim/bundle/YouCompleteMe/autoload/../python/ycm/client/base_request.py", line 239, in _JsonFromFuture
response = future.result()
File "/Users/dhleong/.dotfiles/profile/.vim/bundle/YouCompleteMe/third_party/pythonfutures/concurrent/futures/_base.py", line 404, in result
return self.__get_result()
File "/Users/dhleong/.dotfiles/profile/.vim/bundle/YouCompleteMe/third_party/pythonfutures/concurrent/futures/_base.py", line 356, in __get_result
raise self._exception
ConnectionError: HTTPConnectionPool(host='127.0.0.1', port=60576): Max retries exceeded with url: /ready (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0x1111c27d0>: Failed to establish a new connection: [Errno 61] Connection refused',))
2018-08-03 16:27:50,024 - ERROR - Error while handling server response
Traceback (most recent call last):
File "/Users/dhleong/.dotfiles/profile/.vim/bundle/YouCompleteMe/autoload/../python/ycm/client/base_request.py", line 79, in HandleFuture
return _JsonFromFuture( future )
File "/Users/dhleong/.dotfiles/profile/.vim/bundle/YouCompleteMe/autoload/../python/ycm/client/base_request.py", line 242, in _JsonFromFuture
raise MakeServerException( response.json() )
ServerError: LookupError: unknown encoding:
ycmd_stderr.log:
2018-08-03 16:29:38,151 - INFO - Received debug info request
2018-08-03 16:29:38,151 - INFO - Using node binary from /usr/local/bin/node
2018-08-03 16:29:38,151 - INFO - Using TSServer from /Users/dhleong/.npm-packages/bin/tsserver
2018-08-03 16:29:38,151 - ERROR - unknown encoding:
Traceback (most recent call last):
File "/Users/dhleong/.dotfiles/profile/.vim/bundle/YouCompleteMe/third_party/ycmd/ycmd/../ycmd/handlers.py", line 238, in DebugInfo
request_data ).DebugInfo( request_data )
File "/Users/dhleong/.dotfiles/profile/.vim/bundle/YouCompleteMe/third_party/ycmd/ycmd/../ycmd/handlers.py", line 302, in _GetCompleterForRequestData
return _server_state.GetFiletypeCompleter( request_data[ 'filetypes' ] )
File "/Users/dhleong/.dotfiles/profile/.vim/bundle/YouCompleteMe/third_party/ycmd/ycmd/../ycmd/server_state.py", line 83, in GetFiletypeCompleter
for filetype in current_filetypes ]
File "/Users/dhleong/.dotfiles/profile/.vim/bundle/YouCompleteMe/third_party/ycmd/ycmd/../ycmd/server_state.py", line 71, in _GetFiletypeCompleterForFiletype
completer = module.GetCompleter( self._user_options )
File "/Users/dhleong/.dotfiles/profile/.vim/bundle/YouCompleteMe/third_party/ycmd/ycmd/completers/typescript/hook.py", line 33, in GetCompleter
return TypeScriptCompleter( user_options )
File "/Users/dhleong/.dotfiles/profile/.vim/bundle/YouCompleteMe/third_party/ycmd/ycmd/../ycmd/completers/typescript/typescript_completer.py", line 151, in __init__
self._tsserver_command = TsserverCommand()
File "/Users/dhleong/.dotfiles/profile/.vim/bundle/YouCompleteMe/third_party/ycmd/ycmd/../ycmd/completers/typescript/typescript_completer.py", line 86, in TsserverCommand
with open( PATH_TO_TSSERVER ) as f:
LookupError: unknown encoding:
ymcd_stdout.log:
serving on http://localhost:60576
OS version, distribution, etc.
macOS 10.13.6
The text was updated successfully, but these errors were encountered:
[READY] Remove nodejs workaround
Opening a file without setting the encoding may fail on Python 2. See issue ycm-core/YouCompleteMe#3101. We could use the `ReadFile` utility function to fix the issue but I think we are better off dropping the `nodejs` workaround altogether (looking for the `nodejs` executable before `node` because `nodejs` is the name of the Node binary on Debian-based distributions). Users should install the `nodejs-legacy` package on such distributions.
Fixesycm-core/YouCompleteMe#3101.
<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/valloric/ycmd/1075)
<!-- Reviewable:end -->
Issue Prelude
Please complete these steps and check these boxes (by putting an
x
insidethe brackets) before filing your issue:
[Frequently Asked Questions][faq] section.
about to report and couldn't find an answer to my problem. ([Example Google
search.][search])
vim --version
.:YcmDebugInfo
.the
:YcmToggleLogs
command.version) I am using.
my issue, including what I expected to happen and what actually happened.
of
install.py
(orcmake
/make
/ninja
) including its invocationthat any help I receive is a selfless, heartfelt gift of their free time. I
know I am not entitled to anything and will be polite and courteous.
actually perform all of these steps.
Thank you for adhering to this process! It ensures your issue is resolved
quickly and that neither your nor our time is needlessly wasted.
Issue Details
After the recent changes to typescript support, any YCM command just prints the error
LookupError: unknown encoding:
What did you do?
typescript
vianpm
in the same manner as described in the readme. I did update it from 2.8.3 to the latest when I first encountered this issue, but to no availWhat did you expect to happen?
What actually happened?
YcmCompleter
commands result in the error message noted aboveAlso
TsserverCommand()
that try to read fromPATH_TO_TSSERVER
fixes everything—YcmDebugInfo
prints all the correct info aboutTSServer
and everything.tsserver
file in a separate python repl (the same one pointed to byYcmDebugInfo
) seems to work okaypython3
from homebrew, which is somewhat new; I know MacVim has historically had some issues when trying to use bothpython3
andpython2
. But,echo has('python3')
prints0
, for what it's worth. And, as mentioned, everything works fine if I just blindly suppress the error.Wrapping that bit in a
try...except
and defaulting toreturn [ PATH_TO_TSSERVER ]
also works as a bandaid for me.Diagnostic data
Output of
mvim --version
Output of
YcmDebugInfo
Contents of YCM, ycmd and completion engine logfiles
ycm_*.log
ycmd_stderr.log:
ymcd_stdout.log:
OS version, distribution, etc.
macOS 10.13.6
The text was updated successfully, but these errors were encountered: