Python Forum
Python-Can I get some help with this ModuleError
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Python-Can I get some help with this ModuleError
#11
You must learn to describe clearly a problem you have.

(Sep-23-2022, 12:02 AM)AlexPython Wrote: The program works fine if I run it on Pycham but if I try to run it on IDLE 3.9 it displays an error.

Your description in the first post does not reconcile with your later explanation about that import line. There is no way it worked fine in PyCharm, given there is no module k.
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs

Reply
#12
Unless there was a k.py file somewhere in pycharm's search path. That is more in line with pycharm offering ro add an import line. When running with IDLE are you using the same code in the same folders?
Reply
#13
(Sep-26-2022, 01:19 PM)deanhystad Wrote: Unless there was a k.py file somewhere in pycharm's search path.

That was my initial guess, based on the first OP post

(Sep-23-2022, 06:48 AM)buran Wrote: Is k a module (py file) located next to your script in PyCharm project folder?

And they didn't respond affirmative
(Sep-26-2022, 01:19 PM)deanhystad Wrote: When running with IDLE are you using the same code in the same folders?
And from same CWD
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs

Reply


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020