A problem occurred in a Python script. Here is the sequence of
function calls leading up to the error, in the order they occurred.
/usr/local/Python/HTML/__init__.py in Run(self=<Slides.Slides instance>) |
215 html=[]
|
216 html=html+self.HTML_Header()
|
=> 217 html=html+self.HTML_Body()
|
218 html=html+self.HTML_Tailer()
|
219
|
html = ['<!DOCTYPE html>', '<HTML>', ['<HEAD>', [['<TITLE>', 'SmtC: Show me the Code!', '</TITLE>'], '<META content="text/html; charset=utf-8" http-equiv="Content-type">', '<META content="Prof. Dr. Ole Peter Smith, IME/UFG" name="Autor">', '<LINK href="/Slides.css" rel="stylesheet">', '<LINK href="/W3.css" rel="stylesheet">', '<LINK href="/fontawesome-free-5.3.1-web/css/all.css" rel="stylesheet">', ['<SCRIPT src="/Slides.js">', '', '</SCRIPT>'], ['<SCRIPT src="/Karru.js">', '', '</SCRIPT>'], ['<SCRIPT>', 'MathJax = {', ' tex: {', r" inlineMath: [ ['$', '$'], ['[;',';]'], ['\\(', '\\)'] ] ", ' },', ' svg: {', " fontCache: 'global'", ' }', '};', '</SCRIPT>'], ['<SCRIPT id="MathJax-script" src="https://cdn.jsd...mathjax@3/es5/tex-svg.js" type="text/javascript">', '</SCRIPT>'], ['<SCRIPT src="/Slides.js">', '', '</SCRIPT>'], ['<SCRIPT src="/Karru.js">', '', '</SCRIPT>']], '</HEAD>']], self = <Slides.Slides instance>, self.HTML_Body = <bound method Slides.HTML_Body of <Slides.Slides instance>> |
/usr/local/Python/HTML/Body.py in HTML_Body_Matrix(self=<Slides.Slides instance>) |
27 rhtml=[]
|
28 for cellmethods in self.Body_Matrix:
|
=> 29 rhtml=rhtml+[ self.HTML_Body_Row(n) ]
|
30 n+=1
|
31
|
rhtml = [['<TR class="Body_Top">', [['<TD class="Body_Top Body_Left">', ['<IMG src="/icons/ufg.png">'], '</TD>'], ['<TD class="Body_Top Body_Center">', [['<DIV class="H1">', 'SmtC: Show me the Code', '</DIV>'], ['<DIV class="H2">', 'Ole Peter Smith', '</DIV>'], ['<DIV class="H3">', 'Instituto de Matemática e Estatística', '</DIV>'], ['<DIV class="H4">', 'Universidade Federal de Goiás', '</DIV>'], ['<DIV class="H5">', 'http://www.olesmith.com.br', '</DIV>']], '</TD>'], ['<TD class="Body_Top Body_Right">', ['<IMG src="/icons/ufg.png">'], '</TD>']], '</TR>']], self = <Slides.Slides instance>, self.HTML_Body_Row = <bound method Slides.HTML_Body_Row of <Slides.Slides instance>>, n = 1 |
/usr/local/Python/HTML/Body.py in HTML_Body_Row(self=<Slides.Slides instance>, n=1) |
53 rhtml=[]
|
54 for cellmethod in self.Body_Matrix[ n ]:
|
=> 55 rhtml=rhtml+[ self.HTML_Body_Row_Cell(n,m) ]
|
56
|
57 m+=1
|
rhtml = [['<TD class="Body_Middle Body_Left">', ['<UL>', [['<LI>', '<A class="leftmenu" href="?Path=#" title="Show me the Code">SmtC</A>', '</LI>'], ['<LI>', '<A class="leftmenu" href="?Path=1_Disciplines#" title="Disciplinas">Disciplinas</A>', '</LI>'], ['<LI>', '<A class="leftmenu" href="?Path=1_Disciplines/1_...title="C\xc3\xa1lculo Num\xc3\xa9rico">C\xc3\xa1lculo Num\xc3\xa9rico</A>', '</LI>']], '</UL>', '<BR>', ['<A class="leftmenu" href="?Path=1_Disciplines/1_...ntegra\xc3\xa7\xc3\xa3o Num\xc3\xa9rica">Integra\xc3\xa7\xc3\xa3o Num\xc3\xa9rica</A>'], ['<UL style="list-style-type:square">', [['<LI>', '<A class="leftmenu" href="?Path=1_Disciplines/1_..."Regra dos Trapézios">Trapézios</A>', '</LI>'], ['<LI>', [...], [...], '</LI>'], ['<LI>', '<A class="leftmenu" href="?Path=1_Disciplines/1_..._Activities#" title="Atividades 9">Atividades</A>', '</LI>']], '</UL>'], ['<DIV class="Phrase">', 'A seriedade dos acontecimentos da minha \xc3\xa9poca.<BR>', 'Me enche de esperan\xc3\xa7a.<BR>', ['<DIV class="Author">', 'Karl Marx', '</DIV>'], '</DIV>']], '</TD>']], self = <Slides.Slides instance>, self.HTML_Body_Row_Cell = <bound method Slides.HTML_Body_Row_Cell of <Slides.Slides instance>>, n = 1, m = 1 |
/usr/local/Python/Slides/Slide/Cell/__init__.py in Slide_Cell_Contents_Parse(self=<Slides.Slides instance>, paths=['1_Disciplines', '1_CN', '5_Integration', '2_Simpson'], contents=['<H1>Regra 1/3 de Simpson</H1>', '', '', 'Aproximamos a fun\xc3\xa7ão com sua Polinê...plador de Lagrange Quadrático, [;P_2(x);].', 'Repetindo os cálculos:', '', '', '', '<CENTER>', '[;', r' \int_{x_0}^{x_1} f(x) dx \simeq', r' \frac{h}{3} \left( f(x_0)+4*f(x_1)+f(x_2) \right)', ';]', '</CENTER>', '', '', [[], ['<CENTER>', '<TABLE>', '<TR>', '<TD class="Table_Frame Code">', ['<DIV class="Code_Title">', 'Python Listing: ../../Code/Integration.py.', '</DIV>'], '<DIV CLASS="Code" STYLE="" id="Integrationpy">\n<... return simp*(x2-x1)/3.0\n</CODE>\n</PRE>\n</DIV>', '</TD>', '</TR>', '</TABLE>', '</CENTER>']], '', 'Para obter uma aproxima\xc3\xa7ão melhor, dividimos o intervalo em [;n;] subintervalos,', r'[;[a=x_0,x_1,\ldots,x_{n-1},x_{2n}=b];], do mesmo comprimento:', ...], options={}) |
174
|
175 elif ( re.search('\s*@Code\s+',contents[n], re.IGNORECASE) ):
|
=> 176 contents[n]=self.Slide_Cell_Code_Insert(contents[n],paths)
|
177
|
178 elif ( re.search('\s*@Exec\s+',contents[n], re.IGNORECASE) ):
|
contents = ['<H1>Regra 1/3 de Simpson</H1>', '', '', 'Aproximamos a fun\xc3\xa7ão com sua Polinê...plador de Lagrange Quadrático, [;P_2(x);].', 'Repetindo os cálculos:', '', '', '', '<CENTER>', '[;', r' \int_{x_0}^{x_1} f(x) dx \simeq', r' \frac{h}{3} \left( f(x_0)+4*f(x_1)+f(x_2) \right)', ';]', '</CENTER>', '', '', [[], ['<CENTER>', '<TABLE>', '<TR>', '<TD class="Table_Frame Code">', ['<DIV class="Code_Title">', 'Python Listing: ../../Code/Integration.py.', '</DIV>'], '<DIV CLASS="Code" STYLE="" id="Integrationpy">\n<... return simp*(x2-x1)/3.0\n</CODE>\n</PRE>\n</DIV>', '</TD>', '</TR>', '</TABLE>', '</CENTER>']], '', 'Para obter uma aproxima\xc3\xa7ão melhor, dividimos o intervalo em [;n;] subintervalos,', r'[;[a=x_0,x_1,\ldots,x_{n-1},x_{2n}=b];], do mesmo comprimento:', ...], n = 62, self = <Slides.Slides instance>, self.Slide_Cell_Code_Insert = <bound method Slides.Slide_Cell_Code_Insert of <Slides.Slides instance>>, paths = ['1_Disciplines', '1_CN', '5_Integration', '2_Simpson'] |
/usr/local/Python/Slides/Slide/Cell/Code/__init__.py in Slide_Cell_Code_File(self=<Slides.Slides instance>, content=['def Trapezoid(f,x0,x1):', ' return 0.5*(x1-x0)*(f(x0)+f(x1))', '', 'def Trapezoids_1(f,x0,xn,n=100):', ' ## Repeat Trapezoid:', ' ## Divide in [x0,x1] em n intervals and calc', '', ' h=(xn-x0)/(1.0*n)', ' ', ' trapez=0.0', ' x=x0', ' for i in range(n):', ' trapez+=Trapezoid(f,x,x+h)', ' x+=h', '', ' return trapez', ' ', 'def Trapezoids_R(f,x0,xn,n=100):', ' ## Repeated Trapezoids:', ' ## Divide in [x0,x12] em n intervals and calc', ...], scriptfile='../../Code/Integration.py', paths=['1_Disciplines', '1_CN', '5_Integration', '2_Simpson'], args=['../../Code/Integration.py', 'Simpsons_R'], options={}) |
366 if (len(rargs)>0):
|
367 content=self.Slide_Cell_Code_File_Index(
|
=> 368 scriptfile,content,rargs
|
369 )
|
370
|
scriptfile = '../../Code/Integration.py', content = ['def Trapezoid(f,x0,x1):', ' return 0.5*(x1-x0)*(f(x0)+f(x1))', '', 'def Trapezoids_1(f,x0,xn,n=100):', ' ## Repeat Trapezoid:', ' ## Divide in [x0,x1] em n intervals and calc', '', ' h=(xn-x0)/(1.0*n)', ' ', ' trapez=0.0', ' x=x0', ' for i in range(n):', ' trapez+=Trapezoid(f,x,x+h)', ' x+=h', '', ' return trapez', ' ', 'def Trapezoids_R(f,x0,xn,n=100):', ' ## Repeated Trapezoids:', ' ## Divide in [x0,x12] em n intervals and calc', ...], rargs = ['Simpsons_R'] |
/usr/local/Python/Slides/Slide/Cell/Code/__init__.py in Slide_Cell_Code_File_Index(self=<Slides.Slides instance>, scriptfile='../../Code/Integration.py', contents=['def Trapezoid(f,x0,x1):', ' return 0.5*(x1-x0)*(f(x0)+f(x1))', '', 'def Trapezoids_1(f,x0,xn,n=100):', ' ## Repeat Trapezoid:', ' ## Divide in [x0,x1] em n intervals and calc', '', ' h=(xn-x0)/(1.0*n)', ' ', ' trapez=0.0', ' x=x0', ' for i in range(n):', ' trapez+=Trapezoid(f,x,x+h)', ' x+=h', '', ' return trapez', ' ', 'def Trapezoids_R(f,x0,xn,n=100):', ' ## Repeated Trapezoids:', ' ## Divide in [x0,x12] em n intervals and calc', ...], rargs=['Simpsons_R']) |
538 while (i<len(line_nos)):
|
539 i+=1
|
=> 540 m=line_nos[i]
|
541 if (m>n): break
|
542
|
m = 55, line_nos = [0, 3, 17, 35, 41, 55], i = 6 |