Last modified: 2013-12-25 11:13:01 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T60181, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 58181 - unicode encoding grid engine
unicode encoding grid engine
Status: RESOLVED FIXED
Product: Wikimedia Labs
Classification: Unclassified
tools (Other open bugs)
unspecified
All All
: Unprioritized major
: ---
Assigned To: Marc A. Pelletier
:
Depends on: 58872
Blocks:
  Show dependency treegraph
 
Reported: 2013-12-08 12:22 UTC by DrTrigon
Modified: 2013-12-25 11:13 UTC (History)
3 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description DrTrigon 2013-12-08 12:22:18 UTC
Pywikibot script sum_disc.py - usually working (e.g. on toolserver) - fails with following exception when executed through the grid engine jsub command:

Traceback (most recent call last):
  File "/data/project/drtrigonbot/pywikibot-compat/pwb.py", line 163, in <module>
    execfile(sys.argv[0])
  File "/data/project/drtrigonbot/pywikibot-compat/sum_disc.py", line 1730, in <module>
    main()
  File "/data/project/drtrigonbot/pywikibot-compat/sum_disc.py", line 1721, in main
    bot.run()
  File "/data/project/drtrigonbot/pywikibot-compat/sum_disc.py", line 385, in run
    self.postDiscSum()
  File "/data/project/drtrigonbot/pywikibot-compat/sum_disc.py", line 1179, in postDiscSum
    self.putHistory(self.pages.hist)
  File "/data/project/drtrigonbot/pywikibot-compat/sum_disc.py", line 685, in putHistory
    self._appendFile(str(buf))
  File "/data/project/drtrigonbot/pywikibot-compat/sum_disc.py", line 720, in _appendFile
    encoding=config.textfile_encoding, mode='a+')
  File "/usr/lib/python2.7/codecs.py", line 881, in open
    file = __builtin__.open(filename, mode, buffering)
UnicodeEncodeError: 'ascii' codec can't encode character u'\xba' in position 62: ordinal not in range(128)

The issue is caused by a unconventional username "º the Bench º", that is used within the filename string.

The intressting thing is; when the script gets runned through tools-labs console directly, it works properly - so it is somehow related to the grid engine runtime enivronment...?!

Thanks and Greetings
Comment 1 DrTrigon 2013-12-15 17:04:37 UTC
MEMO for myself:

Snipplets from #wikimedia-labs:

(17:54:24) Coren: DrTrigon: It's almost certainly a local issue; make certain that $LANG is explicitly set to a suitable value.

(17:57:35) valhallasw: http://www.joelonsoftware.com/articles/Unicode.html < read this.
Comment 2 Tim Landscheidt 2013-12-22 21:20:41 UTC
What about bug #58872, comment #1?
Comment 3 DrTrigon 2013-12-23 09:34:52 UTC
bugfix; UnicodeEncodeError: 'ascii' codec can't encode character u'\xba' in position 62: ordinal not in range(128)

Change-Id: I9480323afdd482e6388520354af8a8784253c2cb

https://gerrit.wikimedia.org/r/#/c/103348/

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links