Veri işleme (linux) kümesinde bir python programı çalıştırmaya çalışıyorum. Program, linux masaüstümden kümeye ssh atarsam başlatır ve başlatır, ancak mac dizüstü bilgisayarımdan kümeye ssh atarsam çalıştırmaya çalışırsam aşağıdaki hatayı alıyorum:
[muzzle@cluster]~% acme-calibrate detector DARK --in-folder /gpfs/acme/exp/instrument/201802/experiment1/raw --out-folder /home/muzzle/dark_out --run 28
Traceback (most recent call last):
File "/home/boff/calframework/framework/extern/bin/acme-calibrate", line 11, in <module>
load_entry_point('acme-Offline-Calibration', 'console_scripts', 'acme-calibrate')()
File "/home/boff/calframework/framework/extern/lib/python3.4/site-packages/setuptools-39.1.0-py3.4.egg/pkg_resources/__init__.py", line 480, in load_entry_point
File "/home/boff/calframework/framework/extern/lib/python3.4/site-packages/setuptools-39.1.0-py3.4.egg/pkg_resources/__init__.py", line 2691, in load_entry_point
File "/home/boff/calframework/framework/extern/lib/python3.4/site-packages/setuptools-39.1.0-py3.4.egg/pkg_resources/__init__.py", line 2322, in load
File "/home/boff/calframework/framework/extern/lib/python3.4/site-packages/setuptools-39.1.0-py3.4.egg/pkg_resources/__init__.py", line 2328, in resolve
File "/home/boff/pycalibrate_tmp/acme_calibrate/calibrate.py", line 236, in <module>
nb = nbformat.read(f, as_version=4)
File "/home/boff/calframework/framework/extern/lib/python3.4/site-packages/nbformat/__init__.py", line 141, in read
return reads(fp.read(), as_version, **kwargs)
File "/home/boff/calframework/framework/extern/lib/python3.4/encodings/ascii.py", line 26, in decode
return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc4 in position 150: ordinal not in range(128)
UTF’den ASCII’ye dönüşümle ilgili gibi görünüyor, ancak ben derinlikten iniyorum.
Hem terminal.app hem de iterm2 ile aynı hatayı alıyorum. BTW Iterm2 kabuk entegrasyonu yüklü vardı ama onları şimdi kaldırdım.
Dizüstü bilgisayardaki yerel ayar şudur:
$ locale
LANG=
LC_COLLATE="C"
LC_CTYPE="UTF-8"
LC_MESSAGES="C"
LC_MONETARY="C"
LC_NUMERIC="C"
LC_TIME="C"
LC_ALL=
Uzak sunucudaki yerel ayar:
% locale
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
LANG=en_US.UTF-8
LC_CTYPE=UTF-8
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=
Bu linux masaüstümdeki yerel ayardır, kümeninkiyle aynıdır:
$ locale
LANG=en_GB.UTF-8
LANGUAGE=en_GB:en
LC_CTYPE="en_GB.UTF-8"
LC_NUMERIC="en_GB.UTF-8"
LC_TIME="en_GB.UTF-8"
LC_COLLATE="en_GB.UTF-8"
LC_MONETARY="en_GB.UTF-8"
LC_MESSAGES="en_GB.UTF-8"
LC_PAPER="en_GB.UTF-8"
LC_NAME="en_GB.UTF-8"
LC_ADDRESS="en_GB.UTF-8"
LC_TELEPHONE="en_GB.UTF-8"
LC_MEASUREMENT="en_GB.UTF-8"
LC_IDENTIFICATION="en_GB.UTF-8"
LC_ALL=
LANG
veLC_*
Her iki durumda da değişkenler? Görmekexport | grep -E ' (LANG|LC_)'