LoadBarState failed - LoadBarState failed (with win32 exception!)

Last Published: April 25, 2020

Error Message

An error occurs in PythonWin when running a script while debugging.

>>> LoadBarState failed - LoadBarState failed (with win32 exception!)
>>> Traceback (most recent call last):
File "c:\python21\pythonwin\pywin\mfc\", line 91, in CreateNewFrame
wnd.LoadFrame(self.GetResourceID(), -1, None, context) # triggers OnCreateClient...
win32ui: LoadFrame failed

win32ui: CreateNewFrame() virtual handler (<method DocTemplate.CreateNewFrame of SyntEditTemplate instance at 00EF697C>) raised an exception
TypeError: PyCTemplate::CreateNewFrame must return a PyCFrameWnd object. import win32api, sys


This is a bug with the Python and PythonWin application.

Solution or Workaround

WARNING: The instructions below include making changes to essential parts of your operating system. It is recommended that you backup your operating system and files, including the registry, before proceeding. Consult with a qualified computer systems professional, if necessary.

ESRI cannot guarantee results from incorrect modifications while following these instructions. Therefore, use caution and proceed at your own risk.

This problem is a result of PythonWin adding Toolbar Entries to the registry until it no longer functions. This can be fixed by removing all the "ToolbarDebugging-Bar#" entries from the registry under HKEY_CURRENT_USER\Software\Python 2.x\Python for Win32.

Article ID:000008131

  • ArcMap 9 x

Receive notifications and find solutions for new or common issues

Get summarized answers and video solutions from our new AI chatbot.

Download the Esri Support App

Discover more on this topic

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options