Error codes

E0006: unknown escape sequence

In a terminal: auk explain E0006 prints this page.

On this page

A backslash in a string or char literal is followed by something that isn't a valid escape. The escapes are \n \t \r \0 \\ \" \' and \u{1F986}; anything else is rejected so a typo can't silently change the text.

Wrong#

auk
fn path(): str = "C:\auk\files"

Fixed#

auk
fn path(): str = r"C:\auk\files"

Common causes#

  • A Windows path or regex in a normal string: use a raw string r"..." or write \\.
  • \x41 or \u0041 from other languages: write \u{41}.
  • A code point above \u{10FFFF}.

Stuck on a word? Try the glossary. Got a compiler error? Look up its code. Improve this page