Rerun Patches from Bench Update

Guys, how can I re-run a patch? I misconfigured a particular instance and forgot to add the “host_name” variable in site_config.json and i just did a bench update which resulted in the following error when saving an Item in the Stock module:

File "/home/test/frappe-bench/env/local/lib/python2.7/site-packages/requests/", line 837, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
 HTTPError: 404 Client Error: NOT FOUND for url:

Reason why i want to re-run the patch is because i noticed during bench update that there were many errors for this instance as opposed to another which i ran it on.

Running bench update again on this problematic instance does not help.

Found a solution. Basically you can remove the row corresponding to the patch in the tabPatch Log table. Then rerun bench update and it will re-apply the patch.

I had a problem with the make_image_thumbnail patch. Basically in my tabItem table under the website_image column, I had old data imported from a v4 instance which had “attach_files:” for all the items. This patch threw error when it went through all the Items.

I removed all the “attach_files:” from the website_image column and reapplied the patch and it works now.