Error: name 'xmbc' is not defined
#1
Hello Kodi community! I'm starting to learn how to develop add-ons via the Kodi wiki tutorials, but I've run into an issue that I'm struggling to figure out. I have modified the hello world tutorial add-on so addon.py has: 
python:
import xbmc
import xbmcaddon
import xbmcgui

monitor = xbmc.Monitor()
while not monitor.abortRequested():
    if xbmc.Player().isPlaying():
        xmbc.sleep(1000)
        try:
           playTime = xbmc.Player().getTime()
           print(playTime)
        except:pass
The rest of the code is identical to the official repository. However, once I started a video in Kodi, I got the error in the log that's on line 593 in this paste bin. Since I imported xbmc in the first line of my python script, how can 'xmbc' not be defined? I've been searching around the forums to help with troubleshooting this, but I haven't found anything yet. I'm guessing I made a syntax mistake, but I'm not sure. Any insights would be greatly appreciated!
Reply
#2
xmbc != xbmc
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
#3
(2021-10-23, 09:59)ronie Wrote: xmbc != xbmc

Oh! Rookie mistake on my part. I'll change that instance of 'xmbc' to 'xbmc'. Thanks so much!
Reply

Logout Mark Read Team Forum Stats Members Help
Error: name 'xmbc' is not defined0