

.. _sphx_glr_auto_examples_no_output_plot_syntaxerror.py:


SyntaxError
===========

Example script with invalid Python syntax




.. code-block:: pytb

    Traceback (most recent call last):
      File "/build/sphinx-gallery-uEiUXS/sphinx-gallery-0.1.13/examples/no_output/plot_syntaxerror.py", line 14
        Invalid Python code
                     ^
    SyntaxError: invalid syntax





.. code-block:: python

    # -*- coding: utf-8 -*-
    """
    Example with SyntaxError
    ========================

    Sphinx-Gallery uses Python's AST parser, thus you need to have written
    valid python code for Sphinx-Gallery to parse it. If your script has a
    SyntaxError you'll be presented the traceback and the original code.

    """
    # Code source: Óscar Nájera
    # License: BSD 3 clause

    Invalid Python code

**Total running time of the script:** ( 0 minutes  0.000 seconds)



.. only :: html

 .. container:: sphx-glr-footer


  .. container:: sphx-glr-download

     :download:`Download Python source code: plot_syntaxerror.py <plot_syntaxerror.py>`



  .. container:: sphx-glr-download

     :download:`Download Jupyter notebook: plot_syntaxerror.ipynb <plot_syntaxerror.ipynb>`


.. only:: html

 .. rst-class:: sphx-glr-signature

    `Gallery generated by Sphinx-Gallery <https://sphinx-gallery.readthedocs.io>`_
