Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Grid and UnicodeDecodeError #9

Open
Gldkslfmsd opened this issue Dec 12, 2017 · 1 comment
Open

Grid and UnicodeDecodeError #9

Gldkslfmsd opened this issue Dec 12, 2017 · 1 comment
Labels

Comments

@Gldkslfmsd
Copy link

Hello!

Any suggestions how to fix/avoid this? I don't say it's a problem of your code, I'm having similar issues with other python scripts on Grid, but they don't crash when I launch it in my normal bash-terminal :( Maybe it's because of LOCALE variables?

LRC:ubuntu 14.04: 8.1.7a Son of Grid Engine variables set...
LRC:ubuntu 14.04: 8.1.7a Son of Grid Engine variables set...
==============================
== Server:    andromeda5
== Directory: /lnet/spec/work/people/machacek/morf-seg-nmt/derinet
== Command:   bash triv.cmd
== Hard res:  mem_free=20G,h_data=20G
NSLOTS=1
== Started:   Tue Dec 12 12:22:09 CET 2017
== Sourcing:  /home/machacek/.bashrc
==============================
11630 (process ID) old priority 0, new priority 10
INFO from __main__ at 2017-12-12 12:22:10,101: Started.
INFO from segmentace_triv at 2017-12-12 12:22:10,103: Loading derivations.
Traceback (most recent call last):
  File "triv-morph-split.py", line 66, in <module>
    segmenter = Segmentace(derinet_file_name, morfflex_file_name, morpho_file_name)
  File "/lnet/spec/work/people/machacek/morf-seg-nmt/derinet/segmentace_triv.py", line 203, in __init__
    derinet_db = DeriNetDatabase(derinet_file_name)
  File "/lnet/spec/work/people/machacek/morf-seg-nmt/derinet/segmentace_triv.py", line 102, in __init__
    for lexeme in derinet:
  File "/lnet/spec/work/people/machacek/morf-seg-nmt/derinet/segmentace_triv.py", line 85, in __next__
    return self.next()
  File "/lnet/spec/work/people/machacek/morf-seg-nmt/derinet/segmentace_triv.py", line 88, in next
    line = self.filehandle.readline()
  File "/lnet/spec/work/people/machacek/morf-seg-nmt/p3/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 0xc5 in position 30: ordinal not in range(128)
Getting usage and peak mem info (works for SGE, not PBS yet)
==============================
== Server:    andromeda5
== Directory: /lnet/spec/work/people/machacek/morf-seg-nmt/derinet
== Command:   bash triv.cmd
== Usage:     cpu=00:00:00, mem=0.00000 GB s, io=0.00000 GB, vmem=N/A, maxvmem=N/A
== Peak mem:  N/A
== Started:   Tue Dec 12 12:22:09 CET 2017
== Finished:  Tue Dec 12 12:22:10 CET 2017     FAILED (exit status 1)
                                                                                                                                  1,1           Top
@vidraj
Copy link
Owner

vidraj commented Dec 13, 2017

I believe you have to configure a UTF-8 locale e.g. by setting export LC_ALL=en_US.UTF-8 in your .bashrc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants