pythonic-emacs / anaconda-mode

Code navigation, documentation lookup and completion for Python.
GNU General Public License v3.0
708 stars 87 forks source link

completion with python 2.7 #333

Closed silgon closed 5 years ago

silgon commented 5 years ago

I recently updated to emacs26 because the update of anaconda-mode asked me at least emacs25 (I was in 24). I use for some projects python 3 and for others 2.7. Autocompletion works fine with 3, however it's not the case for 2.7

The anaconda-mode buffer throws at me always the same message:

Traceback (most recent call last):
  File "<string>", line 61, in <module>
AttributeError: 'list' object has no attribute 'clear'
Traceback (most recent call last):
  File "<string>", line 61, in <module>
AttributeError: 'list' object has no attribute 'clear'
Traceback (most recent call last):
  File "<string>", line 61, in <module>
AttributeError: 'list' object has no attribute 'clear'

My environments are set with anaconda, and I activate the environment with M-x pythonic-activate Enter /path/to/anaconda/envs/myenv/.

As for the versions. I don't exactly know how to get them, so I give you the output given by package-list-packages of my currently installed packages.

anaconda-mode      20181006.2209
pythonic           20180920.2315

Something I think is important is also the following:

$ ls .emacs.d/anaconda-mode/0.1.13/
easy-install.pth  jedi-0.13.1-py3.7.egg  parso-0.3.1-py3.7.egg  service_factory-0.1.5-py3.7.egg

Can you help me to troubleshoot the problem?

Thanks in advance.

dakra commented 5 years ago

This is fixed in https://github.com/proofit404/anaconda-mode/commit/61957aa15f0046fefee22c7bae5953f2018f023d and should already be on melpa. Try updating anaconda-mode.

silgon commented 5 years ago

You guys are great. Just tested it. Thanks!!