My daughter asked if I could find an eBook (in French) for her. I found it online at Gutenberg.
http://gutenberg.net.au/ebooks03/0300771h.html
I used the "Save as" option in my browser (Chromium, running on Linux) to create the webpage.html file and webpage_files directory containing the gifs, jpgs, etc.
I then added the html file to Calibre (version 5.4.4) and ran a convert to AZW3. That worked fine. Then I used Calibre's editor to open the AZW3 and deleted the page with links to the various chapters - those were pointing to URLs, not to locations in the converted book. I also removed the initial page with the Gutenberg blurb.
That all worked great and viewing the newly created AZW3 file in Calibre's internal viewer worked fine.
Then I attempted to convert the AZW3 into an EPUB. This failed in Calibre. It came up with some error message about the source file not containing a book or something. Unfortunately I did not save this error message and can't remember its exact wording - only the gist of it that I just mentioned.
My fix was to do another conversion from the initial HTML into an EPUB and edit that result to remove the chapter links page. So one conversion HTML to AZW3 plus edit, then a totally separate conversions of HTML to EPUB plus edit worked fine. But HTML to AZW3 to EPUB failed on the EPUB part.
I'm just reporting this in case anyone cares. Maybe I did something incorrect in my conversions. I just used all the default settings in Calibre when converting. But I'm good to go now on this specific book, AFAIK. This is just an FYI post.