upgrade – Sub-process dpkg –set-selections returned an error code (100) when upgrading from Ubuntu 18.04 to 20.04

as stated in the title, I’m having problems upgrading from 18.04 to 20.04.

After performing sudo do-release-upgrade I get

Fetching Fetched 0 B in 0s (0 B/s)                                    

Upgrading Fetched 0 B in 0s (0 B/s)                                    Exception during pm.DoInstall():  E:Sub-process dpkg --set-selections returned an error code (100), E:Couldn't record the approved state changes as dpkg selection states

Could not install the upgrades 

The upgrade has aborted. Your system could be in an unusable state. A  recovery will run now (dpkg --configure -a). 

Upgrade infeasible 

The upgrade could not be completed, there were errors during the  upgrade process. 

Restoring original system state

Aborting Reading package lists... Done     Building dependency tree    Reading state information... Done

I have tried a number of solutions I found on the internet such as reinstalling different versions of dpkg, but most of the solutions seem to pertain to error code 1, not 100.

Any help would be greatly appreciated.