I got the error 37 message too! And was horrified to think all my stuff could not be restored.
The gist of it was, the eBooks, once I figured out I had to transfer them over myself, the ios 5 loaded fine and my iPad got restored.
My problem sequence of events:
Opened iTunes
Attached iPad to computer
Clicked on My iPad
Hit the sync button and sync happened and was confirmed
Saw the button to start ios5 download
Clicked on it
Informed i needed to update my iTunes
Updated my iTunes
Clicked on the update ios5 button again
Got a message saying some of my purchases were not backed up onto my computer
Hit the continue anyway button
Waited while the process attempted to backup my iPad
Got the 37 message saying if I continued i would lose everything on my iPad and would have to reload all my apps and lose all my documents and settings
FREAKED out
Hit cancel
Dug around on the forums etc and thought about whether or not to do some of the stupid stuff some people sais, like removing iTunes from your computer and redownloading it.
Redid Sync and tried to figure out what purchases were not being synched.
Found mention of the iTunes pathway: File > Transfer new purchases
Eureka!
So, my problem was, i had some free ebooks that did not get automatically synched.
I did not know about the File<Transfer purchases .... Command, because I don't use iTunes very often AND the error message doesn't give you any clues as to what to do about the problem. It doesn't tell you that some things don't get synched automatically. It doesn't give any hints about the File<Transfer new purchases, it doesn't tell you which items are holding up the process.
So, there you go. Try the iTunes File<Transfer purchases.
I am very happy to have tabs in safari now. Thank you.