jorgenschaefer / elpy

Emacs Python Development Environment
GNU General Public License v3.0
1.89k stars 259 forks source link

flymake-proc alway running while edit python file #1223

Closed chenpoyang closed 6 years ago

chenpoyang commented 6 years ago

while edit python file in elpy-mode, an applet always pop up(ps aux | grep python), in emacs, it's flymake-proc(flake8 maybe), and Elpy Output:

Output from Backend

There was some unexpected output from the Elpy backend. This is usually some
module that does not use correct logging, but might indicate a configuration
problem.

Output

(process:86782): Gtk-WARNING **: Locale not supported by C library.
    Using the fallback 'C' locale.

LC_ALL is: en_US.UTF-8 LANG is: en_US.UTF-8 how to fix it?

galaunay commented 6 years ago

Just to be sure this is an Elpy related problem:

As this is only a warning, I suppose that flake8 still works ? So you are just annoyed by the pop-up ?

If it is really annoying, you can add the following snippet to your "init.el" to prevent elpy for popping up messages (as a temporary solution):

(defun elpy-rpc--handle-unexpected-line (line)
  "Handle an unexpected line from the backend.

This is usually an error or backtrace."
  (message "[Elpy backend output] %s" line)) 

(should work, untested)

chenpoyang commented 6 years ago

while edit python file: str = "some string" str. "str." auto complete show a list view, and a frew seconds, an applet pop up in docky. after i add the code to init.el, still pop an applet:

(defun elpy-rpc--handle-unexpected-line (line)
  "Handle an unexpected line from the backend.

This is usually an error or backtrace."
  (message "[Elpy backend output] %s" line)) 

emacs Elpy Output is:

Output from Backend

There was some unexpected output from the Elpy backend. This is usually some
module that does not use correct logging, but might indicate a configuration
problem.

Output

(process:54183): Gtk-WARNING **: Locale not supported by C library.
    Using the fallback 'C' locale.
2017-12-06 08:01:33.077 Python[54183:9772687] *** WARNING: Method userSpaceScaleFactor in class NSView is deprecated on 10.7 and later. It should not be used in new applications. Use convertRectToBacking: instead. 

the applet in docky's image like:python applet(a rocket) system, uname -a:

Darwin macbook.local 17.2.0 Darwin Kernel Version 17.2.0: Fri Sep 29 18:27:05 PDT 2017; root:xnu-4570.20.62~3/RELEASE_X86_64 x86_64
galaunay commented 6 years ago

You should add it after Elpy is loaded, to overwrite the real python-shell-send-region. But as I said, this is a temporary solution, you really should go to the bottom of your gtk error.

chenpoyang commented 6 years ago

while run emacs in terminal instead of xemacs, just a python process launch(an applet pop):

2017-12-06 08:01:33.077 Python[54183:9772687] *** WARNING: Method userSpaceScaleFactor 
in class NSView is deprecated on 10.7 and later. It should not be used in new applications. 
Use convertRectToBacking: instead.

the process id is :54183

so the problem may be:

There was some unexpected output from the Elpy backend. This is usually some
module that does not use correct logging, but might indicate a configuration
problem.
chenpoyang commented 6 years ago

i remove the modules i recently installed, and reinstall it , it works, it doesn't pop an applet.

sudo pip install rope
sudo pip install jedi
sudo pip install flake8
sudo pip install importmagic
sudo pip install autopep8
sudo pip install virtualenv
sudo pip install pygtksourceview
sudo pip install pygtk
sudo pip install scrapy
sudo pip install argparse
sudo pip install sh
sudo pip install suds
sudo pip install requests
sudo pip install pelican
sudo pip install markdoc
sudo pip install pep8
sudo pip install Pygments
sudo pip install itertools
sudo pip install paramiko
sudo pip install selenium
sudo pip install lxml
sudo pip install mechanize
sudo pip install pycurl
sudo pip install Fabric
sudo pip install xmltodict
sudo pip install urllib3
sudo pip install ipdb
sudo pip install redis
sudo pip install pymongo
sudo pip install mako
sudo pip install numpy
sudo pip install matplotlib
sudo pip install scrapy
sudo pip install tornado
sudo pip install web.py
sudo pip install web2py
sudo pip install uliweb
sudo pip install flask
sudo pip install twisted
sudo pip install bottle
sudo pip install cherrypy
sudo pip install vinta
sudo pip install gtksourceview
sudo pip install pygments
sudo pip install elpy

pip install pygtk only support in windows, and there is module in (brew install pygtk), it is the wrong configuration