[UPDATECENTER2-2066] UnicodeEncodeErrors in updatetool Created: 22/Jan/10  Updated: 22/Sep/10

Status: Open
Project: updatecenter2
Component/s: updatetool
Affects Version/s: B45
Fix Version/s: B146

Type: Bug Priority: Critical
Reporter: Chris Kasso Assignee: Chris Kasso
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


Issuezilla Id: 2,066
Tags: 2_3u2

 Description   

Likely due to an image with an 8-bit character in the image_list.

Traceback (most recent call last):
File "wx/_core.py", line 14614, in <lambda>
File
"/work2/images/aæe/updatetool/vendor-packages/updatetool/gui/application.py",
line 178, in _initial_tasks
if not compat.is_v1_user_image(last_image):
File
"/work2/images/aæe/updatetool/vendor-packages/updatetool/common/ips/compat.py",
line 130, in is_v1_user_image
k = __check_subdirs(apath, img_user_prefix)
File
"/work2/images/aæe/updatetool/vendor-packages/updatetool/common/ips/compat.py",
line 54, in __check_subdirs
if not os.path.isdir(p):
File "/python2.6/lib/python2.6/genericpath.py", line 41, in isdir
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe6' in position 15:
ordinal not in range(128)



 Comments   
Comment by Chris Kasso [ 22/Jan/10 ]

Similar problem, different location:

@RELEASE_NAME@ (Build @MILESTONE@.@REVISION@)]
Timestamp : [2010-01-22 15:05:08 PST(-0800)]
wx Version : [2.8.10.1]
wx Platform : [__WXGTK__]
Python Version: [2.6.4]
Platform : [SunOS-5.10-sun4u-sparc-32bit-ELF]

Traceback (innermost last):
File
"/net/hs-usca-07.sfbay/export/home3/18/kasso/shared/updatecenter2/trunk/project/updatetool/src/gui/mainframe.py",
line 2443, in __image_update
tou_s = ips.get_image_property(imagedir, "image-tou-url", opname='image-update')
File
"/net/hs-usca-07.sfbay/export/home3/18/kasso/shared/updatecenter2/trunk/project/updatetool/src/common/ips/_init_.py",
line 300, in get_image_property
return _get_image_dir_property(image, prop, opname=opname)
File
"/net/hs-usca-07.sfbay/export/home3/18/kasso/shared/updatecenter2/trunk/project/updatetool/src/common/ips/_init_.py",
line 286, in _get_image_dir_property
img = pkgimage.Image(imgrootdir)
File
"/net/hs-usca-07.sfbay/export/home3/18/kasso/shared/updatecenter2/trunk/project/build/dist/sunos-sparc/pkg/vendor-packages/pkg/client/image.py",
line 205, in _init_
progtrack)
File
"/net/hs-usca-07.sfbay/export/home3/18/kasso/shared/updatecenter2/trunk/project/build/dist/sunos-sparc/pkg/vendor-packages/pkg/client/image.py",
line 271, in find_root
d = os.path.realpath(d)
File "/python2.6/lib/python2.6/posixpath.py", line 356, in realpath
File "/python2.6/lib/python2.6/posixpath.py", line 132, in islink
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe6' in position
15: ordinal not in range(128)

Comment by Chris Kasso [ 22/Jan/10 ]

Another one (seen while applying an update):

@RELEASE_NAME@ (Build @MILESTONE@.@REVISION@)]
Timestamp : [2010-01-22 15:18:05 PST(-0800)]
wx Version : [2.8.10.1]
wx Platform : [__WXGTK__]
Python Version: [2.6.4]
Platform : [SunOS-5.10-sun4u-sparc-32bit-ELF]

Traceback (innermost last):
File
"/net/hs-usca-07.sfbay/export/home3/18/kasso/shared/updatecenter2/trunk/project/updatetool/src/common/ips/apptask.py",
line 276, in Run
self._install(self._imageroot, self._op_type)
File
"/net/hs-usca-07.sfbay/export/home3/18/kasso/shared/updatecenter2/trunk/project/updatetool/src/common/ips/apptask.py",
line 323, in _install
pkg_client_name=self._cmd_name)
File
"/net/hs-usca-07.sfbay/export/home3/18/kasso/shared/updatecenter2/trunk/project/build/dist/sunos-sparc/pkg/vendor-packages/pkg/client/api.py",
line 114, in _init_
progtrack=progresstracker)
File
"/net/hs-usca-07.sfbay/export/home3/18/kasso/shared/updatecenter2/trunk/project/build/dist/sunos-sparc/pkg/vendor-packages/pkg/client/image.py",
line 205, in _init_
progtrack)
File
"/net/hs-usca-07.sfbay/export/home3/18/kasso/shared/updatecenter2/trunk/project/build/dist/sunos-sparc/pkg/vendor-packages/pkg/client/image.py",
line 271, in find_root
d = os.path.realpath(d)
File "/python2.6/lib/python2.6/posixpath.py", line 356, in realpath
File "/python2.6/lib/python2.6/posixpath.py", line 132, in islink
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe6' in position
15: ordinal not in range(128)

Comment by Chris Kasso [ 22/Jan/10 ]

Another one during the pkg update:

Traceback (most recent call last):
File
"/work2/images/aæe/updatetool/vendor-packages/updatetool/gui/mainframe.py",
line 1226, in OnInstall
self._install_components(imagedir)
File
"/work2/images/aæe/updatetool/vendor-packages/updatetool/gui/mainframe.py",
line 2084, in _install_components
rcode = self.__image_update(imagedir, self.list_ctrl.imageplan)
File
"/work2/images/aæe/updatetool/vendor-packages/updatetool/gui/mainframe.py",
line 2529, in __image_update
utils.logger.error(utils.format_trace())
File
"/work2/images/aæe/updatetool/vendor-packages/updatetool/common/utils.py", line
143, in format_trace
safe_encode(lst[-1])
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe6 in position 23: ordinal
not in range(128)

Comment by Chris Kasso [ 22/Jan/10 ]

r2712
src/common/ips/apptask.py
src/gui/application.py
src/gui/mainframe.py

Fixed some of the issues found so far.

Comment by Chris Kasso [ 05/Apr/10 ]

Backported r2712 as r2758

updatetool/src/notifier/application.py
updatetool/src/gui/mainframe.py
updatetool/src/common/ips/apptask.py
Generated at Fri May 29 11:05:23 UTC 2015 using JIRA 6.2.3#6260-sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.