← 输入框|github.com|刷新
Skip to content

AttributeError: attribute 'msg' of 'SyntaxError' objects is not writable #6492

Closed

Description

@anki-code

Hi! I'm trying to run xonsh and sometimes I have this stack trace e.g. in #6489 (comment) where the command ls /:

ls /
Traceback (most recent call last):
  File "/Users/pc/.local/lib/rustpython3.13/site-packages/xonsh/shells/base_shell.py", line 524, in compile
    compile_empty_tree=False,
  File "/Users/pc/.local/lib/rustpython3.13/site-packages/xonsh/execer.py", line 131, in compile
    tree = self.parse(input, ctx, mode=mode, filename=filename, transform=transform)
  File "/Users/pc/.local/lib/rustpython3.13/site-packages/xonsh/execer.py", line 87, in parse
    tree, input = self._parse_ctx_free(input, mode=mode, filename=filename)
  File "/Users/pc/.local/lib/rustpython3.13/site-packages/xonsh/execer.py", line 346, in _parse_ctx_free
    return _try_parse(input, greedy=True)
  File "/Users/pc/.local/lib/rustpython3.13/site-packages/xonsh/execer.py", line 344, in _parse_ctx_free
    return _try_parse(input, greedy=False)
  File "/Users/pc/.local/lib/rustpython3.13/site-packages/xonsh/execer.py", line 338, in _try_parse
    input = "\n".join(lines)
  File "/Users/pc/.local/lib/rustpython3.13/site-packages/xonsh/execer.py", line 239, in _try_parse
    debug_level=(self.debug_level >= 2),
  File "/Users/pc/.local/lib/rustpython3.13/site-packages/xonsh/parsers/base.py", line 505, in parse
    tree = self.parser.parse(input=s, lexer=self.lexer, debug=debug_level)
  File "/Users/pc/.local/lib/rustpython3.13/site-packages/xonsh/parsers/ply/yacc.py", line 335, in parse
    return self.parseopt_notrack(input, lexer, debug, tracking, tokenfunc)
  File "/Users/pc/.local/lib/rustpython3.13/site-packages/xonsh/parsers/ply/yacc.py", line 1203, in parseopt_notrack
    tok = call_errorfunc(self.errorfunc, errtoken, self)
  File "/Users/pc/.local/lib/rustpython3.13/site-packages/xonsh/parsers/ply/yacc.py", line 194, in call_errorfunc
    r = errorfunc(token)
  File "/Users/pc/.local/lib/rustpython3.13/site-packages/xonsh/parsers/base.py", line 3685, in p_error
    self._parse_error(msg, self.currloc(lineno=p.lineno, column=p.lexpos))
  File "/Users/pc/.local/lib/rustpython3.13/site-packages/xonsh/parsers/base.py", line 632, in _parse_error
    raise_parse_error(msg, loc, self._source, self.lines)
  File "/Users/pc/.local/lib/rustpython3.13/site-packages/xonsh/parsers/base.py", line 212, in raise_parse_error
    err.msg = str(msg) if msg else ""
AttributeError: attribute 'msg' of 'SyntaxError' objects is not writable

Activity

  1. coderabbitai commented on Dec 24, 2025

    @coderabbitai
    Contributor

    📝 CodeRabbit Plan Mode

    Generate an implementation plan and prompts that you can use with your favorite coding agent.

    • Create Plan
    Examples

    🔗 Similar Issues

    Related Issues

    👤 Suggested Assignees

    🧪 Issue enrichment is currently in open beta.

    You can configure auto-planning by selecting labels in the issue_enrichment configuration.

    To disable automatic issue enrichment, add the following to your .coderabbit.yaml:

    issue_enrichment:
      auto_enrich:
        enabled: false

    💬 Have feedback or questions? Drop into our discord!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions