Issues

Issue #81 resolved

KeyboardInterrupt during search index generation isn't safe

Anonymous created an issue

I was working on the Python docs and ran Sphinx:

writing output... c-api/objimpl c-api/structures contents license writing additional files... genindex modindex search download index opensearch copying static files... done dumping search index... ^Cmake: *** [build] Error 1

(Notice the interrupt)

The next time I got this:

pickling environment... done checking consistency... done preparing documents... WARNING: search index couldn't be loaded, but not all documents will be built: the index will be incomplete. done writing output... c-api/objimpl c-api/structures contents writing additional files... genindex modindex search download index opensearch copying static files... done dumping search index... Exception occurred: File "/temp/python/trunk/Doc/tools/sphinx/search.py", line 151, in get_descrefs pdict[name] = (fn2index[doc], i) KeyError: 'library/ic'

Traceback (most recent call last): File "/temp/python/trunk/Doc/tools/sphinx/cmdline.py", line 151, in main app.build(all_files, filenames) File "/temp/python/trunk/Doc/tools/sphinx/application.py", line 143, in build self.builder.build_update() File "/temp/python/trunk/Doc/tools/sphinx/builders/init.py", line 236, in build_update 'out of date' % len(to_build)) File "/temp/python/trunk/Doc/tools/sphinx/builders/init.py", line 281, in build self.finish() File "/temp/python/trunk/Doc/tools/sphinx/builders/html.py", line 409, in finish self.handle_finish() File "/temp/python/trunk/Doc/tools/sphinx/builders/html.py", line 500, in handle_finish self.indexer.dump(f, self.indexer_format) File "/temp/python/trunk/Doc/tools/sphinx/search.py", line 132, in dump format.dump(self.freeze(), stream) File "/temp/python/trunk/Doc/tools/sphinx/search.py", line 173, in freeze descrefs=self.get_descrefs(fn2index), File "/temp/python/trunk/Doc/tools/sphinx/search.py", line 151, in get_descrefs pdict[name] = (fn2index[doc], i) KeyError: 'library/ic'

Of course, this was easily cured by deleting the doctrees, but it would be nice if Sphinx could be safely interrupted anywhere.

Thanks, Benjamin

Comments (2)

  1. Log in to comment