pythonic-emacs / anaconda-mode

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

codecomplete donnot work in my project #389

Closed zcjava closed 4 years ago

zcjava commented 4 years ago

anaconda can code-complete python dependencies. but in my project. it donnot code-complete my def function in other python file

zcjava commented 4 years ago

b. not work

dakra commented 4 years ago

What's the value of company-minimum-prefix-length? By default that's 3 which means only after 3 characters you get a company completion.

dakra commented 4 years ago

Does anything happen when you call M-x company-complete? Is there output in the *anaconda-mode* buffer?

zcjava commented 4 years ago

use company-complete , it tips : don not match. anaconda-mode buffer is not problem. anaconda-mode is work. see above images . logging class is work. but my project class not work

dakra commented 4 years ago

Hmm. Are a.py and b.py really in a proper python package? I.e. is there a __init__.py file in the same folder? Otherwise I'm out of guesses ;)

zcjava commented 4 years ago

yes . same project same package . i sure.

zcjava commented 4 years ago

u see above image about from . import b. i use flycheck . is not error. compiler correct

zcjava commented 4 years ago

Hmm. Are a.py and b.py really in a proper python package? I.e. is there a __init__.py file in the same folder? Otherwise I'm out of guesses ;)

but thanks

dakra commented 4 years ago

Flycheck has multiple backends. what checker is active?

Just to make double sure. In your directory are:

__init__.py
a.py
b.py

Because it really looks like it isn't with all you described so far.

zcjava commented 4 years ago

Flycheck has multiple backends. what checker is active?

Just to make double sure. In your directory are:

__init__.py
a.py
b.py

Because it really looks like it isn't with all you described so far.

i use scrapy shell create projecte . director must be corrent. because my home pc same project and same spacemacs properties can work . but my work pc not work . i berserk.

zcjava commented 4 years ago

Flycheck has multiple backends. what checker is active?

Just to make double sure. In your directory are:

__init__.py
a.py
b.py

Because it really looks like it isn't with all you described so far.

flycheck is active . see above image about major mode list . director list :

    ├── BillFlow.py
    ├── BizUtil.py
    ├── CorpYearBill.py
    ├── PersonYearBill.py
    ├── TeamYearBill.py
    ├── Utils.py
    ├── __init__.py
    ├── a.py
    ├── b.py
    └── org
dakra commented 4 years ago

This is strange. Did you say it works on one PC and not on another? Some OS, same Python etc?

zcjava commented 4 years ago

This is strange. Did you say it works on one PC and not on another? Some OS, same Python etc?

yes. same os(mac os ) , same py(python3.7.7), same spacemacs setting, same project . is very strage.

zcjava commented 4 years ago

Flycheck has multiple backends. what checker is active?

Just to make double sure. In your directory are:

__init__.py
a.py
b.py

Because it really looks like it isn't with all you described so far.

OMG! i get reason what problem. u are right. i import module error . anaconda is correct. but why python compile pass?

dakra commented 4 years ago

Nice. I think we can close this issue then?

I think the pycompile checker just checks if the syntax is correct. It's doesn't actually run the import and look if that module is actually there while jedi actually does the import for the completion (which then failed).

zcjava commented 4 years ago

Nice. I think we can close this issue then?

I think the pycompile checker just checks if the syntax is correct. It's doesn't actually run the import and look if that module is actually there while jedi actually does the import for the completion (which then failed).

u are right . same project code and same python env and same spacemacs settings in two pc machine . i donnot know why import module incorrect in one pc and corrrent in other one pc. but actually just import module problem.