pythonic-emacs / anaconda-mode

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

autocomplete broken 'wrong-type-argument listp' #404

Closed kancom closed 3 years ago

kancom commented 3 years ago

Hi. My auto-completition doesn't work( The error is below:

OS: Ubuntu 18.04.5 LTS 
Emacs: 27.1 (Spacemacs develop @ 64900229a1e020d0b0b942efe112ca968e24aa05)
anaconda-mode: 20190111.1524
Python: 3.8.0
anaconda-mode-20210101.833
company-anaconda-20200404.1859
company-20210103.1124
./jedi-0.18.0-py3.8.egg
./parso-0.8.1-py3.8.egg
./service_factory-0.1.6-py3.8.egg

Here I try to complete 'impor' keyword:

Debugger entered--Lisp error: (wrong-type-argument listp [["import" "keyword" "The \"import\" statement\n**********************\n\n   ..." "/home/andrey/My_Programs/Git/sphere/crystal.dataso..." nil]])
  #f(compiled-function (result) #<bytecode 0x3a7335d>)([["import" "keyword" "The \"import\" statement\n**********************\n\n   ..." "/home/andrey/My_Programs/Git/sphere/crystal.dataso..." nil]])
  #f(compiled-function (status) #<bytecode 0x3a73a15>)(nil)
  apply(#f(compiled-function (status) #<bytecode 0x3a73a15>) nil)
  url-http-activate-callback()
  url-http-content-length-after-change-function(108 9354 9246)
  url-http-wait-for-headers-change-function(1 9359 9358)
  url-http-generic-filter(#<process 127.0.0.1> "HTTP/1.1 200 OK\15\nServer: BaseHTTP/0.6 Python/3.8.0...")
  read-event(nil t 0.5)
  sit-for(0.5 t)
  company--fetch-candidates("impor")
  company-calculate-candidates("impor" nil)
  company--begin-new()
  company--perform()
  company-auto-begin()
  company-idle-begin(#<buffer factories.py> #<window 3 on factories.py> 1420 355)
  apply(company-idle-begin (#<buffer factories.py> #<window 3 on factories.py> 1420 355))
  timer-event-handler([t 24568 24310 167037 nil company-idle-begin (#<buffer factories.py> #<window 3 on factories.py> 1420 355) nil 530000])
binshengliu commented 3 years ago

I also had a "wrong-type-argument listp" issue after upgrading but it came from anaconda-mode-find-definitions . I reinstalled the package and the problem was gone. It might be worth trying. Just make sure the dependent package company-anaconda is also removed otherwise anaconda-mode may not be actually uninstalled.

kancom commented 3 years ago

I also had a "wrong-type-argument listp" issue after upgrading but it came from anaconda-mode-find-definitions . I reinstalled the package and the problem was gone. It might be worth trying. Just make sure the dependent package company-anaconda is also removed otherwise anaconda-mode may not be actually uninstalled.

Well, thanks so much. Now after removal both packages are in dependency state and auto-completion works!

  anaconda-mode      20210101.833  dependency            Code navigation, documentation lookup and completion for Python
  blacken            20200626.2018 dependency            Reformat python buffers using the "black" formatter
  centered-cursor-mode 20200507.1529 dependency            cursor stays vertically centered
  cfrs               20210108.1152 dependency            Child-frame based read-string
  clang-format       20191106.950  dependency            Format code using clang-format
  closql             20200704.2124 dependency            store EIEIO objects using EmacSQL
  company-anaconda   20200404.1859 dependency            Anaconda backend for company-mode