gee-community / qgis-earthengine-plugin

Integrates Google Earth Engine and QGIS using Python API
http://qgis-ee-plugin.appspot.com
MIT License
454 stars 116 forks source link

AttributeError: 'WindowsPath' object has no attribute 'rstrip' #77

Closed sarviovalente closed 3 years ago

sarviovalente commented 3 years ago

This error occurs when trying to open the plugin (check-in box manage plugin).

sarviovalente commented 3 years ago

How to solve.

It's a bug in file init.py located in:

C:\Program Files\QGIS 3.10\apps\Python37\lib\site-packages\pkg_resources

init.py

in line fspath = fspath.rstrip(os.sep)

to solve, you should convert fspath to string

So, just add the line before use rstrip function fspath = os.fspath(path) #Sarvio Valente fspath = fspath.rstrip(os.sep)

So. I think the plugin is calling the function (def _zipinfo_name(self, fspath):) where the rstrip is used. So, before calling this function, you should guarantee the fspath is string.

Sarvio Valente