E
E
ednichivorov2020-11-14 21:13:37
Python
ednichivorov, 2020-11-14 21:13:37

How to fix No module named. file name?

5fb01d40af871198482935.png
The file finds and connects, but it does not work correctly, hints of declared variables do not work.
Constantly displays an error - No module named.Stock: 1
The files are in the same folder

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Andy_U, 2020-11-15
@ednichivorov

Either the script itself is not there, or the module / package, or you are launching it from the wrong directory.
I don't see any executable file or module/package in the "Project" tab. Show the complete project structure, Run/debug configuration, so you don't have to ask Properties->Project->Project Structure twice.
Just written

M
Maxim Dunayevsky, 2020-11-14
@dunmaksim

Use the from ... import ... as ... construct . Check if there is an __init__.py file in the directory with the Stock module . If it's not there, create it.

S
Sergey Polyakov, 2020-11-15
@IamSVP

Check the module path . Usually this is a mistake.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question