When I try to run it at toollabs bastion, all works as it should. When I send the script to grid, it do not work (see sample output below). Why? Can somebody help me with it?
urbanecm@tools-bastion-02 ~/Documents/cswiki/addPrekladCT
$ cat test.sh
python3 addmissing.py -always -file:pages.txt -search:'-insource:/\{\{[Pp]řeklad/'
urbanecm@tools-bastion-02 ~/Documents/cswiki/addPrekladCT
$ jsub bash test.sh
Your job 6201363 ("bash") has been submitted
urbanecm@tools-bastion-02 ~/Documents/cswiki/addPrekladCT
$ qstat
job-ID prior name user state submit/start at queue slots ja-task-ID
-----------------------------------------------------------------------------------------------------------------
6201363 0.30000 bash urbanecm r 06/16/2017 18:14:42 task@tools-exec-1404.eqiad.wmf 1
urbanecm@tools-bastion-02 ~/Documents/cswiki/addPrekladCT
$ ls ~/bash.*
/home/urbanecm/bash.err /home/urbanecm/bash.out
urbanecm@tools-bastion-02 ~/Documents/cswiki/addPrekladCT
$ cat ~/bash.*
Traceback (most recent call last):
File "addmissing.py", line 223, in <module>
main()
File "addmissing.py", line 183, in main
local_args = pywikibot.handle_args(args)
File "/shared/pywikipedia/core/pywikibot/bot.py", line 954, in handle_args
writeToCommandLogFile()
File "/shared/pywikipedia/core/pywikibot/bot.py", line 1128, in writeToCommandLogFile
command_log_file.write(s + os.linesep)
File "/usr/lib/python3.4/codecs.py", line 711, in write
return self.writer.write(data)
File "/usr/lib/python3.4/codecs.py", line 368, in write
data, consumed = self.encode(object, self.errors)
UnicodeEncodeError: 'utf-8' codec can't encode character '\udcc5' in position 67: surrogates not allowed
CRITICAL: Closing network session.
<class 'UnicodeEncodeError'>
urbanecm@tools-bastion-02 ~/Documents/cswiki/addPrekladCT
$