I'm trying to create a plugin which will extract the gpx files and load them onto the active layer window in QGIS. While I'm able to load it using the QGIS GUI from Layer>New Vector Layer, I'm not able to make it happen from the python console.
You can find a screenshot of the error here.
I've tried using the following commands but in vain.
>>> vlayer = QgsVectorLayer(path,'new_layer','gpx')
did not display any error at the same time it did not appear in the list of active layers. Tried using setActiveLayer() but it returned False.
Any help or suggestions would be welcomed !