Hi, I'm facing a strange issue. On exporting the attached .org file to HTML, I often have to do it in 2 passes. Most of the times the 1st pass throws an error, and the output in the *Messages* buffer is like this : OVERVIEW Export buffer: Exporting... (New file) org-babel-exp processing... OVERVIEW Position saved to mark ring, go back with C-c &. OVERVIEW executing Python code block... Code block evaluation complete. org-babel-exp processing... OVERVIEW Position saved to mark ring, go back with C-c &. OVERVIEW executing Python code block... Code block evaluation complete. org-babel-exp processing... OVERVIEW Position saved to mark ring, go back with C-c &. OVERVIEW executing Python code block... Code block evaluation complete. org-babel-exp processing... OVERVIEW Position saved to mark ring, go back with C-c &. OVERVIEW executing Python code block... Code block evaluation complete. org-babel-exp processing... OVERVIEW Position saved to mark ring, go back with C-c &. OVERVIEW executing Python code block... Code block evaluation complete. org-babel-exp processing... OVERVIEW [2 times] executing Python code block... Code block evaluation complete. org-babel-exp processing... OVERVIEW Position saved to mark ring, go back with C-c &. OVERVIEW executing Python code block... Code block evaluation complete. org-babel-exp processing... OVERVIEW Position saved to mark ring, go back with C-c &. OVERVIEW executing Python code block... Code block evaluation complete. org-babel-exp processing... OVERVIEW Position saved to mark ring, go back with C-c &. OVERVIEW executing Python code block... Code block evaluation complete. org-babel-exp processing... OVERVIEW Position saved to mark ring, go back with C-c &. OVERVIEW executing Python code block... Code block evaluation complete. org-babel-exp processing... OVERVIEW Position saved to mark ring, go back with C-c &. OVERVIEW executing Python code block... Code block evaluation complete. org-babel-exp processing... OVERVIEW Position saved to mark ring, go back with C-c &. OVERVIEW executing Python code block... Code block evaluation complete. Fontifying org-src-fontification:python-mode... (regexps..............) Code block evaluation complete. Fontifying org-src-fontification:python-mode... (regexps..............) Code block evaluation complete. Fontifying org-src-fontification:python-mode... (regexps..............) Code block evaluation complete. Fontifying org-src-fontification:python-mode... (regexps..............) Code block evaluation complete. Fontifying org-src-fontification:python-mode... (regexps..............) Code block evaluation complete. Fontifying org-src-fontification:python-mode... (regexps..............) Code block evaluation complete. Fontifying org-src-fontification:python-mode... (regexps..............) Code block evaluation complete. Fontifying org-src-fontification:python-mode... (regexps..............) Code block evaluation complete. Fontifying org-src-fontification:python-mode... (regexps..............) Code block evaluation complete. Fontifying org-src-fontification:python-mode... (regexps..............) Code block evaluation complete. Fontifying org-src-fontification:python-mode... (regexps..............) Code block evaluation complete. Fontifying *temp*<2>... (regexps..............) Code block evaluation complete. org-export-replace-src-segments-and-examples: Args out of range: 0, 0 i.e. at the end I get this error - Args out of range: 0, 0 Strangely, doing an export for the 2nd time, without deleting the output html file manages to do it successfully without throwing any errors. Could someone examine the attached file and throw some light on what I might be doing wrong? Thanks, -- Sankalp ******************************************************* If humans could mate with software, I'd have org-mode's babies. --- Chris League on Twitter. http://orgmode.org/worg/org-quotes.html ******************************************************* Ps: Sorry about the long output transcript...