Solution to AttributeError ProgressBar object has no attribute finished error using ubuntu-make

It seems like the umake version contained in the ubuntu 16.04 ppa ppa:ubuntu-desktop/ubuntu-make breaks due to a change in the API of the python ProgressBar module…

The error log looks like this:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
N/A% (0 of 100) | | Elapsed Time: 0:00:00 ETA: --:--:--Downloading and installing requirements
ERROR: Unhandled exception
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/umake/tools.py", line 158, in wrapper
function(*args, **kwargs)
File "/usr/lib/python3/dist-packages/umake/frameworks/baseinstaller.py", line 288, in get_progress
if not self.pbar.finished: # drawing is delayed, so ensure we are not done first
AttributeError: 'ProgressBar' object has no attribute 'finished'
ERROR: Unhandled exception
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/umake/tools.py", line 158, in wrapper
function(*args, **kwargs)
File "/usr/lib/python3/dist-packages/umake/frameworks/baseinstaller.py", line 288, in get_progress
if not self.pbar.finished: # drawing is delayed, so ensure we are not done first
AttributeError: 'ProgressBar' object has no attribute 'finished'

However, I failed to find a file corresponding to File "/usr/lib/python3/dist-packages/umake/frameworks/baseinstaller.py" in the github repo, thus failing to start an pr/issue.

For those who encounter similar issue, here’s the quick fix…

  1. Use your favorite editor and root access to open the file /usr/lib/python3/dist-packages/umake/frameworks/baseinstaller.py, e.g sudo gedit /usr/lib/python3/dist-packages/umake/frameworks/baseinstaller.py.

  2. Go to line 288.

  3. Change the line if not self.pbar.finished: # drawing is delayed, so ensure we are not done first to if True:, save and quit.

  4. The progress bar may looks kinda broken after the fix, but will have no interruption to any installation…

2017/11/30