Skip to content

Chapter 1. 3. ASCII art: print() generates error warnings NON FATALΒ #2

Open
@OldSubSailor

Description

@OldSubSailor

After entering "ASCII art" code and running it, the following warnings are generated:
<>:1: SyntaxWarning: invalid escape sequence '\ _'
<>:1: SyntaxWarning: invalid escape sequence '_'
/var/folders/5d/8ps0wwr92kz35g594xfrd5zm0000gp/T/ipykernel_1141/1582080886.py:1: SyntaxWarning: invalid escape sequence '_'
print(" /_/\ ")

The Pasted warning is not showing properly, it should appear as:
... "invalid escape sequence '\ _' " I had to put a space in the first one for it to appear as shown on the notebook.
Note the appearance of the second and third SyntaxWarnings that only show an underscore rather than the entire escape sequence "cat" code.

It does not halt the generation of the art, but adds the warning under it.
You might want to add an update to the notebook about this showing up.
I am running a Mac mini M2 processor, macOS 14.2
Anaconda is using Python 3.12

Metadata

Metadata

Assignees

No one assigned

    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