I am using Qgis 3.4.9. How can i fix To fix the error: NameError: global name 'QgsMapLayerRegistry' is not defined.
from qgis.core import QgsMapLayerRegistry Is not working in Qgis 3.4.9
QgsMapLayerRegistry.instance().addMapLayer(point_layer)
QgsMapLayerRegistry: Its functionality has been moved to QgsProject.
Syntax:
QgsProject.instance().addMapLayer(your_Qgs_whaterver_Layer)
Example:
QgsProject.instance().addMapLayer(point_layer)