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

Error gathering command completions #271

Closed
OdatNurd opened this issue Dec 3, 2019 · 1 comment
Closed

Error gathering command completions #271

OdatNurd opened this issue Dec 3, 2019 · 1 comment
Labels
Milestone

Comments

@OdatNurd
Copy link

OdatNurd commented Dec 3, 2019

Description

Using Sublime build 4057, PackageDev generates a traceback error while generating the list of commands for use in the autocomplete panel while editing a plugin, which results in no commands being present. The same issue does not present itself when entering the command in a key binding.

Steps to reproduce

  1. Use Tools > Developer > New Plugin... from the menu and save the stub plugin
  2. Add a self.view.run_command("") line to the body of the command
  3. Trigger the AC panel in the string argument to run_command() (if it doesn't automatically trigger while entering the line)

When the autocomplete triggers, the traceback below is generated, which results in the AC panel containing only words from the buffer.

Traceback (most recent call last):
  File "/tmp/bob/sublime_text_4057/Lib/python33/sublime_plugin.py", line 893, in on_query_completions
    norm_res(callback(v, prefix, locations))
  File "/tmp/bob/sublime_text_4057/Lib/python33/sublime_plugin.py", line 129, in profiler
    return event_handler(*args)
  File "/tmp/bob/sublime_text_4057/Data/Installed Packages/PackageDev.sublime-package/plugins_/command_completions/__init__.py", line 165, in on_query_completions
    for c in get_builtin_commands(command_type)
  File "/tmp/bob/sublime_text_4057/Data/Installed Packages/PackageDev.sublime-package/plugins_/command_completions/__init__.py", line 165, in <genexpr>
    for c in get_builtin_commands(command_type)
  File "/tmp/bob/sublime_text_4057/Data/Installed Packages/PackageDev.sublime-package/plugins_/command_completions/__init__.py", line 115, in _create_builtin_completion
    .format(c=c, stype=meta[c].get("command_type", " ")[:1].upper()))
TypeError: tuple indices must be integers, not str

This seems to be the case from builds 4050 through to 4057, as tested in a portable copy containing only Package Control and PackageDev.

As an additional note, in key bindings this problem does not seem to occur, although it doesn't show commands from any of the default packages (e.g. exec). I would imagine that this is a result of the shipped packages running in the 3.8 plugin host by default though.

@FichteFoll
Copy link
Member

I have trouble reproducing this issue. So much that I don't see any completions provided by PD, nor an exception or log message in the console. I don't know what's going on yet, but something is definitely broken.

@FichteFoll FichteFoll added this to the 3.2.15 milestone Dec 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants