May-04-2021, 03:28 PM
You your file /home/pi/moon.py is being found instead of the
moon
module. Don't use the same name for a file and a module. Rename your moon.py to something different.