How to Solve NameError: name 'gdalconst' is not defined -- osgeo
Solution: Import the 'gdalconst' module
To Solve the error, add the following line to the top of your code.
from osgeo import gdalconst
For more information:
Python osgeo gdalconst