I finally got around to retrying the 8.1 upgrade and can confirm that removing the Ralink software seems to be the answer. I did the following on my Pavilion 15-e040ca;
1. Connected to my LAN using an ethernet cable.
1. Disabled Norton antivirus, firewall and in Norton settings disabled tamper protection.
2. In msconfig services disabled all but windows services.
3. In msconfig disabled all in startup.
4. In add/remove programs uninstalled both the Ralink Bluetooth and Wireless software.
5. After reboot did the 8.1 upgrade from the store app successfully.
Once the upgrade completed I received notification there was a Ralink WiFi driver update which I installed no problem.
I also received notification of a Ralink Bluetooth driver which I should install; that failed interestingly enough with a "system thread exception not handled" error. It sure looks like the Bluetooth driver's the real culprit.
Thanks 2_me (Ken) above for finding this solution.
In my post above I suggested giving your computer negative reviews if your were having problems. Interesting to note that both Costco and Amazon added my review to their web sites BUT HP HASN'T! Guess they only want positive reviews!
Good luck with your 8.1 upgrade everyone!