1

I'm using qgis and I keep getting an error when using the point sampling tool, its keeping me from getting the sampling done. Does anyone has an idea what is it about?

Thanks!

error

3

Quick workaround: change str(self.inSample.currentText()) to str(self.inSample.currentText().encode('ascii', 'replace')). It's 'lossy' in that non-ASCII characters will be converted to _, but at least it'll run.

However, there really shouldn't be that str() operation to begin with if .currentText() returns a unicode object to start with, that's a lossy downcast. Another option is to use the locale module in the Python window before running the tool to set your language/preferred string encoding so str() does the right thing.

I'd file a bug with the tool author.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.