GithubHelp home page GithubHelp logo

'NoneType' object is not iterable about tern HOT 5 CLOSED

ternjs avatar ternjs commented on July 26, 2024
'NoneType' object is not iterable

from tern.

Comments (5)

marijnh avatar marijnh commented on July 26, 2024

I couldn't reproduce this. Could you try (after updating to the current code) running (before you start vim) /path/to/bin/tern --verbose to see what the server actually returned? It appears as if a valid JSON object is received, but one that doesn't have an array in its completions field, which is quite odd, because the server should not be producing such objects.

from tern.

gilligan avatar gilligan commented on July 26, 2024

I started debugging a bit (aka adding loads of vim.command('echomsg ...') statements - argh) and the problem seems to be with subprocess.Popen(). In MacVim proc.stdout.readline() in startServer() returns right away with an empty string. In the terminal vim is blocked until I kill the node process.

I started the server outside of vim and at first did not realize that now the .tern-port file is not written to the project directory but to the tern server directory. After creating an appropriate file it worked at last. Running it with --verbose I don't see any output at all even though I'm logging 'makeRequest' calls on the vim side.

from tern.

marijnh avatar marijnh commented on July 26, 2024

Argh. Spawning processes in a cross-platform way seems to be a headache. It's Python that does the spawning, and I was kind of expecting some portability from it, but I guess that was too optimistic.

Will look into that later.

from tern.

gilligan avatar gilligan commented on July 26, 2024

Hm.. i'm getting really confused now.. I don't get any responses from makeRequest..

vim.command('echomsg "data = ' + str(req.read()) + '"')

That's just empty. The plugin could do with some error handling. I'll spend some more time on it later on.

from tern.

marijnh avatar marijnh commented on July 26, 2024

The vim plugin moved to https://github.com/marijnh/tern_for_vim . If this occurs again, please open an issue there.

from tern.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.