That error means that one of you files has an incorrect structure that calibre is choking on. In particular look for <?xml ...?> not at the start of the file and remove it.
The very poor quality of HTML in CHM file (seems to be a theme with Microsoft) is one reason calibre doesn not include direct support for CHM.
|