Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unknown error when typing argument #147

Open
max-mykhailenko opened this issue Nov 10, 2016 · 9 comments
Open

Unknown error when typing argument #147

max-mykhailenko opened this issue Nov 10, 2016 · 9 comments

Comments

@max-mykhailenko
Copy link

Tern settings

{
  "tern_argument_hints": true,
  "tern_output_style": "tooltip",
  "tern_argument_completion": true,
  "tern_arguments": ["--no-port-file"],
  "tern_command": ["tern"]
}

.tern-project

{
  "ecmaVersion": 7,
  "libs": [],
  "dontLoad": [
    "node_modules"
  ],
  "plugins": {
    "complete_strings": {},
    "node": {},
    "modules": {},
    "jsx": {},
    "es_modules": {},
    "doc_comment": {
      "fullDocs": true
    }
  }
}

screen shot 2016-11-10 at 9 41 53 am

@marijnh
Copy link
Member

marijnh commented Nov 10, 2016

Can you reproduce this without the jsx plugin? If so, can you give me a source file that triggers it?

@max-mykhailenko
Copy link
Author

I can't now reproduce it, but it appears regularly. I'll send you a file when get this bug again.

@brownsugar
Copy link

brownsugar commented Jun 2, 2020

I can reproduce with ST4, when typing a space at the end of the string or line(in script area of .vue file), it continuously popup the empty message.
image

And this might be the error log:

Traceback (most recent call last):
  File "/Applications/Sublime Text.app/Contents/MacOS/Lib/python33/sublime_plugin.py", line 893, in on_query_completions
    norm_res(callback(v, prefix, locations))
  File "/Applications/Sublime Text.app/Contents/MacOS/Lib/python33/sublime_plugin.py", line 129, in profiler
    return event_handler(*args)
  File "/Users/brownsugar/Library/Application Support/Sublime Text 3/Packages/tern_for_sublime/tern.py", line 68, in on_query_completions
    pathFirstCh = pathPrefix[0]
IndexError: string index out of range

I use Package Resource Viewer to debug, and I found the exception was came from https://github.com/ternjs/tern_for_sublime/blob/master/tern.py#L381
image

@othree
Copy link
Collaborator

othree commented Jun 2, 2020

Can you find any .tern-port file in the project?

@brownsugar
Copy link

@othree No, there is no config file for Tern in the project.

@othree
Copy link
Collaborator

othree commented Jun 4, 2020

@brownsugar Can you provide a sample code and steps to reproduce(including configs you added). And AFAIK latest official release of Sublime Text is version 3. How do you use ST4?

@brownsugar
Copy link

@othree
The only config I have is:

{
  "tern_argument_hints": true,
}

I think is not about the code, it happens randomly, I tested by same code in two files, one happened and the other not.
You can download ST4 from ST official Discord server.

@othree
Copy link
Collaborator

othree commented Jun 4, 2020 via email

@brownsugar
Copy link

@othree OK, I'll reply if there are more info I can provide.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants