Code Monkey home page Code Monkey logo

ide-python's Introduction

IDE-python package

Greenkeeper badge

Python language support for Atom-IDE, powered by the Python language server.

ide-python

Requirements

ide-python requires Atom 1.21+, Python language server 0.29+ and the atom-ide-base package to expose the functionality within Atom.

Important

Please note that atom-ide-ui is now deprecated, therefore, you must use the packages supplied from atom-ide-community as mentioned above. Links are also provided for more information.

Feature Providers

  • Jedi for Completions, Definitions, Hover, References, Signature Help, and Symbols
  • Rope for Completions and renaming
  • Pyflakes linter to detect various errors
  • McCabe linter for complexity checking
  • pycodestyle linter for style checking
  • Pylint linter to detect various errors
  • Flake8 linter to detect various errors
  • pydocstyle linter for docstring style checking
  • autopep8 for code formatting (preferred over YAPF)
  • YAPF for code formatting

Installation

Language Server

Install the language server (0.29.0 or newer) with:

python -m pip install 'python-language-server[all]'

This command will install the language server and all supported feature providers, which can be enabled or disabled in the settings. Checkout the official installation instructions on how to install only the providers you need.

You can verify that everything is correctly installed by running python -m pyls --help from the command line. It should return

usage: pyls [-h] [--tcp] [--host HOST] [--port PORT]
            [--log-config LOG_CONFIG | --log-file LOG_FILE] [-v]

Python Language Server
...

If you have installed pyls using a non default installation of Python, you can add modify the Python Executable config in the ide-python settings.

Atom Package

Install ide-python and atom-ide-base from Install in Atom's settings or run:

apm install atom-ide-base
apm install ide-python

To use the debugger you need to install atom-ide-debugger and atom-ide-console as well:

apm install atom-ide-debugger
apm install atom-ide-console

Debugger (experimental)

After installation of the above packages:

  • Open the file you need to debug
  • Use CTRL+SHIFT+P and run "Show Debugger" to show the debugger pane
  • Click add target button and fill the information
  • Debug your application like the gif

python-debugger

Configuration

Configuration is loaded from zero or more configuration sources.

  • pycodestyle: discovered in ~/.config/pycodestyle, setup.cfg, tox.ini and pycodestyle.cfg
  • flake8: discovered in ~/.config/flake8, setup.cfg, tox.ini and flake8.cfg

Overall configuration is computed first from user configuration (in home directory), overridden by configuration in the ide-python settings, and then overridden by configuration discovered in the current project.

Contributing

Always feel free to help out! Whether it's filing bugs and feature requests or working on some of the open issues, Atom's guide for contributing to packages will help get you started.

License

MIT License. See the license for more details.

ide-python's People

Contributors

aminya avatar atom-ide-community-robot[bot] avatar ediphy-azorab avatar greenkeeper[bot] avatar hansonw avatar lenlen avatar lgeiger avatar renovate-bot avatar renovate[bot] avatar rob-a-bolton avatar segevfiner avatar semantic-release-bot avatar shaharz avatar thatxliner avatar tillhainbach avatar tvallois avatar uoo723 avatar uzitech avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ide-python's Issues

Unfriendly fork at jeffhongxiao/ide-python

Just to let you know of the existence of this rather unfriendly fork of ide-python, published as ide-python-dev, and whose sole contribution is a renaming of the package and change of version numbering. Besides, the issue tracker has been voluntarily disabled.

Adding Conventions Support

How about adding an info box of some sort that shows the correct convention e.g. Class name should be CamelCase or function names be separated by underscores etc? I guess it can be done using Google Python Style Guide/PEP 8.

Package error

Thanks again for the great work!
This package however stopped working again, and none of the features work!
For example, in the Outline view it says No outline available. There is likely an error with the language package. The autocomplete and rest of the features also don't work.

Uncaught Error: Connection is closed.

Atom: 1.20.0 x64
Electron: 1.6.9
OS: Mac OS X 10.12
Thrown From: ide-python package 0.1.0

Stack Trace

Uncaught Error: Connection is closed.

At /Users/KaniRobinson/.atom/packages/ide-python/node_modules/vscode-jsonrpc/lib/main.js:604

Error: Connection is closed.
    at /packages/ide-python/node_modules/vscode-jsonrpc/lib/main.js:129:28)
    at throwIfClosedOrDisposed (/packages/ide-python/node_modules/vscode-jsonrpc/lib/main.js:604:19)
    at Object.sendNotification (/packages/ide-python/node_modules/vscode-jsonrpc/lib/main.js:658:13)
    at LanguageClientConnection._sendNotification (/packages/ide-typescript/node_modules/atom-languageclient/build/lib/languageclient.js:233:15)
    at LanguageClientConnection.didChangeTextDocument (/packages/ide-typescript/node_modules/atom-languageclient/build/lib/languageclient.js:126:10)
    at TextEditorSyncAdapter.sendFullChanges (/packages/ide-typescript/node_modules/atom-languageclient/build/lib/adapters/document-sync-adapter.js:196:22)
    at Function.module.exports.Emitter.simpleDispatch (/Applications/Atom.app/Contents/Resources/app/node_modules/event-kit/lib/emitter.js:25:20)
    at Emitter.module.exports.Emitter.emit (/Applications/Atom.app/Contents/Resources/app/node_modules/event-kit/lib/emitter.js:141:34)
    at /Applications/Atom.app/Contents/Resources/app/src/text-editor.js:626:38
    at Function.module.exports.Emitter.simpleDispatch (/Applications/Atom.app/Contents/Resources/app/node_modules/event-kit/lib/emitter.js:25:20)
    at Emitter.module.exports.Emitter.emit (/Applications/Atom.app/Contents/Resources/app/node_modules/event-kit/lib/emitter.js:141:34)
    at DisplayLayer.emitDidChangeSyncEvent (/Applications/Atom.app/Contents/Resources/app/node_modules/text-buffer/lib/display-layer.js:823:24)
    at decorationLayerDisposable.textDecorationLayer.onDidInvalidateRange (/Applications/Atom.app/Contents/Resources/app/node_modules/text-buffer/lib/display-layer.js:161:20)
    at Function.module.exports.Emitter.simpleDispatch (/Applications/Atom.app/Contents/Resources/app/node_modules/event-kit/lib/emitter.js:25:20)
    at Emitter.module.exports.Emitter.emit (/Applications/Atom.app/Contents/Resources/app/node_modules/event-kit/lib/emitter.js:141:34)
    at TokenizedBuffer.module.exports.TokenizedBuffer.tokenizeNextChunk (/Applications/Atom.app/Contents/Resources/app/src/tokenized-buffer.js:241:28)
    at /Applications/Atom.app/Contents/Resources/app/src/tokenized-buffer.js:206:32
    at /Applications/Atom.app/Contents/Resources/app/node_modules/underscore/underscore.js:666:53

Commands

     -3:26.2.0 fuzzy-finder:toggle-file-finder (input.hidden-input)
     -3:25.2.0 editor:consolidate-selections (input.hidden-input)
     -3:25.2.0 core:cancel (input.hidden-input)
     -3:24.3.0 command-palette:toggle (input.hidden-input)
  2x -3:21.5.0 core:move-down (input.hidden-input)
     -3:20.1.0 core:confirm (input.hidden-input)
     -3:20.1.0 settings-view:install-packages-and-themes (input.hidden-input)
     -3:12.4.0 core:confirm (input.hidden-input)
     -2:15.2.0 diagnostics:toggle-table (atom-workspace.workspace.scrollbars-visible-when-scrolling.theme-one-dark-syntax.theme-one-dark-ui)
     -2:12.5.0 editor:newline (input.hidden-input)
     -1:48.5.0 core:save (input.hidden-input)
     -1:09.9.0 fuzzy-finder:toggle-file-finder (atom-workspace.workspace.scrollbars-visible-when-scrolling.theme-one-dark-syntax.theme-one-dark-ui)
     -1:08.9.0 editor:consolidate-selections (input.hidden-input)
     -1:08.9.0 core:cancel (input.hidden-input)
     -0:55.8.0 core:save (input.hidden-input)
     -0:35.2.0 core:copy (atom-notification.fatal.icon.icon-bug.native-key-bindings.has-detail.has-close.has-stack)

Non-Core Packages

atom-ide-ui 0.3.1 
ide-python 0.1.0 
ide-typescript 0.1.6 
language-vue 0.23.1 
react-snippets 0.7.2 
vue2-autocomplete 0.1.0-alpha.4 

pycodestyle --max-line-length specification

Seems pycodestyle has a --max-line-length option. Anyway to define it? Need a sub options / sub arguments line for pycodestyle and other sub packages.

Usage: pycodestyle [options] input ...

Options:
  --version            show program's version number and exit
  -h, --help           show this help message and exit
  -v, --verbose        print status messages, or debug with -vv
  -q, --quiet          report only file names, or nothing with -qq
  -r, --repeat         (obsolete) show all occurrences of the same error
  --first              show first occurrence of each error
  --exclude=patterns   exclude files or directories which match these comma
                       separated patterns (default:
                       .svn,CVS,.bzr,.hg,.git,__pycache__,.tox)
  --filename=patterns  when parsing directories, only check filenames matching
                       these comma separated patterns (default: *.py)
  --select=errors      select errors and warnings (e.g. E,W6)
  --ignore=errors      skip errors and warnings (e.g. E4,W) (default:
                       E121,E123,E126,E226,E24,E704,W503)
  --show-source        show source code for each error
  --show-pep8          show text of PEP 8 for each error (implies --first)
  --statistics         count errors and warnings
  --count              print total number of errors and warnings to standard
                       error and set exit code to 1 if total is not null
  --max-line-length=n  set maximum allowed line length (default: 79)
  --hang-closing       hang closing bracket instead of matching indentation of
                       opening bracket's line
  --format=format      set the error format [default|pylint|<custom>]
  --diff               report changes only within line number ranges in the
                       unified diff received on STDIN

  Testing Options:
    --benchmark        measure processing speed

  Configuration:
    The project options are read from the [pycodestyle] section of the
    tox.ini file or the setup.cfg file located in any parent folder of the
    path(s) being processed.  Allowed options are: exclude, filename,
    select, ignore, max-line-length, hang-closing, count, format, quiet,
    show-pep8, show-source, statistics, verbose.

ide-python starts rogue bash process

Whenever I start atom (or whenever I enable ide-python in settings), there's a bash process that gets spawned. It clogs the CPU and it cannot be ended with SIGTERM, only SIGKILL.

The command, as shown in ps is /bin/bash -ilc env; exit

Other info:

$uname -a
Linux kramer-VirtualBox 4.10.0-35-generic #39-Ubuntu SMP Wed Sep 13 07:46:59 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
$atom --version
Atom    : 1.20.1
Electron: 1.6.9
Chrome  : 56.0.2924.87
Node    : 7.4.0

Files opened by fuzzy find palette not triggering python language server.

Environment
Linux x64 ubuntu 16.04

Atom version
1.24.0.beta3, 1.23.1

Encountered situation

Greetings, I've encountered a weird behaviour.

If I open a file from the project file tree, python language server is working properly.
But if the file is opened by ctrl-p (opens fuzzy file finder), the linter and all the ide stuff is not working.

ide-python seems to lose connection to the python language server and stops responding

macOS Sierra, Version 10.12.6

After less than 5 minutes the autocomplete and all functionality of ide-python seems to fail.

The console shows 2 different errors. I haven't yet been able to determine what causes which error, but they both result in the functionality of ide-python failing.

[atom-ctags:findTags] tags empty, did you RebuildTags or set extraTagFiles?
findTags @ ctags-cache.coffee [sm]:65
module.exports.CtagsProvider.getSuggestions @ ctags-provider.coffee [sm]:30
providers.forEach.provider @ <embedded>:41073
getSuggestionsFromProviders @ <embedded>:41049
findSuggestions @ <embedded>:41041
events.js:160 Uncaught Error: write EPIPE
    at exports._errnoException (util.js:1022)
    at WriteWrap.afterWrite (net.js:804)
exports._errnoException @ util.js:1022
afterWrite @ net.js:804
/Users/blott/.atom/packages/ide-python/node_modules/vscode-jsonrpc/lib/messages.js:46 Uncaught (in promise) Error: Server error
    at new ResponseError (/Users/blott/.atom/packages/ide-python/node_modules/vscode-jsonrpc/lib/messages.js:46)
    at handleResponse (/Users/blott/.atom/packages/ide-python/node_modules/vscode-jsonrpc/lib/main.js:430)
    at processMessageQueue (/Users/blott/.atom/packages/ide-python/node_modules/vscode-jsonrpc/lib/main.js:258)
    at Immediate.<anonymous> (/Users/blott/.atom/packages/ide-python/node_modules/vscode-jsonrpc/lib/main.js:242)
    at runCallback (timers.js:651)
    at tryOnImmediate (timers.js:624)
    at processImmediate [as _immediateCallback] (timers.js:596)

Unfortunately, this makes ide-python completely unusable for me. Reloading the window makes just about every package in atom fail, so the only recourse is to restart atom itself.

Ignore errors

It would be great if there would be an option to filter the errors wich are displayed.
For example E501

Outline View not showing Class methods

My Outline Tab is showing my imported modules and classes but not their methods.
Both classes in the screenshot are being defined in this file.

image

Outline for a different script (with no Class definitions in it) is showing all functions and references just fine.
The datetime class is being imported, it's not being defined in this script.

image

Apologies if this is the expected behavior or I'm missing some basic setting somewhere.

Version:

1.21.0-beta0

Packages:

No outline available

My setup: On Windows 10. Just upgraded to Atom 1.21.0-beta0 and installed atom-ide-ui 0.3.1 and ide-python 0.1.1 packages and the pyls dependency via pip. When I execute "pyls --help" in a command window I get the excepted help text from pyls.

When I open a .py file in Atom and display the "Outline View" pane, it says "No outline available / There are no outline providers registered"

According to the readme.md for ide-python, the outline view should be a supported feature so I don't know what is preventing it from working on my system. I'm not sure how to troubleshoot this to provide better details to you for debugging/fixing. If there is anything I can run to get you better information please let me know.

Thank you for your time and effort creating ide-python and sharing it with us.

Outline and diagnostic not working

Hi
I've got several issues with the module :

Outline
The outline is not working when my python file uses a local package. For instance if I have
from file_in_same_folder import my_function
The outline will display No outline available - This is probably an error with the language package
If I comment all line importing a local python files,, the outline will work.

Diagnostics
I didn't manage to get this working... Nothing shows up

Installation
I'm runnning the latest Kali Linux (rolling) with python 2.7.14
pyls is installed and working.
When I sudo pip install python-language-server it tells me

Requirement already statisfied

For all packages... So I guess it doesn't come from missing packages.

If you have any idea...

Uncaught (in promise) Error: Server Error

I'm having an issue where ide-python works fine for a while, then stops providing Python IDE functionality:

  • Linter results stop updating;
  • Hyperclick just spins when I ctrl-hover over a symbol;
  • Outline view just shows a spinner;
  • CTRL-SHIFT-I - Console shows a bunch of Server Error messages like:
/home/ubuntu/.atom/packages/ide-python/node_modules/vscode-jsonrpc/lib/messages.js:46 Uncaught (in promise) Error: Server error
    at new ResponseError (/home/ubuntu/.atom/packages/ide-python/node_modules/vscode-jsonrpc/lib/messages.js:46:28)
    at handleResponse (/home/ubuntu/.atom/packages/ide-python/node_modules/vscode-jsonrpc/lib/main.js:430:48)
    at processMessageQueue (/home/ubuntu/.atom/packages/ide-python/node_modules/vscode-jsonrpc/lib/main.js:258:17)
    at Immediate.<anonymous> (/home/ubuntu/.atom/packages/ide-python/node_modules/vscode-jsonrpc/lib/main.js:242:13)
    at runCallback (timers.js:651:20)
    at tryOnImmediate (timers.js:624:5)
    at processImmediate [as _immediateCallback] (timers.js:596:5)

My environment looks like:

  • Ubuntu 14.04 running on VirtualBox;
  • Atom 1.22.1 x64
  • atom-ide- 0.6.0
  • ide-python 0.3.0
  • python 3.6.0 :: Continuum Analytics, Inc.
  • pyls.__version__ == 0.11.1

Let me know if there are any other details about my environment or issue that may be helpful.

My work-around is to restart Atom: I regain normal ide-python functionality until the next failure. I have not discerned any clear pattern as to what triggers it.

Any help greatly appreciated. Thanks!
-Dave

How to make it work on Mac with Python 3?

I have a Mac and I installed Python 3.6.2 from the website. Then I used "pip3 install python-language-server" to install the language server for Python 3. It still doesn't work after that.

Unable to start pyls unless started from command line

I am running Atom 1.21.1 on Debian.
I only have python-language-server locally installed via pip install --user python-language-server.
pyls is in my path, the command pyls --version gives me the desired output.

pyls and python-ide work just fine, when I start Atom from command line. If I do otherwise, eg. by clicking on a file, I get the prompt

Unable to start the Python language server.
This can occur if you do not have Python installed or if it is not in your path.
[...]

I checked the source and there is this line in main.js:32:
// For some reason Atom only detects the correct env if started from the command line on Mac.
And then some exceptional behavior for Mac.

I feel like I run into the same issue as this comment suggest for Mac. Is that an upstream issue of Atom not detecting the correct env? Should we have a workaround for Debian as well?

Lack of installation instructions

Hi,

I'm very excited about an IDE-Python support for Atom IDE. But I don't understand how this is supposed to work. Your instructions aren't clear enough.

After installing atom-ide-ui I am not sure how to proceed.

pip install python-language-server

Makes little sense to me, as it installs it to a virtualenv. But the Atom IDE still isn't integrated with the IDE-Python, is it?

Uncaught Error: Connection is disposed.

[Enter steps to reproduce:]
I unticked pycodestyle preference

Atom: 1.23.2 x64
Electron: 1.6.15
OS: Ubuntu 17.10
Thrown From: ide-python package 0.4.0

Stack Trace

Uncaught Error: Connection is disposed.

At /home/rogerb/Dropbox/dot-atom/packages/ide-python/node_modules/vscode-jsonrpc/lib/main.js:616

Error: Connection is disposed.
    at /packages/ide-python/node_modules/vscode-jsonrpc/lib/main.js:138:28)
    at throwIfClosedOrDisposed (/packages/ide-python/node_modules/vscode-jsonrpc/lib/main.js:616:19)
    at Object.sendNotification (/packages/ide-python/node_modules/vscode-jsonrpc/lib/main.js:667:13)
    at LanguageClientConnection._sendNotification (/packages/ide-python/node_modules/atom-languageclient/build/lib/languageclient.js:365:15)
    at LanguageClientConnection.didChangeConfiguration (/packages/ide-python/node_modules/atom-languageclient/build/lib/languageclient.js:122:10)
    at _disposable.add.atom.config.observe.params (/packages/ide-python/lib/main.js:24:20)
    at /usr/share/atom/resources/app/src/config.js:676:22
    at /usr/share/atom/resources/app/src/config.js:693:26
    at Function.module.exports.Emitter.simpleDispatch (/usr/share/atom/resources/app/node_modules/event-kit/lib/emitter.js:25:20)
    at Emitter.module.exports.Emitter.emit (/usr/share/atom/resources/app/node_modules/event-kit/lib/emitter.js:141:34)
    at Config.module.exports.Config.emitChangeEvent (/usr/share/atom/resources/app/src/config.js:884:35)
    at Config.module.exports.Config.setRawValue (/usr/share/atom/resources/app/src/config.js:670:25)
    at Config.module.exports.Config.set (/usr/share/atom/resources/app/src/config.js:248:20)
    at SettingsPanel.set (/usr/share/atom/resources/app/node_modules/settings-view/lib/settings-panel.js:237:27)
    at HTMLInputElement.changeHandler (/usr/share/atom/resources/app/node_modules/settings-view/lib/settings-panel.js:174:25)

Commands

  2x -1:14.4.0 intentions:highlight (input.hidden-input)
     -1:06.5.0 core:close (input.hidden-input)
     -0:59.3.0 outline-view:toggle (input.hidden-input)
     -0:27.2.0 editor:move-to-beginning-of-word (input.hidden-input)
     -0:26.7.0 core:move-left (input.hidden-input)
     -0:26.4.0 core:backspace (input.hidden-input)

Non-Core Packages

atom-beautify 0.30.9 
atom-ide-ui 0.7.1 
atom-jinja2 0.6.0 
autocomplete-clang 0.11.4 
autocomplete-python 1.10.5 
busy-signal 1.4.3 
clang-format 1.30.0 
file-icons 2.1.15 
ide-cpp 0.0.3 
ide-css 0.2.0 
ide-html 0.4.1 
ide-json 0.1.0 
ide-python 0.4.0 
ide-typescript 0.7.2 
intentions 1.1.5 
language-diff 0.7.0 
language-restructuredtext 1.1.0 
language-swift 0.5.0 
linter 2.2.0 
linter-clang 4.1.2 
linter-flake8 2.3.0 
linter-ui-default 1.6.10 
pigments 0.40.2 
python-tools 0.6.9 
slime 2.4.0 
symbols-tree-view 0.14.0 
tablr 1.8.3 

Uncaught Error: Message header must separate key and value using :

[Enter steps to reproduce:]

  1. ...
  2. ...

Atom: 1.21.0-beta0 x64
Electron: 1.6.9
OS: Unknown Windows version
Thrown From: ide-python package 0.1.1

Stack Trace

Uncaught Error: Message header must separate key and value using :

At C:\Users\wanch\.atom\packages\ide-python\node_modules\vscode-jsonrpc\lib\messageReader.js:68

Error: Message header must separate key and value using :
    at /packages/ide-python/node_modules/vscode-jsonrpc/lib/messageReader.js:68:23
    at Array.forEach (native)
    at MessageBuffer.tryReadHeaders (/packages/ide-python/node_modules/vscode-jsonrpc/lib/messageReader.js:65:17)
    at StreamMessageReader.onData (/packages/ide-python/node_modules/vscode-jsonrpc/lib/messageReader.js:185:43)
    at /packages/ide-python/node_modules/vscode-jsonrpc/lib/messageReader.js:176:19)
    at emitOne (events.js:96:13)
    at Socket.emit (events.js:188:7)
    at readableAddChunk (_stream_readable.js:176:18)
    at Socket.Readable.push (_stream_readable.js:134:10)
    at Pipe.onread (net.js:551:20)

Commands

     -5:06.7.0 application:new-file (input.hidden-input)
     -5:03.7.0 application:open-file (input.hidden-input)
     -4:35.2.0 application:open-folder (input.hidden-input)
     -2:18.8.0 grammar-selector:show (atom-text-editor.editor.enable-atom-ide-find-references.is-focused)
     -2:16.2.0 editor:consolidate-selections (input.hidden-input)
     -2:16.2.0 core:cancel (input.hidden-input)
     -2:14.2.0 symbols-view:toggle-file-symbols (input.hidden-input)
     -2:12.5.0 editor:consolidate-selections (input.hidden-input)
     -2:12.5.0 core:cancel (input.hidden-input)

Non-Core Packages

atom-ide-ui 0.3.2 
file-type-icons 1.3.4 
ide-java 0.6.0 
ide-python 0.1.1 
ide-typescript 0.6.1 

Update of lint errors is too slow

toto

Here is a screenshot to illustrate my issue. Time to time, some lint errors are still here even if the issue has been fixed. Not sure how to reproduce this exactly but it seems to happen regularly. I'm using Atom 1.23, pyls 0.12 in python3 on Linux.

A frustrating fix is to type something and delete it to "update" lint.

Cheers

Uncaught Error: Header must provide a Content-Length property.

[Enter steps to reproduce:]

  1. Have ide-python installed
  2. Open a java file
  3. Close it

Atom: 1.21.0-beta0 x64
Electron: 1.6.9
OS: elementary OS
Thrown From: ide-python package 0.1.1

Stack Trace

Uncaught Error: Header must provide a Content-Length property.

At /home/fsociety/.atom/packages/ide-python/node_modules/vscode-jsonrpc/lib/messageReader.js:191

Error: Header must provide a Content-Length property.
    at StreamMessageReader.onData (/packages/ide-python/node_modules/vscode-jsonrpc/lib/messageReader.js:191:27)
    at /packages/ide-python/node_modules/vscode-jsonrpc/lib/messageReader.js:176:19)
    at emitOne (events.js:96:13)
    at Socket.emit (events.js:188:7)
    at readableAddChunk (_stream_readable.js:176:18)
    at Socket.Readable.push (_stream_readable.js:134:10)
    at Pipe.onread (net.js:551:20)

Commands

     -5:16.9.0 linter-ui-default:toggle-panel (atom-workspace.workspace.scrollbars-visible-always.seti-compact.hide-project-tab.seti-icons.seti-animate.theme-one-dark-syntax.theme-seti-ui)
     -5:10.8.0 core:backspace (input.hidden-input)
  2x -5:03.9.0 core:copy (div#linter-panel.)

Non-Core Packages

atom-beautify 0.30.5 
atom-ide-ui 0.3.1 
autocomplete-clang 0.11.3 
autocomplete-java 1.2.7 
autocomplete-python 1.10.2 
busy-signal 1.4.3 
highlight-selected 0.13.1 
ide-java 0.6.0 
ide-python 0.1.1 
intentions 1.1.5 
language-cpp14 0.6.2 
linter 2.2.0 
linter-gcc 0.7.1 
linter-javac 1.9.4 
linter-ruby 1.2.6 
linter-shellcheck 1.4.6 
linter-ui-default 1.6.8 
minimap 4.29.6 
minimap-find-and-replace 4.5.2 
minimap-git-diff 4.3.1 
minimap-highlight-selected 4.6.1 
minimap-linter 2.0.2 
seti-ui 1.9.0 
sourcerer 2.0.0 

Failed to load the ide-python package

[Enter steps to reproduce below:]

  1. ..Search for package "python run".
  2. Select "ide-python" to install...

Atom Version: 0.188.0-d462895
System: linux 4.9.0-kali3-686-pae
Thrown From: ide-python package, v0.3.0

Stack Trace

Failed to load the ide-python package

At /root/.atom/packages/ide-python/lib/main.js:2
const { shell } = require("electron");
      ^
Unexpected token {

/root/.atom/packages/ide-python/lib/main.js:2
const { shell } = require("electron");
      ^
SyntaxError: Unexpected token {
  at exports.runInThisContext (vm.js:75:16)
  at Module._compile (module.js:458:25)
  at Object.loadFile [as .js] (/usr/share/atom/resources/app/src/babel.js:162:21)
  at Module.load (module.js:370:32)
  at Function.Module._load (module.js:325:12)
  at Module.require (module.js:380:17)
  at require (module.js:399:17)
  at Package.module.exports.Package.requireMainModule (/usr/share/atom/resources/app/src/package.js:678:34)
  at /usr/share/atom/resources/app/src/package.js:189:28
  at Package.module.exports.Package.measure (/usr/share/atom/resources/app/src/package.js:167:15)
  at Package.module.exports.Package.load (/usr/share/atom/resources/app/src/package.js:181:12)
  at PackageManager.module.exports.PackageManager.loadPackage (/usr/share/atom/resources/app/src/package-manager.js:383:14)
  at PackageManager.module.exports.PackageManager.activatePackage (/usr/share/atom/resources/app/src/package-manager.js:460:30)
  at /usr/share/atom/resources/app/node_modules/settings-view/lib/package-manager.js:268:29
  at exit (/usr/share/atom/resources/app/node_modules/settings-view/lib/package-manager.js:43:16)
  at BufferedProcess.triggerExitCallback (/usr/share/atom/resources/app/src/buffered-process.js:63:47)
  at /usr/share/atom/resources/app/src/buffered-process.js:77:18
  at Socket.<anonymous> (/usr/share/atom/resources/app/src/buffered-process.js:150:18)
  at Socket.emit (events.js:138:20)
  at Pipe.close (net.js:477:12)

Commands

  4x -7:24.2 window:increase-font-size (atom-pane.pane.active)
     -7:21.4 window:decrease-font-size (atom-pane.pane.active)
  3x -7:19.9 window:increase-font-size (atom-pane.pane.active)
     -5:44.4 core:confirm (atom-text-editor.editor.mini)
 26x -3:25.4 core:backspace (atom-text-editor.editor.mini)
     -3:15.8 core:confirm (atom-text-editor.editor.mini)
     -1:14.9 window:toggle-dev-tools (div.settings-view.pane-item)

Config

{
  "core": {
    "themes": [
      "atom-dark-ui",
      "one-dark-syntax"
    ]
  }
}

Installed Packages

# User
atom-clock, v0.1.15
ide-python, v0.3.0

# Dev
No dev packages

No features work!

I have tried using Atom 1.21.0-beta2, but ide-python does not work. What I mean by this is that none of the features such as autocompletion, outline view work. Infact, when I install ide-python, my regular autocomplete (from the autocomplete-python package) also stops working. Do you think you know what the problem could be?

Forever formatting loop

Hi! thx for the addon, it's been really useful to me.
However when running on file with hundreds of lines, it stopped working and the showed forever formatting loop.

I've set format on save in atom-ide-ui, so whenever I safe the file, typically it should format on the fly, but after it stopped working, it get all piled up in the task queue and not doing anything.

I'm wondering if this is normal with the python ide server or possible can be handled by the addon. Thx.

Set version of pyflakes used?

I have both Python 2 and Python 3 installed and pyflakes installed for both. However, since Python 2 is installed as python and Python 3 is installed as python3.6, pyflakes gives syntax errors based on Python 2 syntax. How can I change it so that it uses the Python 3 syntax?

Thanks in advance.

installing python language server

in the instructions it tell what to do to check if the python language is installed, but doesn't say where you use the pip install or what to do if it didn't work.

Segmentation fault in atom after installing atom-ide-ui and ide-python

I have installed atom-ide-ui and ide-python

Description

After opening a file through terminal like,
$ atom test.py
Firstly it takes a lot of time to open, after a window opens, the window becomes unresponsive and i have to force close it, after force closing, this message comes in the terminal,
/usr/bin/atom: line 129: 3930 Segmentation fault (core dumped) nohup "$ATOM_PATH" --executed-from="$(pwd)" --pid=$$ "$@" > "$ATOM_HOME/nohup.out" 2>&1

This is not happening for other languages, I've tested with ide-cpp and ide-c

Versions

Atom: 1.20.1
Client OS: Fedora 26
atom-ide-ui: 0.4.0
ide-python: 0.1.1

Screenshots

https://www.imageupload.co.uk/image/DNWw
https://www.imageupload.co.uk/image/DNWG
https://www.imageupload.co.uk/image/DNWI

virtualenv support doesn't work on Windows

This code:

https://github.com/lgeiger/ide-python/blob/b9fbf1e062e8c65979e73c236eaebf4c67a18a18/lib/main.js#L46-L68

Wont work on Windows since the virtualenv directory there is called Scripts (Uppercase S, though the Windows file system is case insensitive/preserving). Though you might also encounter virtualenvs with a bin sub-directory due to various Unix emulations on Windows, like cygwin or Bash on Ubuntu On Windows. It's probably best to search for both on Windows.

pyls absolute path doesn't expand

The absolute path to pyls doesn't expand when using home aliases or environment variables.

Works:
/home/test/.pyenv/shims/pyls

Doesn't work:
~/.pyenv/shims/pyls
$HOME/.pyenv/shims/pyls

This breaks config portability, should be an easy fix.
Tested on MacOS 10.13.2 with Atom 1.23.2.

Unable to start the Python language server

Getting this error every time I start atom:

Unable to start the Python language server.
This can occur if you do not have Python installed or if it is not in your path.

Make sure to install pyls by running:

pip install python-language-server

I'm running the atom beta 1.21.0-beta0 x64, and pyls --help returns as expected.

Action required: Greenkeeper could not be activated 🚨

🚨 You need to enable Continuous Integration on all branches of this repository. 🚨

To enable Greenkeeper, you need to make sure that a commit status is reported on all branches. This is required by Greenkeeper because we are using your CI build statuses to figure out when to notify you about breaking changes.

Since we did not receive a CI status on the greenkeeper/initial branch, we assume that you still need to configure it.

If you have already set up a CI for this repository, you might need to check your configuration. Make sure it will run on all new branches. If you don’t want it to run on every branch, you can whitelist branches starting with greenkeeper/.

We recommend using Travis CI, but Greenkeeper will work with every other CI service as well.

Once you have installed CI on this repository, you’ll need to re-trigger Greenkeeper’s initial Pull Request. To do this, please delete the greenkeeper/initial branch in this repository, and then remove and re-add this repository to the Greenkeeper integration’s white list on Github. You'll find this list on your repo or organiszation’s settings page, under Installed GitHub Apps.

# NOQA or analog.

When using flake8 I can add #NOQA flag and prevent showing errors and warnings for line or file. Here I can't. As I can understand this is because of using pyls that uses pyflakes. Can we do something exclude exact line from checks?

Python2 and Python3 Linter support? Am I doing this wrong?

I might be going about this the wrong way, but sometimes I edit both python2 and python3. Now, this ends up being a problem with pyflakes linter messages. I found a work around but it seems like I might have missed something, must be an easier way, if not, suggestion I suppose!

I install both language server packages

pip install python-language-server --user
pip3 install python-language-server --user

All I gotta do to get Atom, or rather pyflakes from Atom to use either one is edit the first line in ~/.local/bin/pyls to point to either /usr/bin/python2 or /usr/bin/python3.

With that, I have both syntax support. I feel like I gotta be making that more complicated?

screenshot from 2017-11-06 17-22-52
screenshot from 2017-11-06 17-22-23

PS: I Use Fedora

Autocomplete on dot

Just trying out this IDE and it's great so far, but one thing I noticed was that upon writing, for example re. the only autocompletion is a useless one from autocomplete plus:

screen shot 2017-09-22 at 15 11 03

As soon as I enter any more characters it works as expected:

screen shot 2017-09-22 at 15 11 24

It would be great to get the ide-python dot completions at that point like in the Java one:

screen shot 2017-09-22 at 15 21 11

Thanks!

Unable to start the Python language server.

screenshot from 2018-01-07 12-18-15

How can I get pyls package?

I got some errors "pip install python-language-server":

Collecting python-language-server
Downloading python-language-server-0.12.1.tar.gz (48kB)
100% |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 51kB 919kB/s
Collecting configparser (from python-language-server)
Downloading configparser-3.5.0.tar.gz
Collecting future>=0.14.0 (from python-language-server)
Downloading future-0.16.0.tar.gz (824kB)
100% |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 829kB 158kB/s
Collecting jedi>=0.10 (from python-language-server)
Downloading jedi-0.11.1-py2.py3-none-any.whl (250kB)
100% |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 256kB 279kB/s
Collecting json-rpc (from python-language-server)
Downloading json_rpc-1.10.8-py2.py3-none-any.whl (40kB)
100% |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 40kB 876kB/s
Collecting mccabe (from python-language-server)
Downloading mccabe-0.6.1-py2.py3-none-any.whl
Collecting pycodestyle (from python-language-server)
Downloading pycodestyle-2.3.1-py2.py3-none-any.whl (45kB)
100% |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 51kB 444kB/s
Collecting pydocstyle (from python-language-server)
Downloading pydocstyle-2.1.1-py2-none-any.whl
Collecting pyflakes (from python-language-server)
Downloading pyflakes-1.6.0-py2.py3-none-any.whl (227kB)
100% |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 235kB 14kB/s
Collecting rope>=0.10.5 (from python-language-server)
Downloading rope-0.10.7.tar.gz (244kB)
100% |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 245kB 249kB/s
Collecting yapf (from python-language-server)
Downloading yapf-0.20.0-py2.py3-none-any.whl (158kB)
100% |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 163kB 483kB/s
Collecting pluggy (from python-language-server)
Downloading pluggy-0.6.0.tar.gz
Requirement already satisfied: parso==0.1.1 in /usr/lib64/python2.7/site-packages (from jedi>=0.10->python-language-server)
Requirement already satisfied: six in /usr/lib64/python2.7/site-packages (from pydocstyle->python-language-server)
Requirement already satisfied: snowballstemmer in /usr/lib64/python2.7/site-packages (from pydocstyle->python-language-server)
Installing collected packages: configparser, future, jedi, json-rpc, mccabe, pycodestyle, pydocstyle, pyflakes, rope, yapf, pluggy, python-language-server
Running setup.py install for configparser ... error
Complete output from command /usr/bin/python2.7 -u -c "import setuptools, tokenize;file='/tmp/pip-build-wDL4K0/configparser/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /tmp/pip-KQH9ku-record/install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
creating build
creating build/lib
copying src/configparser.py -> build/lib
creating build/lib/backports
copying src/backports/init.py -> build/lib/backports
creating build/lib/backports/configparser
copying src/backports/configparser/helpers.py -> build/lib/backports/configparser
copying src/backports/configparser/init.py -> build/lib/backports/configparser
running egg_info
writing src/configparser.egg-info/PKG-INFO
writing namespace_packages to src/configparser.egg-info/namespace_packages.txt
writing top-level names to src/configparser.egg-info/top_level.txt
writing dependency_links to src/configparser.egg-info/dependency_links.txt
reading manifest file 'src/configparser.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'src/configparser.egg-info/SOURCES.txt'
running install_lib
copying configparser.py -> /usr/lib/python2.7/site-packages
error: [Errno 13] Permission denied: '/usr/lib/python2.7/site-packages/configparser.py'

----------------------------------------

Command "/usr/bin/python2.7 -u -c "import setuptools, tokenize;file='/tmp/pip-build-wDL4K0/configparser/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /tmp/pip-KQH9ku-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-wDL4K0/configparser/

delaying infoboxes while typing?

is it possible to set a delay between typing and infoboxes appearing, possibly in miliseconds?

Currently, all infoboxes appear and disappear right away while typing which can be disturbing, especcially while writing comments. A setting to have infoboxes appear only with a short delay after the last key pressed would be great.

Unable to set config of modules

Great work!

I want to increase the maximum line length for pycodestyle, however it seems to be impossible to do this now.

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.