Giter Site home page Giter Site logo

sublimejedi's Issues

Interesting output in the sublime repl

I followed your instructions to install, but all completions raise this exception:

Traceback (most recent call last):
File "./sublime_plugin.py", line 236, in on_query_completions
File "./sublime_jedi.py", line 238, in on_query_completions
File "./sublime_jedi.py", line 263, in get_completions
File "/home/accounts/nfaggian/.config/sublime-text-2/Packages/SublimeJEDI/jedi/jedi/api.py", line 253, in complete
call_def = self.get_in_function_call()
File "/home/accounts/nfaggian/.config/sublime-text-2/Packages/SublimeJEDI/jedi/jedi/api.py", line 465, in get_in_function_call
call, index = check_cache()
File "/home/accounts/nfaggian/.config/sublime-text-2/Packages/SublimeJEDI/jedi/jedi/api.py", line 446, in check_cache
part_parser = self.module.get_part_parser()
File "/home/accounts/nfaggian/.config/sublime-text-2/Packages/SublimeJEDI/jedi/jedi/modules.py", line 210, in get_part_parser
line_offset=offset)
File "/home/accounts/nfaggian/.config/sublime-text-2/Packages/SublimeJEDI/jedi/jedi/parsing.py", line 1140, in init
self.parse()
File "/home/accounts/nfaggian/.config/sublime-text-2/Packages/SublimeJEDI/jedi/jedi/parsing.py", line 1607, in parse
token_type, tok = self.next()
File "/home/accounts/nfaggian/.config/sublime-text-2/Packages/SublimeJEDI/jedi/jedi/parsing.py", line 1574, in next
self.parserline = self._current_full
AttributeError: 'PyFuzzyParser' object has no attribute '_current_full'

Jumpt to definition only gives results from system python when working on python itself.

While testing jedi on a cpython clone I noticed that I only get results from my system python installation, and not from the clone I was working on.

The file tried was cpython/Lib/distutils/dir_util.py

For the first call to is_linlk function from this module I don't even get the system suggestions.

On the other hand F12 gives me good suggestions.

Also, find usages seems to have problems with public functions, because I only get usages for private ones.

Parenthesis auto match

My parenthesis seem to auto match if I have the following in my jedy .sublime-keymap file:

    {"command": "sublime_jedi_params_autocomplete", "keys": ["("]}

It is kinda annoying because this triggers the auto complete (which is ultra awesome and works great) but for any and every parenthesis this will trigger an auto match i. e. if I'm writting and type ( automatically it will become ().

Is there any way around this?

Windows popup windows

Hi,

on Windows your plugin pops console windows while working, and this is standard workaround:

--- sublime_jedi.bak
+++ sublime_jedi.py
@@ -25,8 +25,14 @@ def get_sys_path(python_interpreter):

         :return: list
     """
-    command = [python_interpreter, '-c', "import sys; print sys.path"]
-    process = subprocess.Popen(command, shell=False, stdout=subprocess.PIPE)
+    command = [python_interpreter, '-c', "import sys; print(sys.path)"]
+    if sys.platform == "win32":
+        startupinfo = subprocess.STARTUPINFO()
+        startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW
+        process = subprocess.Popen(command, shell=False, stdout=subprocess.PIPE,
+                                   startupinfo=startupinfo)
+    else:
+        process = subprocess.Popen(command, shell=False, stdout=subprocess.PIPE)
     out = process.communicate()[0]
     sys_path = json.loads(out.replace("'", '"'))
     return sys_path

Auto-complete class' __init__ params

Just like method params are completed.

class Foo(object):
    def __init__(self, bar):
        self.bar = bar

x = Foo<caret>
# โ†“ <input '('>
x = Foo(bar=<caret>)

The plugin disables ST's buitin snippet's auto-completion

When I disable the plugin and start typing def, a quick dropdown list appears from which I get to automatically choose the def snippet and insert the following and then proceed to fill out the place-holders in it:

    def function():
        pass

But with the plugin enabled, the above snippet seems to be masked and it does not appear in the quick drop-down list!
This is tested in ST3

Numpy doesn't auto complete

Hi there,

SublimeJEDI is A great plugin. Love it! Thanks for creating it.

I encounter a problem with numpy when using SublimeJEDI, it doesn't auto complete on dot. Other libraries such as pandas does do complete, it's just numpy doesn't work.

So far I've tried quite a few things. I tested jedi library alone, it seems working for me on numpy.
I also tested the jedi library comes with the plugin, it also works.
Not exactly sure what else to try, hopefully I can get some ideas here.

I am using Mac OS 10.8.3 with SublimeText 2. Plugin version 0.6.1 and Jedi version is 0.6.0. I have Python 3 installed in a VirtualEnv. I've update the build system to use the Python3 interpreter directly.

This is the screenshot showing pandas autocompletion is working.
screen shot 2013-06-04 at 1 26 03 am

and this is showing numpy not working.
screen shot 2013-06-04 at 1 27 48 am

AttributeError: 'NoneType' object has no attribute 'get_parent_until'

Using Sublime Text 3 I got the following exception:

Traceback (most recent call last):
  File "/home/patrys/.config/sublime-text-3/Packages/SublimeJEDI/jedi/api.py", line 196, in _get_under_cursor_stmt
    stmt = r.module.statements[0]
IndexError: list index out of range

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/patrys/.config/sublime-text-3/Packages/SublimeJEDI/jedi/api.py", line 94, in complete
    scopes = list(self._prepare_goto(path, True))
  File "/home/patrys/.config/sublime-text-3/Packages/SublimeJEDI/jedi/api.py", line 188, in _prepare_goto
    stmt = self._get_under_cursor_stmt(goto_path)
  File "/home/patrys/.config/sublime-text-3/Packages/SublimeJEDI/jedi/api.py", line 198, in _get_under_cursor_stmt
    raise NotFoundError()
jedi.api.NotFoundError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/patrys/Apps/sublime_text_3/sublime_plugin.py", line 358, in on_query_completions
    res = callback.on_query_completions(v, prefix, locations)
  File "/home/patrys/.config/sublime-text-3/Packages/SublimeJEDI/sublime_jedi.py", line 291, in on_query_completions
    completions = self.get_completions(view, locations)
  File "/home/patrys/.config/sublime-text-3/Packages/SublimeJEDI/sublime_jedi.py", line 307, in get_completions
    completions = self.completions_from_script(script, view) +\
  File "/home/patrys/.config/sublime-text-3/Packages/SublimeJEDI/sublime_jedi.py", line 201, in completions_from_script
    completions = script.complete()
  File "/home/patrys/.config/sublime-text-3/Packages/SublimeJEDI/jedi/api_classes.py", line 44, in wrapper
    result = func(*args, **kwds)
  File "/home/patrys/.config/sublime-text-3/Packages/SublimeJEDI/jedi/api.py", line 100, in complete
    for scope, name_list in scope_generator:
  File "/home/patrys/.config/sublime-text-3/Packages/SublimeJEDI/jedi/evaluate.py", line 160, in get_names_of_scope
    non_flow = scope.get_parent_until(pr.Flow, reverse=True)
AttributeError: 'NoneType' object has no attribute 'get_parent_until'

Autocomplit

Plugin show window only for type 2 or more chars.
How to change this behavior to zero ?
Type dot and get list of all methods and variables for module

Somehow display the docstring during autcomplete.

This is a nice feature in the vim plugin that would be amazing to have in sublime text.

Not sure if the current sublime API is too limiting though - i.e. as a user steps through auto-complete options is there a callback that could update the view?

OSError: [Errno 2]

Autocomplete/go to definition fails with:

Traceback (most recent call last):
  File "./sublime_plugin.py", line 362, in run_
  File "./sublime_jedi.py", line 102, in run
  File "./sublime_jedi.py", line 59, in ask_daemon
  File "./utils.py", line 127, in start_daemon
  File ".\subprocess.py", line 633, in __init__
  File ".\subprocess.py", line 1139, in _execute_child
OSError: [Errno 2] File/Path Not Found

SublimeText: 2.0.2 / build 2221
Python: 2.7.3
SublimeJEDI: 0.6.4

Add support for extra python path entries.

It would be good to be able to provide (through config) a list of extra paths to be searched during completion and goto.

This would make things more similar to the "intellisense" port for sublime.

Plugin fails to load if folder named other than 'SublimeJEDI'

I downloaded package from GitHub zip which called folder SublimeJEDI-master. This broke the package

 File "C:\Users\Matt\AppData\Roaming\Sublime Text 3\Packages\SublimeJEDI-master\python_go_to.py", line 7, in   <module>
    from sublime_jedi import get_script, JediEnvMixin
ImportError: No module named 'sublime_jedi'

Better README

It's would be great if some one could improve/rewrite README file

Thanks!

Stacktrace after git pull

Traceback (most recent call last):
File "/home/accounts/nfaggian/Desktop/sublime_text_3/sublime_plugin.py", line 357, in on_query_completions
res = callback.on_query_completions(v, prefix, locations)
File "/home/accounts/nfaggian/.config/sublime-text-3/Packages/SublimeJEDI/sublime_jedi.py", line 224, in on_query_completions
completions = self.get_completions(view, locations)
File "/home/accounts/nfaggian/.config/sublime-text-3/Packages/SublimeJEDI/sublime_jedi.py", line 242, in get_completions
self.completions_from_script(script, insert_funcargs)
File "/home/accounts/nfaggian/.config/sublime-text-3/Packages/SublimeJEDI/sublime_jedi.py", line 196, in completions_from_script
completions = script.complete()
File "/home/accounts/nfaggian/.config/sublime-text-3/Packages/SublimeJEDI/jedi/api_classes.py", line 44, in wrapper
result = func(_args, *_kwds)
File "/home/accounts/nfaggian/.config/sublime-text-3/Packages/SublimeJEDI/jedi/api.py", line 94, in complete
scopes = list(self._prepare_goto(path, True))
File "/home/accounts/nfaggian/.config/sublime-text-3/Packages/SublimeJEDI/jedi/api.py", line 189, in _prepare_goto
scopes = evaluate.follow_statement(stmt)
File "/home/accounts/nfaggian/.config/sublime-text-3/Packages/SublimeJEDI/jedi/recursion.py", line 31, in call
result = self.func(stmt, _args, *_kwargs)
File "/home/accounts/nfaggian/.config/sublime-text-3/Packages/SublimeJEDI/jedi/cache.py", line 100, in wrapper
rv = function(_args, *_kwargs)
File "/home/accounts/nfaggian/.config/sublime-text-3/Packages/SublimeJEDI/jedi/evaluate.py", line 584, in follow_statement
result = follow_call_list(commands)
File "/home/accounts/nfaggian/.config/sublime-text-3/Packages/SublimeJEDI/jedi/common.py", line 55, in wrapper
return func(_args, *_kwds)
File "/home/accounts/nfaggian/.config/sublime-text-3/Packages/SublimeJEDI/jedi/evaluate.py", line 657, in follow_call_list
result += follow_call(call)
File "/home/accounts/nfaggian/.config/sublime-text-3/Packages/SublimeJEDI/jedi/evaluate.py", line 675, in follow_call
return follow_call_path(path, s.parent, s.start_pos)
File "/home/accounts/nfaggian/.config/sublime-text-3/Packages/SublimeJEDI/jedi/evaluate.py", line 698, in follow_call_path
result = imports.strip_imports(scopes)
File "/home/accounts/nfaggian/.config/sublime-text-3/Packages/SublimeJEDI/jedi/imports.py", line 321, in strip_imports
result += ImportPath(s).follow()
File "/home/accounts/nfaggian/.config/sublime-text-3/Packages/SublimeJEDI/jedi/imports.py", line 188, in follow
scope, rest = self._follow_file_system()
File "/home/accounts/nfaggian/.config/sublime-text-3/Packages/SublimeJEDI/jedi/imports.py", line 258, in _follow_file_system
sys_path_mod = list(self.sys_path_with_modifications())
File "/home/accounts/nfaggian/.config/sublime-text-3/Packages/SublimeJEDI/jedi/imports.py", line 176, in sys_path_with_modifications
return in_path + modules.sys_path_with_modifications(module)
File "/home/accounts/nfaggian/.config/sublime-text-3/Packages/SublimeJEDI/jedi/cache.py", line 100, in wrapper
rv = function(_args, *_kwargs)
File "/home/accounts/nfaggian/.config/sublime-text-3/Packages/SublimeJEDI/jedi/modules.py", line 350, in sys_path_with_modifications
curdir = os.path.abspath(os.curdir)
File "X/posixpath.py", line 383, in abspath
FileNotFoundError: [Errno 2] No such file or directory

Add Auto Import Feature

It would be nice after auto completing something to have the option to auto import it as well.

Incorrect GoTo behavioir

# imports goes here ....

class Place(models.Model):
    title = models.CharField(_(u'title'), max_length=200)

    def __unicode__(self):
        return self.ti<cursor>tle

Press "Ctrl+Shift+g"

Expect

# imports goes here ....

class Place(models.Model):
    <cursor>title = models.CharField(_(u'title'), max_length=200)

    def __unicode__(self):
        return self.title

Actual
django CharField definition opened

UnicodeEncodeError

2013-06-21 10:47:41,101: ERROR   : failed to process line
Traceback (most recent call last):
  File "jedi_daemon.py", line 292, in <module>
    process_line(line)
  File "jedi_daemon.py", line 231, in process_line
    action_type: JediFacade(**data).get(action_type)
  File "jedi_daemon.py", line 111, in get
    return getattr(self, 'get_' + action)()
  File "jedi_daemon.py", line 127, in get_autocomplete
    data = self._parameters_for_completion() or []
  File "jedi_daemon.py", line 138, in _parameters_for_completion
    in_call = self.script.call_signatures()[0]
  File "/storage/PythonProjects/SublimeJEDI/jedi/api_classes.py", line 44, in wrapper
    result = func(*args, **kwds)
  File "/storage/PythonProjects/SublimeJEDI/jedi/api.py", line 448, in call_signatures
    call, index = self._func_call_and_param_index()
  File "/storage/PythonProjects/SublimeJEDI/jedi/api.py", line 464, in _func_call_and_param_index
    user_stmt = self._parser.user_stmt
  File "/storage/PythonProjects/SublimeJEDI/jedi/api.py", line 75, in _parser
    return self._module.parser
  File "/storage/PythonProjects/SublimeJEDI/jedi/modules.py", line 116, in parser
    self.position)
  File "/storage/PythonProjects/SublimeJEDI/jedi/fast_parser.py", line 73, in __call__
    p.update(source, user_position)
  File "/storage/PythonProjects/SublimeJEDI/jedi/fast_parser.py", line 224, in update
    self._parse(code)
  File "/storage/PythonProjects/SublimeJEDI/jedi/fast_parser.py", line 333, in _parse
    line_offset, nodes, not is_first)
  File "/storage/PythonProjects/SublimeJEDI/jedi/fast_parser.py", line 396, in _get_parser
    no_docstr=no_docstr)
  File "/storage/PythonProjects/SublimeJEDI/jedi/parsing.py", line 68, in __init__
    self._parse()
  File "/storage/PythonProjects/SublimeJEDI/jedi/parsing.py", line 671, in _parse
    stmt, tok = self._parse_statement(self.current)
  File "/storage/PythonProjects/SublimeJEDI/jedi/parsing.py", line 366, in _parse_statement
    n, token_type, tok = self._parse_dot_name(self.current)
  File "/storage/PythonProjects/SublimeJEDI/jedi/parsing.py", line 151, in _parse_dot_name
    n = pr.Name(self.module, names, first_pos, self.end_pos) if names \
  File "/storage/PythonProjects/SublimeJEDI/jedi/parsing_representation.py", line 1344, in __init__
    NamePart(n[0], self, n[1]) for n in names)
  File "/storage/PythonProjects/SublimeJEDI/jedi/parsing_representation.py", line 1344, in <genexpr>
    NamePart(n[0], self, n[1]) for n in names)
  File "/storage/PythonProjects/SublimeJEDI/jedi/parsing_representation.py", line 1314, in __new__
    self = super(NamePart, cls).__new__(cls, s)
UnicodeEncodeError: 'ascii' codec can't encode character u'\u0434' in position 10: ordinal not in range(128)

Nothing happen and no error reported

Hello,

I installed SublimeJedi through Package Control but it seems like the plugin is doing nothing.

No matter what I try to set in the settings, the plugin simply stay silent, don't work and don't report errors either...

Is there something I can do to at least get some logs or error and trying to understand what is going wrong?

I'm a windows 7 and I trying to autocomplete with python2.6

How to install and use SublimeJedi ?

Could we have a step by step tutorial to have it working ?

So far I did:

git clone https://github.com/svaiter/SublimeJEDI.git /home/sam/.config/sublime-text-2/Packages/
cd SublimeJedit
git submodule init
git submodule update

Then I added this to my sublime-project file:

"settings": 
{
    "auto_complete_on_dot": true,
    "python_interpreter_path": "/home/sam/.virtualenvs/test/bin/python"
}

I do see SublimeJedi in the "Preferences > Packages settings" menu so I assume it's loaded.

However, typing "." does not trigger anything.

I'm on Ubuntu 12.04

trigger indexing

It seems I can only get the plugin to work if I have a ST project setup.
Is there any manual way of triggering JEDI to work without having to setup a project in Sublime?

incorrect parameters completion

def test(a1, a2, a3):
    pass


def test2(b1, b2):
    pass

After ( presed

test(a1, a2, a3)

selected a1 replaced on test2(

Actual:

test(test2(a1, a2, a3), a2, a3)

Ecpected:

test(test2(b1, b2), a2, a3)

function kwargs completion improvement

Does parameter name required in completion?

func(param1=<caret>, param2=, param3=None)

Maybe better drop parameter name for required params ?

func(<caret>, , param3=None)

or keep parameters' names in selection block

func(<selection "param1">, param2, param3=None)

Unable to use package after install (Fix inside)

Hi. I tested to install this package from the instructions in the README and the install part is ok and i can find the SublimeJEDI package in my sublime-text-2\Packages folder.
When i try to use any of the functionality (Ctrl + B or . autocompletion) the sublime console/log says the following

Traceback (most recent call last):
File "./sublime_plugin.py", line 236, in on_query_completions
File "./sublime_jedi.py", line 254, in on_query_completions
File "./sublime_jedi.py", line 278, in get_completions
File "./sublime_jedi.py", line 77, in get_script
ImportError: No module named jedi
Traceback (most recent call last):
File "./sublime_jedi.py", line 218, in delayed_complete
File "./sublime_jedi.py", line 77, in get_script
ImportError: No module named jedi

After some digging the issue could be the set path with sublime2

If you try in a python interpreter python 2.7.3

import sys
sys.path.append("/home/$USER$/.config/sublime-text-2/Packages/SublimeJEDI/jedi")
import jedi
Traceback (most recent call last):
File "", line 1, in
ImportError: No module named jedi

How to fix this is to change the path that is set to 1 folder above the currently set path

import sys
sys.path.append("/home/$USER$/.config/sublme-text-2/Packages/SublimeJEDI/")
import jedi

Now the import is working proper and i can use the functionality of SublimeJEDI

Can't multi-select using Ctrl+LeftClick/LeftDblClick after installing SublimeJEDI

The default setting in ~/.config/sublime-text-3/Packages/SublimeJEDI/Default.sublime-mousemap, disables the ability of multi-selections using the mouse. I can't find a way to "unset" this "mousemap" setting.

[
    {
        "modifiers": ["ctrl"], "button": "button1", 
        "command": "sublime_jedi_goto",
        "press_command": "drag_select"
    }
]

Commenting this enables multiselection by clicking again.

jedi.common.UncaughtAttributeError: 'NoneType' object has no attribute 'isinstance'

Traceback (most recent call last):
  File "/home/patrys/.config/sublime-text-3/Packages/SublimeJEDI/jedi/common.py", line 55, in wrapper
    return func(*args, **kwds)
  File "/home/patrys/.config/sublime-text-3/Packages/SublimeJEDI/jedi/evaluate.py", line 657, in follow_call_list
    result += follow_call(call)
  File "/home/patrys/.config/sublime-text-3/Packages/SublimeJEDI/jedi/evaluate.py", line 673, in follow_call
    while not s.parent.isinstance(pr.IsScope):
AttributeError: 'NoneType' object has no attribute 'isinstance'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/patrys/Apps/sublime_text_3/sublime_plugin.py", line 358, in on_query_completions
    res = callback.on_query_completions(v, prefix, locations)
  File "/home/patrys/.config/sublime-text-3/Packages/SublimeJEDI/sublime_jedi.py", line 291, in on_query_completions
    completions = self.get_completions(view, locations)
  File "/home/patrys/.config/sublime-text-3/Packages/SublimeJEDI/sublime_jedi.py", line 307, in get_completions
    completions = self.completions_from_script(script, view) +\
  File "/home/patrys/.config/sublime-text-3/Packages/SublimeJEDI/sublime_jedi.py", line 201, in completions_from_script
    completions = script.complete()
  File "/home/patrys/.config/sublime-text-3/Packages/SublimeJEDI/jedi/api_classes.py", line 44, in wrapper
    result = func(*args, **kwds)
  File "/home/patrys/.config/sublime-text-3/Packages/SublimeJEDI/jedi/api.py", line 94, in complete
    scopes = list(self._prepare_goto(path, True))
  File "/home/patrys/.config/sublime-text-3/Packages/SublimeJEDI/jedi/api.py", line 189, in _prepare_goto
    scopes = evaluate.follow_statement(stmt)
  File "/home/patrys/.config/sublime-text-3/Packages/SublimeJEDI/jedi/recursion.py", line 31, in __call__
    result = self.func(stmt, *args, **kwargs)
  File "/home/patrys/.config/sublime-text-3/Packages/SublimeJEDI/jedi/cache.py", line 100, in wrapper
    rv = function(*args, **kwargs)
  File "/home/patrys/.config/sublime-text-3/Packages/SublimeJEDI/jedi/evaluate.py", line 584, in follow_statement
    result = follow_call_list(commands)
  File "/home/patrys/.config/sublime-text-3/Packages/SublimeJEDI/jedi/common.py", line 58, in wrapper
    reraise(UncaughtAttributeError(exc_info[1]), exc_info[2])
  File "/home/patrys/.config/sublime-text-3/Packages/SublimeJEDI/jedi/_compatibility.py", line 145, in reraise
    raise exception.with_traceback(traceback)
  File "/home/patrys/.config/sublime-text-3/Packages/SublimeJEDI/jedi/common.py", line 55, in wrapper
    return func(*args, **kwds)
  File "/home/patrys/.config/sublime-text-3/Packages/SublimeJEDI/jedi/evaluate.py", line 657, in follow_call_list
    result += follow_call(call)
  File "/home/patrys/.config/sublime-text-3/Packages/SublimeJEDI/jedi/evaluate.py", line 673, in follow_call
    while not s.parent.isinstance(pr.IsScope):
jedi.common.UncaughtAttributeError: 'NoneType' object has no attribute 'isinstance'

SublimeJEDI disables adding parentheses around highlighted text

I'm not sure if this is related to #65 or not, but I've noticed that when I have SublimeJEDI enabled I cannot highlight text, hit (, and then have ST3 surround the text in parentheses like you normally can. Instead, SublimeJEDI inserts a matched pair of parentheses at the end of the highlighted text. I ended up disabling SublimeJEDI because I use this feature of ST so frequently and couldn't figure out a quick workaround for it.

Highlighting and then pressing [ or { works as expected.

Error Appeared after #51

Traceback (most recent call last):
  File "jedi_daemon.py", line 287, in <module>
    process_line(line)
  File "jedi_daemon.py", line 226, in process_line
    action_type: JediFacade(**data).get(action_type)
  File "jedi_daemon.py", line 105, in get
    return getattr(self, 'get_' + action)()
  File "jedi_daemon.py", line 109, in get_goto
    return self._goto()
  File "jedi_daemon.py", line 169, in _goto
    if definitions[0].type == 'import':
IndexError: list index out of range

Can not install througth Package Manager

Hi

I'm trying to install SublimeJEDI through Packager Manager, but without success.
Here is the Console ouput:

ignored packages updated to: [Vintage, SublimeJEDI]
found 1 files for base name Default.sublime-theme
reloading /C/Users/yeradis/AppData/Roaming/Sublime Text 2/Packages/User/Preferences.sublime-settings
theme loaded
found 1 files for base name Default.sublime-theme
theme loaded
Exception in thread Thread-20:
Traceback (most recent call last):
File ".\threading.py", line 532, in __bootstrap_inner
File ".\Package Control.py", line 4032, in run
File ".\Package Control.py", line 3181, in install_package
File ".\Package Control.py", line 2695, in download_url
File ".\Package Control.py", line 1683, in download
File ".\Package Control.py", line 1414, in check_certs
File ".\Package Control.py", line 1451, in locate_cert
File ".\Package Control.py", line 1478, in download_cert
NameError: global name 'domain' is not defined

ignored packages updated to: [Vintage]
found 1 files for base name Default.sublime-theme
reloading /C/Users/yeradis/AppData/Roaming/Sublime Text 2/Packages/User/Preferences.sublime-settings
theme loaded
found 1 files for base name Default.sublime-theme
theme loaded

Regards

IndexError in Jedi

2013-06-21 10:33:21,639: ERROR   : failed to process line
Traceback (most recent call last):
  File "jedi_daemon.py", line 292, in <module>
    process_line(line)
  File "jedi_daemon.py", line 231, in process_line
    action_type: JediFacade(**data).get(action_type)
  File "jedi_daemon.py", line 111, in get
    return getattr(self, 'get_' + action)()
  File "jedi_daemon.py", line 115, in get_goto
    return self._goto()
  File "jedi_daemon.py", line 172, in _goto
    definitions = self.script.goto_assignments()
  File "/storage/PythonProjects/SublimeJEDI/jedi/api_classes.py", line 44, in wrapper
    result = func(*args, **kwds)
  File "/storage/PythonProjects/SublimeJEDI/jedi/api.py", line 340, in goto_assignments
    d = [api_classes.Definition(d) for d in set(self._goto()[0])]
  File "/storage/PythonProjects/SublimeJEDI/jedi/api.py", line 366, in _goto
    if next(context) in ('class', 'def'):
  File "/storage/PythonProjects/SublimeJEDI/jedi/modules.py", line 222, in get_context
    while pos[1] > 0 and line[pos[1] - 1].isspace():
IndexError: string index out of range

Package Control installation in ST3

I am just updating Package Control to the official ST3 version and tried to install this package as it is nice to have for my Python work. However, you guys aren't showing up in the Package Control repo anywhere. I ended up having to install the plugin manually.

Is this a bug?

Exception in daemon on ST2

Exception in thread Thread-2:
Traceback (most recent call last):
  File ".\threading.py", line 532, in __bootstrap_inner
  File ".\utils.py", line 44, in run
    self.call_callback(data)
  File ".\utils.py", line 56, in call_callback
    for window in sublime.windows():
RuntimeError: Must call on main thread, consider using sublime.set_timeout(function, timeout)

Find Usage Error:jedi.api.NotFoundError

Actually , i can't use the 'Find Usage' at all

Traceback (most recent call last):
File "./sublime_plugin.py", line 362, in run_
File "./python_go_to.py", line 149, in run
usages = self.find_usages()
File "./python_go_to.py", line 154, in find_usages
return related_names(self.view)
File "./python_go_to.py", line 50, in related_names
related_names = script.related_names()
File "/home/pan/.config/sublime-text-2/Packages/SublimeJEDI/jedi/api_classes.py", line 44, in wrapper
result = func(_args, *_kwds)
File "/home/pan/.config/sublime-text-2/Packages/SublimeJEDI/jedi/api.py", line 351, in related_names
definitions, search_name = self._goto(add_import_name=True)
File "/home/pan/.config/sublime-text-2/Packages/SublimeJEDI/jedi/api.py", line 328, in _goto
stmt = self._get_under_cursor_stmt(goto_path)
File "/home/pan/.config/sublime-text-2/Packages/SublimeJEDI/jedi/api.py", line 198, in _get_under_cursor_stmt
raise NotFoundError()
jedi.api.NotFoundError

Make "Find Usages" relative to the project root

"Find Usages" returns absolute paths, which with a deeply nested directory structure results in path truncation. As the prefix to the project root is not helpful it would be clearer to return the paths trimmed to the project root of the various folder paths in .sublime-project.

PermissionError: [WinError 5] Access is denied

I'm getting this error whenever I type anything, no JEDI auto-completion working.

Traceback (most recent call last):
  File "X/subprocess.py", line 1090, in _execute_child
PermissionError: [WinError 5] Access is denied

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Program Files\Sublime Text 3\sublime_plugin.py", line 358, in on_query_completions
    res = callback.on_query_completions(v, prefix, locations)
  File "C:\Users\Mitch\AppData\Roaming\Sublime Text 3\Packages\Jedi - Python autocompetion\sublime_jedi.py", line 180, in on_query_completions
    ask_daemon(view, self.show_completions, 'autocomplete', locations[0])
  File "C:\Users\Mitch\AppData\Roaming\Sublime Text 3\Packages\Jedi - Python autocompetion\sublime_jedi.py", line 59, in ask_daemon
    complete_funcargs=get_settings_param(view, 'auto_complete_function_params', 'all'),
  File "C:\Users\Mitch\AppData\Roaming\Sublime Text 3\Packages\Jedi - Python autocompetion\utils.py", line 127, in start_daemon
    process = subprocess.Popen(sub_args, **sub_kwargs)
  File "X/subprocess.py", line 818, in __init__
  File "X/subprocess.py", line 1096, in _execute_child
PermissionError: [WinError 5] Access is denied

Pycharm like autocomplete description

Screen Shot 2013-01-05 at 4 36 17 PM
Screen Shot 2013-01-05 at 4 38 09 PM

In Pycharm I like only autocomplete. So, would be nice, if we export some cool feature from it.

When I type "ma" I see "management", but don't really understand, where I've got it.
In Pycharm I see "django.core".

In jedi I found only next:

In [9]: script.get_definition()
Out[9]: [<Definition module management>, <Definition keyword import>]

In [10]: aaa = script.get_definition()[0]

In [11]: aaa
Out[11]: <Definition module management>

In [12]: aaa.
aaa.column             aaa.full_name          aaa.module_path
aaa.definition         aaa.in_builtin_module  aaa.path
aaa.desc_with_module   aaa.is_keyword         aaa.raw_doc
aaa.description        aaa.line_nr            aaa.start_pos
aaa.doc                aaa.module_name        aaa.type

In [12]: aaa.full_name
Out[12]: 'management'

P.S. I've removed SublimeCodeIntel for pure testing SublimeJEDI.

SublimeJEDI won't work with ST3 3047

I've installed sublimeJEDI, but haven't been able to make it work, it won't complete on import statements nor on function calls.

My sublime_jedi.sublime-settings file look like this:

{
    // we will use it to get PYTHONPATH for interpreter
    // You cat set a path to your virtualenv
    "python_interpreter_path": "/Library/Frameworks/Python.framework/Versions/2.7/bin/python",

    // additional python package path list
     "python_package_paths": ["/Users/eldeveloper/git_sw/qiime/",
                                "/Users/eldeveloper/git_sw/emperor/",
                                "/Users/eldeveloper/git_sw/pynast/",
                                "/Users/eldeveloper/git_sw/evident/",
                                "/Users/eldeveloper/svn_sw/PyCogent/",
                                "/Users/eldeveloper/git_sw/biom-format/python-code"
],

    // "all" - insert all function arguments on autocomplete
    // "required" - insert arguments that dont have default value (e.g. required)
    // "" - dont insert any arguments
    "auto_complete_function_params": "required"

}

Default.sublime-keymap

[
    {"command": "sublime_jedi_goto", "keys": ["ctrl+shift+g"]},
    {"command": "sublime_jedi_find_usages", "keys": ["alt+shift+f"]},
    {"command": "sublime_jedi_params_autocomplete", "keys": ["("]}
]

Default.sublime-mousemap

[
    {
        "modifiers": ["ctrl"], "button": "button1", 
        "command": "sublime_jedi_goto",
        "press_command": "drag_select"
    }
]

I'm running OSX 10.8.4. If this is because I'm missing something, I apologize in advance.


I also haven't found any documentation on how the package is supposed to work, would be good to have something, but that's a separate issue.

Better key-binding for "goto" command

@nfaggian noted that "ctrl+b" is a bit bad choice for "goto" command, and I had same thoughts about this too.

So I have couple ideas for new key-bindings.

Please vote up for options that you like. If you have own thoughts, please, wrote them below

import modules autocomplete in unnamed file

When trying to autocomplete an import statement (i.e. getting the list of importable modules) in an unnamed file the plugin raises an AttributeError in the function sys_path_with_modifications in the jedi/imports.py file because self.file_path is None.

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.