作成したモジュールをインポートできません。このモジュールは、インポートする必要のあるモジュールと同じフォルダにあります。私は、モジュールのthatsに取り組んでいますdirecto_etapas.py
と呼ばれ、そこから私はsolvers.py
をインポートする必要があるので、私は行く:同じフォルダからモジュールをインポートできません
import math
import solvers
数学モジュールのインポート中に、私はすべてのエラーを得ることはありませんが、私はimport solvers
とエラーが出るん。私はEnthoughキャノピーを使用してい
"C:\Users\...\Codigos\directo_etapas.py"
Traceback (most recent call last):
File "C:\Users\...\AppData\Local\Enthought\Canopy\App\appdata\canopy-1.5.5.3123.win-x86_64\lib\site-packages\IPython\core\ultratb.py", line 776, in structured_traceback
records = _fixed_getinnerframes(etb, context, tb_offset)
File "C:\Users\...\AppData\Local\Enthought\Canopy\App\appdata\canopy-1.5.5.3123.win-x86_64\lib\site-packages\IPython\core\ultratb.py", line 230, in wrapped
return f(*args, **kwargs)
File "C:\Users\...\AppData\Local\Enthought\Canopy\App\appdata\canopy-1.5.5.3123.win-x86_64\lib\site-packages\IPython\core\ultratb.py", line 267, in _fixed_getinnerframes
if rname == '<ipython console>' or rname.endswith('<string>'):
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe1 in position 80: ordinal not in range(128)
ERROR: Internal Python error in the inspect module.
Below is the traceback from this internal error.
**Unfortunately, your original traceback can not be constructed.**
注:
は、私はこのエラーを取得します。
「インポートソルバー」をコメントアウトすると、このエラーは発生しませんか? – sobek
エラーは、あなたの '.py'ファイルにASCII以外の文字(ñ、á、é...)があることを指しているようです。多分?こちらをご覧ください:https://www.python.org/dev/peps/pep-0263/ – BorrajaX
ありがとうございます!出来た。パス名には「á」が含まれていたため、名前を変更して機能しました。 –