In my computer, my Music folder has some invalid pathnames, so when trying to calculate the size of it, the CalculateSize thread fails with:
2012-03-19 13:06:33,861 - ubuntuone.controlpanel.qt.folders - ERROR - size_calculator: failed for u'/home/nessita/Music':
Traceback (most recent call last):
File "/home/nessita/canonical/controlpanel/computer-to-cloud-page/ubuntuone/controlpanel/gui/qt/folders.py", line 362, in run
for dirpath, _, filenames in os.walk(self.path_name):
File "/usr/lib/python2.7/os.py", line 294, in walk
for x in walk(new_path, topdown, onerror, followlinks):
File "/usr/lib/python2.7/os.py", line 284, in walk
if isdir(join(top, name)):
File "/usr/lib/python2.7/posixpath.py", line 71, in join
path += '/' + b
UnicodeDecodeError: 'ascii' codec can't decode byte 0xa0 in position 12: ordinal not in range(128)
And then, the method LocalFoldersPanel.update_sizes never clears the header that reads 'Calculating', since item.size will return None for ever for the Music folder.
We need to define a constant to flag the calculation error, and show in the listing something like 'size unknown' for the failing item.
In my computer, my Music folder has some invalid pathnames, so when trying to calculate the size of it, the CalculateSize thread fails with:
2012-03-19 13:06:33,861 - ubuntuone. controlpanel. qt.folders - ERROR - size_calculator: failed for u'/home/ nessita/ Music': nessita/ canonical/ controlpanel/ computer- to-cloud- page/ubuntuone/ controlpanel/ gui/qt/ folders. py", line 362, in run self.path_ name): python2. 7/os.py" , line 294, in walk python2. 7/os.py" , line 284, in walk python2. 7/posixpath. py", line 71, in join
Traceback (most recent call last):
File "/home/
for dirpath, _, filenames in os.walk(
File "/usr/lib/
for x in walk(new_path, topdown, onerror, followlinks):
File "/usr/lib/
if isdir(join(top, name)):
File "/usr/lib/
path += '/' + b
UnicodeDecodeError: 'ascii' codec can't decode byte 0xa0 in position 12: ordinal not in range(128)
And then, the method LocalFoldersPan el.update_ sizes never clears the header that reads 'Calculating', since item.size will return None for ever for the Music folder.
We need to define a constant to flag the calculation error, and show in the listing something like 'size unknown' for the failing item.