Open alpterlab opened 4 years ago
It seems a problem of my local installation.... :- (
I found the problem.. it is connected to the installation of another plugin... go2mapillary Whenever I do install it... this pugin "joinmultiplelines" starts not to function anymore with the above error.....
@alpterlab I'm the developer of go2mapillary. having a look to exception trace it appear that is thrown by resources.py of mapillary plugin. but that file is non longer needed and should be deleted manually. Even if I will soon release a new version deletin resurces files, @dgoedkoop I found very strange that your plugin import resources https://github.com/dgoedkoop/joinmultiplelines/blob/f9c201e87357b2237abea99e4de9f8b93908b798/joinmultiplelines.py#L61 without using it in the code and without having resources.py in your path. I think there is some sys.path issue. You try to import resources without any need and I left an old version of the file forgetting to delete it.
The resource file is used to display the icon on the toolbar, in this line: https://github.com/dgoedkoop/joinmultiplelines/blob/f9c201e87357b2237abea99e4de9f8b93908b798/joinmultiplelines.py#L69
I think I could make this code more robust by using sys.path.insert(0, ...)
instead of sys.path.append(...)
, before doing import resources
Why not simply get rid of resources and load directly the icon:
self.action = QAction(QIcon(os.path.join(os.path.dirname(__file__),"icon.png")), "Join multiple lines", self.iface.mainWindow())
and remove sys.path.append(os.path.dirname(__file__))
?
I think that the issue is caused by sys.path runtime mismatch.
Hello @dgoedkoop @pcav I am having issues with the plugin on this error.... reffering to python incompatibilty ? I wondering if it is a personal installation problem or just an issue connected to Backwards Incompatible Changes ImportError: PyQt4 classes cannot be imported in QGIS 3.x. Use PyQt5 or the version independent qgis.PyQt import instead.