make Easy To Understand Python Error Message for those who are not good at English.
Project description
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:
$ 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:
$ 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」の入力ミスではありませんか?
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file etupem-0.4.4-py3-none-any.whl.
File metadata
- Download URL: etupem-0.4.4-py3-none-any.whl
- Upload date:
- Size: 10.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
540c7ee0958f496f9a30cc5feb9c0d78502d0ee7ee5f68fd35445bfee61113cf
|
|
| MD5 |
085c1a46b8979d379f22018052167bf4
|
|
| BLAKE2b-256 |
d0c282980ad0f970db44fd463b9897d8db9690a244626ee8ceec9f3a3d0e9d16
|