I can confirm that manually modifying /usr/share/hplip/scan.py according to the diff solves the issue. pyc files are automatically recreated if the corresponding py file has a newer timestamp