[Python] How to get rid of warning message "NSApplicationDelegate" on MacOS? [duplicate]

Discussão em 'Python' iniciado por Stack, Julho 7, 2025.

  1. Stack

    Stack Membro Participativo

    Using python 3.9.6 on MacOs 14.7.6 I get a warning

    2025-07-07 21:59:22.588 Python[22277:1117347] WARNING: Secure coding is automatically enabled for restorable state! However, not on all supported macOS versions of this application. Opt-in to secure coding explicitly by implementing NSApplicationDelegate.applicationSupportsSecureRestorableState:.


    in the termimal, when running a code like the following

    import matplotlib.pyplot as plt

    plt.figure(figsize=(8, 5))
    plt.plot([0,1,2], [3,4,5])
    plt.xlabel("x axis")
    plt.ylabel("y axis")
    plt.title("title")
    plt.grid(True)
    plt.show()


    How can I suppress this warning? Also, I do not understand what this is about. And I do not care at all! I just want to run this example code and never see that stupid warning again.

    Continue reading...

Compartilhe esta Página