Qusic / atom-youcompleteme

YouCompleteMe for Atom Editor
MIT License
82 stars 34 forks source link

"Cannot read property" on completing python files #64

Closed bocajnotnef closed 8 years ago

bocajnotnef commented 8 years ago

I was working on a python file today and noticed I wasn't getting completions. After googling, I saw that the atom package only has c-family languages enabled by default, so I open settings and add 'python' to the list of languages to autocomplete.

Unfortunately, now when I try to autocomplete I get this error:

TypeError: Cannot read property 'substr' of undefined
    at converters.python (/home/jgf/.atom/packages/you-complete-me/lib/get-completions.coffee:54:50)
    at Array.map (native)
    at convertCompletions (/home/jgf/.atom/packages/you-complete-me/lib/get-completions.coffee:64:15)
    at process._tickCallback (node.js:392:9)

I am running the latest YCMD available, from the master branch, and 0.7.8 for the Atom you-complete-me package.

Any help would be appreciated.

bocajnotnef commented 8 years ago

Also, when I open cc files I get this error:

TypeError: Not a buffer
    at TypeError (native)
    at new Hmac (crypto.js:87:16)
    at Object.Hmac (crypto.js:85:12)
    at generateHmac (/home/jgf/.atom/packages/you-complete-me/lib/handler.coffee:103:12)
    at signMessage (/home/jgf/.atom/packages/you-complete-me/lib/handler.coffee:114:65)
    at /home/jgf/.atom/packages/you-complete-me/lib/handler.coffee:165:7

The only change that's happened recently is that the atom you-complete-me package updated.

kaushikcfd commented 8 years ago

Something similar is observed with .cpp files, after the recent update:

TypeError: Not a buffer
    at TypeError (native)
    at new Hmac (crypto.js:87:16)
    at Object.Hmac (crypto.js:85:12)
    at generateHmac (/home/kaushikcfd/.atom/packages/you-complete-me/lib/handler.coffee:103:12)
    at signMessage (/home/kaushikcfd/.atom/packages/you-complete-me/lib/handler.coffee:114:65)
    at /home/kaushikcfd/.atom/packages/you-complete-me/lib/handler.coffee:165:7
kaushikcfd commented 8 years ago

@bocajnotnef Refer to the solution of Issue #65 . And please inform if it works. Also could you ensure that in the file ycmd/default-settings.json the parameter "hmac" is kept empty.

Qusic commented 8 years ago

fixed