I'm getting 'module' object has no attribute error whenever I am trying to run my Python scripts on Notepad++, I've tried using just Run command and I got the same error. I've followed a reductionist approach and written two line code to narrow down the problem. I've tested the code on native IDLE and Notepad++. IDLE runs the script perfectly where as Notepad++ throws an error. I've checked pathways, installations, even UTF encodings and there is not a single problem. Code is given below, and in order not to have a problem it is taken from Python.org itself. I've searched the web but I could not find an answer, those who had problems generally had typos in their code however I've tested my code for typos and reduced it to a state just to show error and cross validated using native IDLE.
import random
A = random.randint(1, 10)
Aucun commentaire:
Enregistrer un commentaire