Solved the same issue just now. Another thing to check is that whether one's shipment has a "weight" attribute at all. If you are shipping USPS flat rate, there will not be a place to set weight. However, the custom form will require the weight in the form to be equal to this non-existent number--which can also lead to this error. PayPal should fix this by allowing weight to still be entered in flat rate shipments.
... View more