LoginSignup
1
2

More than 3 years have passed since last update.

VsCodeで自作モジュールをImportすると何故かNo name in module...と言われる

Last updated at Posted at 2020-01-24

Pylintを導入した状態で、プログラム直下にあるフォルダからモジュールをImportするとVsCode上で何故かエラーが表示される。
直下にあるフォルダからのImportなので、実行自体は問題なく動く。

解決方法

モジュールが入っているフォルダに空のinit.pyを作成する。

$ touch ./modules/__init__.py

__init__.pyがないと検索に引っかからないのかな。

1
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
2