QPYTHON3 not working *Solved | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

QPYTHON3 not working *Solved

is anyone having a problem with random in QPython? It worked great until very recently and now it says there is no module random.. I saved my codes and did a Uninstaller/ reinstall.. no luck. is this my problem or our problem? * Solved - Problem was that I named a file random.py ... this confused things. Apparently random.py is off limits!

19th Mar 2017, 1:20 PM
LordHill
LordHill - avatar
4 Answers
+ 8
Works for me. Try resetting the private space in the app's settings. BTW, other module working fine? math for example?
19th Mar 2017, 6:01 PM
Kuba SiekierzyƄski
Kuba SiekierzyƄski - avatar
+ 8
*thumbs up*
19th Mar 2017, 6:21 PM
Kuba SiekierzyƄski
Kuba SiekierzyƄski - avatar
+ 1
ok, I figured it out.. In an effort to help someone here I threw together a quick code in a file I named random.py.. apparently this is a no no lol. deleted the file and all is working again
19th Mar 2017, 6:15 PM
LordHill
LordHill - avatar
0
"Name 'random' is not defined" even scripts that use to work no longer work. copy and paste to the playground here and all works fine
19th Mar 2017, 6:06 PM
LordHill
LordHill - avatar