Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

neatoserial[basic].py crashes in german latin1 environment #12

Open
sturmi opened this issue Oct 20, 2024 · 2 comments
Open

neatoserial[basic].py crashes in german latin1 environment #12

sturmi opened this issue Oct 20, 2024 · 2 comments

Comments

@sturmi
Copy link

sturmi commented Oct 20, 2024

Hi,
thank you for this great project!
neatoserial.py and netoserialbasic.py will crash when receiving error messages from Neato robot containing umlauts.
To correct that just change those lines:

        self.ser.write(inp.encode('utf-8'))
        time.sleep(1)
        while self.ser.inWaiting() > 0:   
            out += self.read_all(self.ser).decode('utf-8')

to

        self.ser.write(inp.encode('latin1'))
        time.sleep(1)
        while self.ser.inWaiting() > 0:   
            out += self.read_all(self.ser).decode('latin1')

regards
Thomas

@jeroenterheerdt
Copy link
Owner

Thanks, Please make a PR!

@sturmi
Copy link
Author

sturmi commented Oct 21, 2024

Hi,
I don't understand what to do creating a pull request. Sorry.
Maybe you can add 'encode' and 'decode' to config.yaml. So user can choose which one to use.
Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants