How to Solve NameError: name 'xbmcplugin' is not defined

Solution: Import the 'xbmcplugin' module

# Add the following line to the top of your code
import xbmcplugin

 

For more information:
Python xbmcplugin