julianeberius / sublimepythonide Goto Github PK
View Code? Open in Web Editor NEWST3 only: A rewrite of SublimeRope for ST3, uses the Rope library to add python completions and refactoring to ST3
License: GNU General Public License v2.0
ST3 only: A rewrite of SublimeRope for ST3, uses the Rope library to add python completions and refactoring to ST3
License: GNU General Public License v2.0
Mainly I am interested in being able to run the server external to sublime in a debug mode. Is there existing support for this in config or should I add it?
Is there a way to disable pep8 on the fly right now without manually editing preferences?
This would be a nice to have for browsing old files that may not comply with PEP8.
It would be great if we could customize SPIDE to ignore linter errors on lines, or per module, if it detects comments matching a certain regex.
For example, flake8 will ignore modules having # flake8: noqa
in the module, or a line having # noqa
on it.
Does anything like this currently exist in SPIDE?
If you disable gutter marks on SublimePythonIDE configuration file linting stop working at all cos "gutter_mark_image" is referenced before define it.
SublimePythonIDE used to give no issues. After what appeared to be an update, it now hangs after half an hour until ps ax |grep plugin_host | awk '{print $1}' | xargs kill -9
is executed.
Traceback (most recent call last): File "/Users/bjolit/Library/Application Support/Sublime Text 3/Packages/SublimePythonIDE/sublime_python.py", line 170, in send_heartbeat self.proxy.heartbeat() File "X/xmlrpc/client.py", line 1090, in __call__ File "X/xmlrpc/client.py", line 1419, in __request File "X/xmlrpc/client.py", line 1132, in request File "X/xmlrpc/client.py", line 1143, in single_request File "X/xmlrpc/client.py", line 1248, in send_request File "X/http/client.py", line 932, in putrequest http.client.CannotSendRequest: Request-sent
Using the latest version, on Windows XP.
When trying to test the autocomplete functionality, I get (using SERVER_DEBUGGING = True):
started server on port 2161 with C:\Python27\python.exe IN DEBUG MODE
SublimePythonIDE: No server respose
'NoneType' object has no attribute 'data'
started server on port 2163 with C:\Python27\python.exe IN DEBUG MODE
Server on port 2163 - STDERR: b'SublimePythonIDE Server is starting in Debug mode\r\n'
Server on port 2163 - STDERR: b'SublimePythonIDE Server is called: completions\r\n'
Server on port 2163 - STDERR: b'Traceback (most recent call last):\r\n'
Server on port 2163 - STDERR: b' File "C:\\Sublime Text Build 3047\\Data\\Packages\\SublimePythonIDE\\server\\server.py", line 134, in completions\r\n'
Server on port 2163 - STDERR: b' project, source, loc, resource=resource, maxfixes=3)\r\n'
Server on port 2163 - STDERR: b' File "C:\\Sublime Text Build 3047\\Data\\Packages\\SublimePythonIDE\\server\\..\\lib\\python2\\rope\\contrib\\codeassist.py", line 33, in code_assist\r\n'
Server on port 2163 - STDERR: b' return assist()\r\n'
Server on port 2163 - STDERR: b' File "C:\\Sublime Text Build 3047\\Data\\Packages\\SublimePythonIDE\\server\\..\\lib\\python2\\rope\\contrib\\codeassist.py", line 335, in __call__\r\n'
Server on port 2163 - STDERR: b' completions = list(self._code_completions().values())\r\n'
Server on port 2163 - STDERR: b' File "C:\\Sublime Text Build 3047\\Data\\Packages\\SublimePythonIDE\\server\\..\\lib\\python2\\rope\\contrib\\codeassist.py", line 403, in _code_completions\r\n'
Server on port 2163 - STDERR: b' pymodule = fixer.get_pymodule()\r\n'
Server on port 2163 - STDERR: b' File "C:\\Sublime Text Build 3047\\Data\\Packages\\SublimePythonIDE\\server\\..\\lib\\python2\\rope\\base\\utils.py", line 10, in _wrapper\r\n'
Server on port 2163 - STDERR: b' setattr(self, name, func(self, *args, **kwds))\r\n'
Server on port 2163 - STDERR: b' File "C:\\Sublime Text Build 3047\\Data\\Packages\\SublimePythonIDE\\server\\..\\lib\\python2\\rope\\contrib\\fixsyntax.py", line 24, in get_pymodule\r\n'
Server on port 2163 - STDERR: b' self.resource.read() == code:\r\n'
Server on port 2163 - STDERR: b' File "C:\\Sublime Text Build 3047\\Data\\Packages\\SublimePythonIDE\\server\\..\\lib\\python2\\rope\\base\\resources.py", line 81, in read\r\n'
Server on port 2163 - STDERR: b' data = self.read_bytes()\r\n'
Server on port 2163 - STDERR: b' File "C:\\Sublime Text Build 3047\\Data\\Packages\\SublimePythonIDE\\server\\..\\lib\\python2\\rope\\base\\resources.py", line 88, in read_bytes\r\n'
Server on port 2163 - STDERR: b" return open(self.real_path, 'rb').read()\r\n"
Server on port 2163 - STDERR: b"IOError: [Errno 13] Permission denied: 'c:\\\\docume~1\\\\oscarl\\\\config~1\\\\temp\\\\tmpmt7hm7'\r\n"
Server on port 2163 - STDERR: b'SublimePythonIDE Server is called: completions\r\n'
Server on port 2163 - STDERR: b'Traceback (most recent call last):\r\n'
Server on port 2163 - STDERR: b' File "C:\\Sublime Text Build 3047\\Data\\Packages\\SublimePythonIDE\\server\\server.py", line 134, in completions\r\n'
Server on port 2163 - STDERR: b' project, source, loc, resource=resource, maxfixes=3)\r\n'
Server on port 2163 - STDERR: b' File "C:\\Sublime Text Build 3047\\Data\\Packages\\SublimePythonIDE\\server\\..\\lib\\python2\\rope\\contrib\\codeassist.py", line 33, in code_assist\r\n'
Server on port 2163 - STDERR: b' return assist()\r\n'
Server on port 2163 - STDERR: b' File "C:\\Sublime Text Build 3047\\Data\\Packages\\SublimePythonIDE\\server\\..\\lib\\python2\\rope\\contrib\\codeassist.py", line 335, in __call__\r\n'
Server on port 2163 - STDERR: b' completions = list(self._code_completions().values())\r\n'
Server on port 2163 - STDERR: b' File "C:\\Sublime Text Build 3047\\Data\\Packages\\SublimePythonIDE\\server\\..\\lib\\python2\\rope\\contrib\\codeassist.py", line 403, in _code_completions\r\n'
Server on port 2163 - STDERR: b' pymodule = fixer.get_pymodule()\r\n'
Server on port 2163 - STDERR: b' File "C:\\Sublime Text Build 3047\\Data\\Packages\\SublimePythonIDE\\server\\..\\lib\\python2\\rope\\base\\utils.py", line 10, in _wrapper\r\n'
Server on port 2163 - STDERR: b' setattr(self, name, func(self, *args, **kwds))\r\n'
Server on port 2163 - STDERR: b' File "C:\\Sublime Text Build 3047\\Data\\Packages\\SublimePythonIDE\\server\\..\\lib\\python2\\rope\\contrib\\fixsyntax.py", line 24, in get_pymodule\r\n'
Server on port 2163 - STDERR: b' self.resource.read() == code:\r\n'
Server on port 2163 - STDERR: b' File "C:\\Sublime Text Build 3047\\Data\\Packages\\SublimePythonIDE\\server\\..\\lib\\python2\\rope\\base\\resources.py", line 81, in read\r\n'
Server on port 2163 - STDERR: b' data = self.read_bytes()\r\n'
Server on port 2163 - STDERR: b' File "C:\\Sublime Text Build 3047\\Data\\Packages\\SublimePythonIDE\\server\\..\\lib\\python2\\rope\\base\\resources.py", line 88, in read_bytes\r\n'
Server on port 2163 - STDERR: b" return open(self.real_path, 'rb').read()\r\n"
Server on port 2163 - STDERR: b"IOError: [Errno 13] Permission denied: 'c:\\\\docume~1\\\\oscarl\\\\config~1\\\\temp\\\\tmpl3lr50'\r\n"
Server on port 2163 - STDERR: b'SublimePythonIDE Server is called: completions\r\n'
Server on port 2163 - STDERR: b'Traceback (most recent call last):\r\n'
Server on port 2163 - STDERR: b' File "C:\\Sublime Text Build 3047\\Data\\Packages\\SublimePythonIDE\\server\\server.py", line 134, in completions\r\n'
Server on port 2163 - STDERR: b' project, source, loc, resource=resource, maxfixes=3)\r\n'
Server on port 2163 - STDERR: b' File "C:\\Sublime Text Build 3047\\Data\\Packages\\SublimePythonIDE\\server\\..\\lib\\python2\\rope\\contrib\\codeassist.py", line 33, in code_assist\r\n'
Server on port 2163 - STDERR: b' return assist()\r\n'
Server on port 2163 - STDERR: b' File "C:\\Sublime Text Build 3047\\Data\\Packages\\SublimePythonIDE\\server\\..\\lib\\python2\\rope\\contrib\\codeassist.py", line 335, in __call__\r\n'
Server on port 2163 - STDERR: b' completions = list(self._code_completions().values())\r\n'
Server on port 2163 - STDERR: b' File "C:\\Sublime Text Build 3047\\Data\\Packages\\SublimePythonIDE\\server\\..\\lib\\python2\\rope\\contrib\\codeassist.py", line 403, in _code_completions\r\n'
Server on port 2163 - STDERR: b' pymodule = fixer.get_pymodule()\r\n'
Server on port 2163 - STDERR: b' File "C:\\Sublime Text Build 3047\\Data\\Packages\\SublimePythonIDE\\server\\..\\lib\\python2\\rope\\base\\utils.py", line 10, in _wrapper\r\n'
Server on port 2163 - STDERR: b' setattr(self, name, func(self, *args, **kwds))\r\n'
Server on port 2163 - STDERR: b' File "C:\\Sublime Text Build 3047\\Data\\Packages\\SublimePythonIDE\\server\\..\\lib\\python2\\rope\\contrib\\fixsyntax.py", line 24, in get_pymodule\r\n'
Server on port 2163 - STDERR: b' self.resource.read() == code:\r\n'
Server on port 2163 - STDERR: b' File "C:\\Sublime Text Build 3047\\Data\\Packages\\SublimePythonIDE\\server\\..\\lib\\python2\\rope\\base\\resources.py", line 81, in read\r\n'
Server on port 2163 - STDERR: b' data = self.read_bytes()\r\n'
Server on port 2163 - STDERR: b' File "C:\\Sublime Text Build 3047\\Data\\Packages\\SublimePythonIDE\\server\\..\\lib\\python2\\rope\\base\\resources.py", line 88, in read_bytes\r\n'
Server on port 2163 - STDERR: b" return open(self.real_path, 'rb').read()\r\n"
Server on port 2163 - STDERR: b"IOError: [Errno 13] Permission denied: 'c:\\\\docume~1\\\\oscarl\\\\config~1\\\\temp\\\\tmptin9y5'\r\n"
Server on port 2163 - STDERR: b'SublimePythonIDE Server is called: completions\r\n'
Server on port 2163 - STDERR: b'Traceback (most recent call last):\r\n'
Server on port 2163 - STDERR: b' File "C:\\Sublime Text Build 3047\\Data\\Packages\\SublimePythonIDE\\server\\server.py", line 134, in completions\r\n'
Server on port 2163 - STDERR: b' project, source, loc, resource=resource, maxfixes=3)\r\n'
Server on port 2163 - STDERR: b' File "C:\\Sublime Text Build 3047\\Data\\Packages\\SublimePythonIDE\\server\\..\\lib\\python2\\rope\\contrib\\codeassist.py", line 33, in code_assist\r\n'
Server on port 2163 - STDERR: b' return assist()\r\n'
Server on port 2163 - STDERR: b' File "C:\\Sublime Text Build 3047\\Data\\Packages\\SublimePythonIDE\\server\\..\\lib\\python2\\rope\\contrib\\codeassist.py", line 335, in __call__\r\n'
Server on port 2163 - STDERR: b' completions = list(self._code_completions().values())\r\n'
Server on port 2163 - STDERR: b' File "C:\\Sublime Text Build 3047\\Data\\Packages\\SublimePythonIDE\\server\\..\\lib\\python2\\rope\\contrib\\codeassist.py", line 403, in _code_completions\r\n'
Server on port 2163 - STDERR: b' pymodule = fixer.get_pymodule()\r\n'
Server on port 2163 - STDERR: b' File "C:\\Sublime Text Build 3047\\Data\\Packages\\SublimePythonIDE\\server\\..\\lib\\python2\\rope\\base\\utils.py", line 10, in _wrapper\r\n'
Server on port 2163 - STDERR: b' setattr(self, name, func(self, *args, **kwds))\r\n'
Server on port 2163 - STDERR: b' File "C:\\Sublime Text Build 3047\\Data\\Packages\\SublimePythonIDE\\server\\..\\lib\\python2\\rope\\contrib\\fixsyntax.py", line 24, in get_pymodule\r\n'
Server on port 2163 - STDERR: b' self.resource.read() == code:\r\n'
Server on port 2163 - STDERR: b' File "C:\\Sublime Text Build 3047\\Data\\Packages\\SublimePythonIDE\\server\\..\\lib\\python2\\rope\\base\\resources.py", line 81, in read\r\n'
Server on port 2163 - STDERR: b' data = self.read_bytes()\r\n'
Server on port 2163 - STDERR: b' File "C:\\Sublime Text Build 3047\\Data\\Packages\\SublimePythonIDE\\server\\..\\lib\\python2\\rope\\base\\resources.py", line 88, in read_bytes\r\n'
Server on port 2163 - STDERR: b" return open(self.real_path, 'rb').read()\r\n"
Server on port 2163 - STDERR: b"IOError: [Errno 13] Permission denied: 'c:\\\\docume~1\\\\oscarl\\\\config~1\\\\temp\\\\tmpqzas3p'\r\n"
Server on port 2163 - STDERR: b'SublimePythonIDE Server is called: completions\r\n'
Server on port 2163 - STDERR: b'Traceback (most recent call last):\r\n'
Server on port 2163 - STDERR: b' File "C:\\Sublime Text Build 3047\\Data\\Packages\\SublimePythonIDE\\server\\server.py", line 134, in completions\r\n'
Server on port 2163 - STDERR: b' project, source, loc, resource=resource, maxfixes=3)\r\n'
Server on port 2163 - STDERR: b' File "C:\\Sublime Text Build 3047\\Data\\Packages\\SublimePythonIDE\\server\\..\\lib\\python2\\rope\\contrib\\codeassist.py", line 33, in code_assist\r\n'
Server on port 2163 - STDERR: b' return assist()\r\n'
I have managed to make it work by changing line number 90 of server.py, from this:
tmpfile = tempfile.NamedTemporaryFile()
to this:
tmpfile = tempfile.NamedTemporaryFile(delete=False)
(this was the default behavior in SublimeRope)
That means that the server won't automatically remove the temp files when shutting down (they keep pilling up on the user's %temp% folder), but at least works ok.
Maybe we should use delete=False if os.name == 'nt'?
It'd be nice if you could configure the system to assume you have a virtualenv that matches
e.g. my workflow was always "subl " to open it rather than configuring a bunch of project-specific (read: annoying IDE) cruft, saving that, and transporting it around.
If that's too far fetched, than at the very least looking for a virtualenv in $WORKON_HOME/<root_dir_in_project> for each directory in the project would be a reasonable default.
Hi,
I use tabs in my projects to indent and pep8 linting in SublimePythonIDE reports E126 (over-indented for hanging indent) failing to recognize the tab. To check if that is the case I converted one of the files from tabs to spaces with same indentations and the error message was gone.
The problem seems to be in /lib/pep8.py:expand_indent(line) โ it assumes that tab equivalent of 8 spaces and hence thinks that I over-indented the code.
A couple of very dirty and hacky solutions that I can think of is โ adding a configuration setting for that assumed 8 or maybe getting the tab size from sublime.
Thanks!
Steps to reproduce:
Expected: The line would be idented to the left one more time
Result: The line copyed gets pasted again.
I didn't try to much with commands other than identing, but looks like it hapens with other as well - like 'dw', and 'x')
Receive the below when starting up ST3 (Build 3035). Installed SublimePythonIDE through package control successfully. Response seems to be very slow (after starting to type "import" ST3 seems to freeze for ~10 seconds).
Am on Win 7 Pro x64 w/ Sublime Text 3 Build 3035 x64. Have Python 2.7.4 installed. Please let me know if you need any additional info.
[snip ~20 lines or so of similar output]
starting server on port 62040 with python
starting server on port 62017 with python
starting server on port 62023 with python
starting server on port 62029 with python
starting server on port 62035 with python
[/snip]
Traceback (most recent call last):
File "C:\Users\bryan.lott\AppData\Roaming\Sublime Text 3\Packages\Python IDE\sublime_python.py", line 86, in send_heartbeat
self.proxy.heartbeat()
File "X/xmlrpc/client.py", line 1090, in call
File "X/xmlrpc/client.py", line 1419, in __request
File "X/xmlrpc/client.py", line 1132, in request
File "X/xmlrpc/client.py", line 1143, in single_request
File "X/xmlrpc/client.py", line 1255, in send_request
File "X/xmlrpc/client.py", line 1285, in send_content
File "X/http/client.py", line 1045, in endheaders
File "X/http/client.py", line 890, in _send_output
File "X/http/client.py", line 828, in send
File "X/http/client.py", line 806, in connect
File "X/socket.py", line 424, in create_connection
File "X/socket.py", line 415, in create_connection
ConnectionRefusedError: [WinError 10061] No connection could be made because the target machine actively refused it
Once installed, linting seems to be taken over by SublimePythonIDE even though I had a previously installed and used SublimeLinter or this purpose.
Turning lint off in the SublimePythonIDE settings via the flag
{"python_linting": false}
does not re-allow SublimeLinter to work.
This would be all right as both are using the same lint engine, but SublimeLinter has those nice pop-ups I like, and SublimePythonIDE's lint does not!
os: Linux Mint 16
Sublime 3 Build 3059
I'm getting a warning that the following should be using is instead of ==.
rows = data.query(schema.Publish).filter(condish == False)
As far as I understand, pep8 specifies that for if statements only.
Create new file using command line:
$ subl newfile.py
It opens in sublime and is non-saved.
Now if you type any letters, sublime freezes for a couple of seconds (looking for autocomplete?).
If you save it (ctrl+s) everything becomes fine.
Disabling SublimePythonIDE package solves the problem. Re-enable it and bug works again.
Sublime Text 3, build 3047 on Linux Mint 14
I am always using Python from venv
virtualenv folder which is in the Sublime project root folder.
Is it possible to have a SublimePythonIDE project setting where Python interpreter is relative to the project root?
// SublimePythonIDE
"settings": {
"python_interpreter": "relative/path/here/venv/bin/python"
}
Installed this and SublimePySide, but autocompletion for PySide and PyQT4 doesn't work.
Will you be adding the "Go to documentation" and "Got to declaration" items back into the context menus (right click)?
OS X El Capitan, Python 3.
Enable SublimePythonIDE, in sublime console:
reloading Packages/SublimePythonIDE/SublimePython.sublime-settings
Traceback (most recent call last):
File "/Users/user_name/Library/Application Support/Sublime Text 3/Packages/SublimePythonIDE/sublime_python.py", line 412, in _update_color_scheme
"warning": get_setting("warning_color"),
TypeError: 'NoneType' object is not callable
The error occurs on Windows:
started server on port 54732 with C:\Program Files (x86)\Python\Python34\python.exe
SublimePythonIDE: No server respose
'NoneType' object has no attribute 'data'
The interpreter path is set in SublimePython.sublime-settings
:
{
"python_interpreter": "C:/Program Files (x86)/Python/Python34/python.exe"
}
I'm on Windows 10. The detection of fall through/error detection mechanism doesn't work well. Falling through on empty is fine, but IMO it should also fall through on error.
In my case, here's my settings:
From SublimePythonIDE settings: None
- falls throughFrom venv settings: None
- falls throughFrom #! (shebang) line in this file: ['/usr/bin/env', 'python']
- this is the problemFrom system Python (via $PATH): ['C:\\Python27\\python.exe']
- this value would work, if it was usedThere are some work around options, but they seem less than optimal.
If I set C:\\Python27\\python.exe
in the project config, everything is okay. However this is, as far as I'm concerned, a system setting for me, and not a project setting.
I have virtual environments set up, using a user-level ~/.virtualenvs
directory rather than one under my project's path, though as you can see it is not detecting it. Not sure how to get SublimePythonIDE to find that, or if the path differences would pan out (C:\\Python27\python.exe
vs /c/Python27/python.exe
).
Edit: I figured out why it isn't detecting my venv. I'm nesting multiple projects under the same source control, with different virtual environments for each, and the venv detection is project folder name based. I can't figure out a reasonable way this could be implemented to work, yet still keep my sublime text project at the root directory. I am guessing a most other projects probably won't have this problem.
Fortunately I have a patch that might make any workarounds unnecessary, and also won't require me to get venv detection working for this project :)
I see autocompletes of More-Python-Completions package after fifth typing character, not after first character.
I see autocompletes of More-Python-Completions after first character:
I see More-Python-Completions autocomplete variants, if I type 5 characters:
I reproduce the problem in a version of Sublime Text without plugins and user settings.
I create and open file Example.py
and write in it i-array
.
If More-Python-Completions enable for me, I get actual behavior.
If More-Python-Completions disable for me, I get expected behavior.
Operating system and version:
Windows 10 Enterprise LTSB 64-bit EN
Sublime Text:
Build 3126
Python:
3.6.0
Thanks.
I develop using django, and incase of any imports I am not getting any suggestions. Let me elaborate:
"from django.contrib.auth.models import User"
So while writing the above line I only got suggestions for classes in the models. Didnt get any suggestion on modules in django or in the entire path before the import word.
Same is the case with project paths, only contents of the final module are suggested after writing the import word
Most of the time, especially for webdev work, you are defining a new subclass of an abstract class provided by your framework, and most of the time it involves overriding its ancestors' methods. Is really convenient if SublimePythonIDE could also autocomplete all methods from all the ancestors of the current class I'm writing, right after the def
keyword. The thing is this was already possible before switching to Jedi autocompletions, it just had the small annoyance that it autocompleted the name as a method call, that is, it inserted the parens and all arguments names when hitting Enter.
Can this be accomplished with the Jedi autocompletions?
Hi, when i try to use tab to see if the Plugins has completions, i get the following error:
Traceback (most recent call last):
File "/home/schildt/.config/sublime-text-3/Packages/SublimePython/sublime_python.py", line 84, in send_heartbeat
self.proxy.heartbeat()
File "X/xmlrpc/client.py", line 1090, in call
File "X/xmlrpc/client.py", line 1419, in __request
File "X/xmlrpc/client.py", line 1132, in request
File "X/xmlrpc/client.py", line 1143, in single_request
File "X/xmlrpc/client.py", line 1248, in send_request
File "X/http/client.py", line 932, in putrequest
http.client.CannotSendRequest: Request-sent
Therefore my log gets spammed with:
starting server on port 48762 with /usr/bin/python
and Sublime gets nearly unusable
Looks like some cases (typing within a string object for example) are killing the server. Maybe if i find some time, i will look into it
When I recently upgraded to Python 3.4.3 SublimePythonIDE stopped working properly and always hangs while typing. This issue does not exist with Python 3.4.2, I can reproduce that.
I'm on a Windows machine and I installed Python through conda.
The console shows recurring server starts roughly every 1-2 seconds with Python 3.4.3 as soon as I start typing:
started server on port 52372 with C:\Miniconda3\envs\default\python.exe
started server on port 52374 with C:\Miniconda3\envs\default\python.exe
started server on port 52376 with C:\Miniconda3\envs\default\python.exe
...
Any idea what's happening here?
Currently, a list of suggestions is shown only after the user has typed a dot and the first character. However, I think it'd be nice if we can configure PythonIDE such that a list of suggestions is shown after a user has typed a dot.
In some of my files SublimePythonIDE highlights the file encoding line and shows a exclamation mark in the gutter. When I click on it, nothing is shown in the status bar.
I have not yet been able to find out what exactly triggers this behaviour :( The console does not show anything conspicuous, either.
Hi,
SublimeRope was able to do quite a bit of refactoring (when it worked), but SublimePythonIDE doesn't seem to (although the README mentions refactorings explicitly).
Do you have any plans to add support for some rope refactorings in the near future?
If not, how are you refactoring in ST3? Block edit / copy-paste?
When installing SublimePythonIDE through Package Control, the package was put into a directory called "Python IDE".
The "Preferences > SublimePythonIDE > Settings - Default" menu option opens the file "${packages}/SublimePythonIDE/SublimePython.sublime-settings" when it should be opening "${packages}/Python IDE/SublimePython.sublime-settings".
Alternatively, Package Control should install SublimePythonIDE to "${packages}/SublimePythonIDE" instead of "${packages}/Python IDE".
Hey,
I really liked using SublimeRope in ST2, and this looks great, and I was wondering if you had a roadmap for this and if I could contribute in any way.
Thanks for this and for SublimeRope!
--Derek
I had the SublimePythonIDE plugin installed and noticed that a few days ago a message similar to this appeared (don't recall exactly the text between the commas):
The package specified, Python IDE, is not available
I unistalled the plugin, and tried to reinstall it, but it is not listed in Package Control.
Is somebody else having the same problem?
Hi,
I am getting an importerror when I start sublime.
It looks like the issue is installing from package control, as the project name is "Python IDE" and not "SublimePythonIDE".
reloading plugin Python IDE.sublime_python
reloading plugin Python IDE.sublime_python_linting
Traceback (most recent call last):
File "/opt/sublime_text/sublime_plugin.py", line 73, in reload_plugin
m = importlib.import_module(modulename)
File "X/importlib/__init__.py", line 88, in import_module
File "<frozen importlib._bootstrap>", line 1577, in _gcd_import
File "<frozen importlib._bootstrap>", line 1558, in _find_and_load
File "<frozen importlib._bootstrap>", line 1525, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 586, in _check_name_wrapper
File "<frozen importlib._bootstrap>", line 1023, in load_module
File "<frozen importlib._bootstrap>", line 1004, in load_module
File "<frozen importlib._bootstrap>", line 562, in module_for_loader_wrapper
File "<frozen importlib._bootstrap>", line 869, in _load_module
File "<frozen importlib._bootstrap>", line 313, in _call_with_frames_removed
File "/data/home/max/.config/sublime-text-3/Packages/Python IDE/sublime_python_linting.py", line 11, in <module>
from SublimePythonIDE.sublime_python import proxy_for, get_setting
ImportError: No module named 'SublimePythonIDE'
I tried to install plugin via package control and by cloning repository, but results was the same . Plugin appeared in list of installed packages in package control, but dont work - no commands in sublime command panel and no options in preferences menu, there is also no errors in sublime console.
When in visual mode (after pressing 'v'), trying to go to the end of the line using the 'end' key will not work.
After this, trying to move using either the directional keys or home/end/pageup/pagedown will not work.
I'm using the Base16 Color Schemes package to provide my preferred color scheme in Sublime, and when I installed SublimePythonIDE from package control, it generates this exception in the console:
Traceback (most recent call last):
File "/home/jreese/profile/dotfiles/sublime3/Packages/SublimePythonIDE/sublime_python_colors.py", line 104, in generate_color_scheme_async
color = color.lstrip('#')
AttributeError: 'NoneType' object has no attribute 'lstrip'
Traceback (most recent call last):
File "/home/jreese/profile/dotfiles/sublime3/Packages/SublimePythonIDE/sublime_python_colors.py", line 116, in generate_color_scheme_async
with open(scheme_path, 'w', encoding='utf8') as f:
FileNotFoundError: [Errno 2] No such file or directory: '/home/jreese/profile/dotfiles/sublime3/Packages/Base16 Color Schemes/base16-tomorrow.dark.tmTheme'
The theme does not exist in this path because Sublime doesn't extract packages at runtime anymore.
As per Package Control docs, having Sublime in the title of plugin is redundant.
I'm getting the following traceback. Any ideas what's wrong? I've noticed recently that control + clicking on variables imported from different libraries has stopped working, could this be responsible?
Traceback (most recent call last):
File "/Applications/Sublime Text.app/Contents/MacOS/sublime_plugin.py", line 215, in on_load_async
callback.on_load_async(v)
File "/Users/alex/Library/Application Support/Sublime Text 3/Packages/SublimePythonIDE/sublime_python_linting.py", line 411, in wrapper
return func(self, view)
File "/Users/alex/Library/Application Support/Sublime Text 3/Packages/SublimePythonIDE/sublime_python_linting.py", line 431, in on_load_async
check(view)
File "/Users/alex/Library/Application Support/Sublime Text 3/Packages/SublimePythonIDE/sublime_python_linting.py", line 76, in check
proxy = proxy_for(view)
File "/Users/alex/Library/Application Support/Sublime Text 3/Packages/SublimePythonIDE/sublime_python.py", line 285, in proxy_for
python = project_venv_python(view) or system_python()
File "/Users/alex/Library/Application Support/Sublime Text 3/Packages/SublimePythonIDE/sublime_python.py", line 250, in project_venv_python
project_dir = root_folder_for(view)
File "/Users/alex/Library/Application Support/Sublime Text 3/Packages/SublimePythonIDE/sublime_python.py", line 331, in root_folder_for
"src_root", view, None)] + window.folders():
AttributeError: 'NoneType' object has no attribute 'folders'
I've a project config of:
{
"folders":
[
{
"path": "."
}
],
"settings": {
"python_interpreter": "/Users/BenJolitz/.virtualenvs/cpython36/bin/python3.6",
}
}
When I remove python_interpreter
, the linter detects numerous issues like bad spacing, missing vars, etc,. Here is a sample where it should whine:
def bad():
del a
a.ax=1, # <-- should whine about spacing at a minimum
foo.bar.x
foo(a)
When python_interpreter
is set to Python 3, it no longer complains. I'm a bit uncertain how to proceed as I depend on the linter keeping me honest. For now, I add in things like 1=1
to provoke the linter to do its job.
I think I may be missing something obvious, but I've tried using the same key bindings from SublimeRope by adding them to my Keybindings - User file, but I don't see any response. SublimePythonIDE seems to be installed successfully as autocomplete and linting are working fine.
As noticed by many others, Rope is not the perfect library for autocompletion.
I have pushed a new branch jedi_completions that uses Jedi instead.
Anyone who is interested is invited to give it a try.
ST3 (Win7 Pro x64) freezes when I start typing on a new line. The console shows that each time I start typing a new SPIde server is started on a different port.
Is that an expected behaviour?
I'm using ST3 3407 build on Linux with latest version of this plugin.
I noticed that linting doesn't work anymore, though it did some time ago.
Is there a way to start lint manually via some setting or in console?
Having installed the plugin via Package Control, I got the error in Sublime's console:
Traceback (most recent call last):
File "C:\Users\User1\AppData\Roaming\Sublime Text 3\Packages\SublimePythonIDE\sublime_python_colors.py", line 94, in generate_color_scheme_async
target_color = colors.get(style, DEFAULT_MARK_COLORS[style]).upper().lstrip("#")
AttributeError: 'NoneType' object has no attribute 'upper'
Sublime Build: 3074
OS: Windows 8.1 x64
I haven't used SublimeRope before ( actually I've only started learning python... again ) so I don't really know what I should be expecting from this plugin, but I don't see anything new.
I'm using OSX and there are no new options on the toolbar, when I type I experience massive slowdowns on each letter as if the plugin was scanning for possible autocompletions, but it only shows ST3 built-in snippets. I've tried to get autocompletion to show me functions / methods like print
, input
or [].append
I would like Some kind of a readme on how to set up the plugin and the features it gives โ where to look for them and how to use them.
Hi dev Julian!
I had problems with setting the Python interpreter right on my Win7 x86 machine. I've installed a WinPython where Python is located at "C:\Program Files\WinPython-32bit-3.3.3.3\python-3.3.3\python.exe". The space in "Program Files" caused the problem. Setting the SublimePython user-settings gives me a value error window on startup. Setting it in Settings - User also doesn't do the trick.
Troubleshooting the code I found that the python
local on line 285
in proxy_for(view)
of sublime_python.py
is set to C:\\Program
. Tracing the source of this value I found the following on line 225
:
sys_py = sys_py.split()[0] # use first result where many might return
But the result of the where clause in cmd contains a space! So I changed it to:
sys_py = sys_py.strip()
Now it works flawless:
started server on port 51965 with C:\Program Files\WinPython-32bit-3.3.3.3\python-3.3.3\python.exe
Might this help some others too?
Could you add a command, SublimeLinter-like, to move to the next detected error? That way I can quickly zip through a file and address them without scrolling until I manually spot something.
SublimePythonIDE modifies sys.path for the whole Python interpreter embedded in ST3 by injecting its own lib/
dependency there. This happens in here:
https://github.com/JulianEberius/SublimePythonIDE/blob/master/sublime_python.py#L12
This has a potential of breaking other plugins / packages which rely on the same libraries, different versions.
This occurs with SublimeLinter-flake8. SublimeLinter-flake8 assues flake8 > 2.1.0, but SublimePythonIDE sys.path
mutation forces it to use older, incompatible, version.
The issue is reported here:
SublimeLinter/SublimeLinter-flake8#4
If possible the bundled dependency libraries should be loaded without modifying sys.path. I am pretty sure this is possible with Python 3's imp
module.
First of all, I really value having Extract Method available in sublime, so thanks for creating this plugin.
When I start sublime from a shell that uses Python2 then the Extract Method refactoring works fine. It fails when starting from a shell that uses Python3. Maybe a small note can be added to the readme to alert users to this?
My Sublime recently updated to the most recent SublimePythonIDE version and no longer parses valid Python code in my Flask project.
The console prints:
SublimePythonIDE: No server response
'module' object has no attribute 'ReturnOutsideFunction'
When I terminate the server.py program, I see:
started server on port 57389 with ['/Users/BenJolitz/.virtualenvs/cpython27/bin/python']
SublimePythonIDE: No server response
'module' object has no attribute 'ReturnOutsideFunction'
I receive this error on any refactoring command.
Last Sublime 3 and SublimePythonIDE.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.