Skip to content

nodai2hITC/etupem

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

etupem

make Easy To Understand Python Error Message for those who are not good at English.

Currently, it is only available in Japanese.

Python のエラーメッセージを日本語で表示します。

Requirements

  • Python 3.8 or newer

Recommended

  • Python 3.10 or newer

Install

$ pip install etupem

Usage (for Japanese)

$ pythonja script.py

or

$ python -m etupem ja script.py

Example1

For example, run the following script.

"あいうえお" + 456

Original python error message:

$ python type_error.py
Traceback (most recent call last):
  File "E:\scripts\type_error.py", line 1, in <module>
    "あいうえお" + 123
    ~~~~~~~~^~~~~
TypeError: can only concatenate str (not "int") to str

When using etupem:

type_error

$ pythonja type_error.py
Traceback (most recent call last):
  File "E:\scripts\type_error.py", line 1, in <module>
    "あいうえお" + 123
    ~~~~~~~~^~~~~
TypeError: can only concatenate str (not "int") to str
上に表示されているのが本来のエラーメッセージです。エラーについて調べる場合は、上のエラーメッセージで検索して下さい。
【型に関するエラー(TypeError)】
ファイル「E:\scripts\type_error.py」の 1行目でエラーが発生しました。
    "あいうえお" + 123
    ~~~~~~~~~~~~~^~~~~
文字列に 整数(int型)を結合することはできません。

Example2

Print("Hello, World!")

Original python error message:

$ python name_error.py
Traceback (most recent call last):
  File "E:\scripts\name_error.py", line 1, in <module>
    Print("Hello, World!")
    ^^^^^
NameError: name 'Print' is not defined. Did you mean: 'print'?

When using etupem:

name_error

$ pythonja name_error.py
Traceback (most recent call last):
  File "E:\scripts\name_error.py", line 1, in <module>
    Print("Hello, World!")
    ^^^^^
NameError: name 'Print' is not defined. Did you mean: 'print'?
上に表示されているのが本来のエラーメッセージです。エラーについて調べる場合は、上のエラーメッセージで検索して下さい。
【名前に関するエラー(NameError)】
ファイル「E:\scripts\name_error.py」の 1行目でエラーが発生しました。
    Print("Hello, World!")
    ^^^^^
「Print」という名前の変数などは見つかりませんでした。「print」の入力ミスではありませんか?

About

Easy To Understand Python Error Message

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages