Pylint unable to find packages inside the folder(tree). Python able to recognise the path.

Hi Team, Pylint unable to find packages inside the folder(tree). The folder structure app • utils • utils • some function Statement: from app.utils.utils import some function Error: Unable to import 'app.utils.utils’ This path works fine with python but pylint throws the error, can you please help with the issue? Confidentiality Notice: The information contained herein is for informational purposes only and should not be construed as legal or tax advice. The information contained in this message, including any attachments, contains information that may be confidential and privileged. It is intended to be read only by the individual or entity to whom it is addressed. If you are not the intended recipient, please notify the sender by replying to this message and delete the material immediately from your system. Any further use, dissemination, distribution or reproduction of this message is strictly prohibited.

Hey,
Pylint unable to find packages inside the folder(tree). The folder structure app • utils • utils • some function
Statement: from app.utils.utils import some function Error: Unable to import 'app.utils.utils’
This path works fine with python but pylint throws the error, can you please help with the issue?
Can you show a complete, runnable example instead of a vague description that has other issues? (your import statement above is a SyntaxError). See http://www.sscce.org/ This works fine: $ mkdir -p app/utils $ echo "def some_function(): pass" > app/utils/utils.py $ echo "from app.utils.utils import some_function" > main.py $ tree . ├── app │ └── utils │ └── utils.py └── main.py 3 directories, 2 files $ pylint main.py ************* Module main main.py:1:0: C0114: Missing module docstring (missing-module-docstring) main.py:1:0: W0611: Unused some_function imported from app.utils.utils (unused-import) ----------------------------------- Your code has been rated at 0.00/10 $ pylint --version pylint 2.17.4 astroid 2.15.5 Python 3.11.4 (main, Jun 8 2023, 11:01:33) [GCC 13.1.1 20230429]
Any further use, dissemination, distribution or reproduction of this message is strictly prohibited.
I know this is just the default disclaimer by your employer, but note you're sending this to a public mailing list which will absolutely cause it to be distributed and publicly archived. Florian
participants (2)
-
Florian Bruhin
-
Mohith Devathi