Pycharm error: Cannot determine module type ("WEB_MODULE")

When I had a similar problem (type="RUBY_MODULE") it was because I had opened the directory containing the code originally using RubyMine so it created the .idea directory/content based on what it supports.

I don't know if you (or someone else) originally used something else that created the .idea directory so YMMV, but per the link you listed, the WEB_MODULE type only seems to apply to IntelliJ Ultimate.

To fix this, simply change the type to PYTHON_MODULE in the .iml file, restart PyCharm and the warning should go away. If you are, in fact, using IntelliJ, you should be fine as PYTHON_MODULE is supported by the Ultimate edition per your link (although you may have to install a specific python add-in).


It's worked for me just by remove directory .idea and reopen Pycharm.