RuntimeError: maximum recursion depth exceeded [py2exe]

937 views Asked by At

I'm making a Software to make some Electrical Earthing Calculations. I have imported the following, along with the starting of the code:

import Pmw
from math import sqrt, pi, log
from sympy import Symbol, solve, Eq, pprint
import sys
from Tkinter import *
import tkHyperlinkManager
import webbrowser
import tkFileDialog
#sys.setrecursionlimit(1000)


class EarthCalc(Frame):

    def __init__(self, master):

         Frame.__init__(self, master)
         self.grid()
         self.create_widget()

Now, as you can see I have already tried with "sys.setrecursionlimit", yet the error persists. Now, the problem I'm facing is. When I'm using "py2exe" to script to .exe. I get the:

RuntimeError: maximum recursion depth exceeded

Although the code runs perfectly fine in ".py extension". Do help me resolve this, following is how I end the code:

root = Tk()
root.title("Earthing Calculation")
root.geometry("650x620")
root.config(menu=menubar)
menubar = Menu(root)    
"""Here there's the body of the Menubar"""
C = EarthCalc(root)
root.mainloop()

Do help understand, how to resolve this. Following is the stack trace towards the end.

 File "c:\Python27\lib\site-packages\py2exe\mf.py", line 423, in scan_code

   self._safe_import_hook(name, m, fromlist, level=level)

 File "c:\Python27\lib\site-packages\py2exe\mf.py", line 332, in
 _safe_import_hook

   self.import_hook(name, caller, level=level)
 File "c:\Python27\lib\site-packages\py2exe\mf.py", line 719, in import_hook

   return Base.import_hook(self,name,caller,fromlist,level)
 File "c:\Python27\lib\site-packages\py2exe\mf.py", line 134, in import_hook

   self.msg(3, "import_hook", name, caller, fromlist, level)

RuntimeError: maximum recursion depth exceeded



c:\Python27>
0

There are 0 answers