Text of discuss.python.org › t › convert-py-to-exe › 8395 as Styx crawled it on Nov 20, 2026. The page may have changed since. Only its words are kept, without pictures or layout.

Open the live page

Convert py to exe - Python Help - Discussions on Python.org

Convert py to exe Python Help choprag (Gagan Chopra) April 25, 2021, 3:15pm 1 I am beginner with python and converted .py file into exe. but while executing exe file I am getting below error. please help me to fix this Traceback (most recent call last): File “test1.py”, line 5, in NameError: name ‘null’ is not defined [1440] Failed to execute script test1 Below is test1.py code { “cells”: [ { “cell_type”: “code”, “execution_count”: null, “metadata”: {}, “outputs”: , “source”: [ “w=input(“Enter your name”)\n”, “print(w)\n”, “input(“Press enter to stop the program”)” ] } ], “metadata”: { “kernelspec”: { “display_name”: “Python 3”, “language”: “python”, “name”: “python3” }, “language_info”: { “codemirror_mode”: { “name”: “ipython”, “version”: 3 }, “file_extension”: “.py”, “mimetype”: “text/x-python”, “name”: “python”, “nbconvert_exporter”: “python”, “pygments_lexer”: “ipython3”, “version”: “3.8.5” } }, “nbformat”: 4, “nbformat_minor”: 4 } jeanas (Jean Abou Samra) April 25, 2021, 8:14pm 2 Your file is in Jupyter notebook format.

A .py file should be just plain text, with the code in it. In other words, test1.py should contain this instead: w = input("Enter your name") print(w) input("Press enter to stop the program") In Jupyter Lab, you can edit plain Python files in addition to notebooks. cameron (Cameron Simpson) May 8, 2021, 12:15am 6 I am beginner with python and converted .py file into exe. but while executing exe file I am getting below error. please help me to fix this 1: This is nothing to do with being an exe.

Traceback (most recent call last): File “test1.py”, line 5, in NameError: name ‘null’ is not defined [1440] Failed to execute script test1 The name “null” is unknown. Looking at your code below: { "cells": [ { "cell_type": "code", "execution_count": null, There’s the problem. If you adapted this from, say, JavaScript, the equivalent name to “null” in JavaScript is “None” in Python. Note the upper case “N”.

Cheers, Cameron Simpson cs@cskk.id.au