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

Error with weird chars on history backend #1

Open
spothound opened this issue Dec 19, 2020 · 0 comments
Open

Error with weird chars on history backend #1

spothound opened this issue Dec 19, 2020 · 0 comments
Labels
bug Something isn't working

Comments

@spothound
Copy link
Collaborator

When cat this file with the logger enabled this error is produced:

Traceback (most recent call last):
  File "/tmp/.mount_xonshkuQ9Sa/opt/python3.8/lib/python3.8/site-packages/xonsh/main.py", line 420, in main
    sys.exit(main_xonsh(args))
  File "/tmp/.mount_xonshkuQ9Sa/opt/python3.8/lib/python3.8/site-packages/xonsh/main.py", line 458, in main_xonsh
    shell.shell.cmdloop()
  File "/tmp/.mount_xonshkuQ9Sa/opt/python3.8/lib/python3.8/site-packages/xonsh/ptk_shell/shell.py", line 259, in cmdloop
    self.default(line)
  File "/tmp/.mount_xonshkuQ9Sa/opt/python3.8/lib/python3.8/site-packages/xonsh/base_shell.py", line 377, in default
    self._append_history(inp=src, ts=[ts0, ts1], tee_out=tee_out)
  File "/tmp/.mount_xonshkuQ9Sa/opt/python3.8/lib/python3.8/site-packages/xonsh/base_shell.py", line 412, in _append_history
    hist.append(info)
  File "/tmp/.mount_xonshkuQ9Sa/opt/python3.8/lib/python3.8/site-packages/xontrib/json_syslog_history_backend.py", line 63, in append
    self._register_cmd(cmd)
  File "/tmp/.mount_xonshkuQ9Sa/opt/python3.8/lib/python3.8/site-packages/xontrib/json_syslog_history_backend.py", line 85, in _register_cmd
    self.write_logs(log_line)
  File "/tmp/.mount_xonshkuQ9Sa/opt/python3.8/lib/python3.8/site-packages/xontrib/json_syslog_history_backend.py", line 94, in write_logs
    fd.write(' '.join(log_string.split())+"\n")
UnicodeEncodeError: 'utf-8' codec can't encode character '\udcf3' in position 129817: surrogates not allowed
Xonsh encountered an issue during launch
Failback to /bin/xonsh

We should check the cause and fix it ASAP.

@spothound spothound added the bug Something isn't working label Dec 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant