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_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/2_...l com Python e SVG">Matem\xc3\xa1tica Computacional</A>', '</LI>']], '</UL>', '<BR>', ['<A class="leftmenu" href="?Path=1_Disciplines/2_MC/8_Matrices#" title="A Classe Matrix">Matrices</A>'], ['<UL style="list-style-type:square">', [['<LI>', '<A class="leftmenu" href="?Path=1_Disciplines/2_...r#" title="Construtor de Matrices">Construtor</A>', '</LI>'], ['<LI>', '<A class="leftmenu" href="?Path=1_Disciplines/2_...Matrices/0_Print#" title="Print Matriz">Print</A>', '</LI>'], ['<LI>', '<A class="leftmenu" href="?Path=1_Disciplines/2_...e="Adi\xc3\xa7ão de Matrizes">Adi\xc3\xa7ão</A>', '</LI>'], ['<LI>', '<A class="leftmenu" href="?Path=1_Disciplines/2_...plicão de Matrizes">Multiplicão</A>', '</LI>'], ['<LI>', r'<A class="leftmenu" href="?Path=1_Disciplines/2_...sta, [;- \underline{\underline{A}} ;]">Oposta</A>', '</LI>'], ['<LI>', '<A class="leftmenu" href="?Path=1_Disciplines/2_...tra\xc3\xa7ão de Matrices">Subtra\xc3\xa7ão</A>', '</LI>'], ['<LI>', [...], [...], '</LI>'], ['<LI>', '<A class="leftmenu" href="?Path=1_Disciplines/2_...es#" title="Atividades de Vetores">Atividades</A>', '</LI>']], '</UL>'], ['<DIV class="Phrase">', 'Quando eu dou de comer aos pobres<BR>', 'Me chamam de santo<BR>', 'Quando eu pergunto por que eles s\xc3\xa3o pobres<BR>', 'Me chamam de comunista<BR>', ['<DIV class="Author">', 'Dom Helder C\xc3\xa2mera', '</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', '2_MC', '8_Matrices', '5_Notables'], contents=['<H1>Matrizes Notáveis</H1>', '', '<UL>', ' <LI>Matriz Zero:', [[], ['<CENTER>', '<TABLE>', '<TR>', '<TD class="Table_Frame Code">', ['<DIV class="Code_Title">', 'Python Listing: ../../Code/Matrix.py.', '</DIV>'], '<DIV CLASS="Code" STYLE="" id="Matrixpy">\n<PRE C...,n):\n return Matrix(m,n)\n</CODE>\n</PRE>\n</DIV>', '</TD>', '</TR>', '</TABLE>', '</CENTER>']], ' </LI>', r' <LI>Matriz Identidade, [;a_{ij}=\delta_{ij},~ i,j \in \{0,1,...,n-1\};]:', [[], ['<CENTER>', '<TABLE>', '<TR>', '<TD class="Table_Frame Code">', ['<DIV class="Code_Title">', 'Python Listing: ../../Code/Matrix.py.', '</DIV>'], '<DIV CLASS="Code" STYLE="" id="Matrixpy">\n<PRE C... I[i][i]=1.0\n\n return I\n</CODE>\n</PRE>\n</DIV>', '</TD>', '</TR>', '</TABLE>', '</CENTER>']], ' </LI>', r' <LI>Matriz Diagonal, [;a_{ij}=v[i]\delta_{ij},~ i,j \in \{0,1,...,n-1\};]:', [[], ['<CENTER>', '<TABLE>', '<TR>', '<TD class="Table_Frame Code">', ['<DIV class="Code_Title">', 'Python Listing: ../../Code/Matrix.py.', '</DIV>'], '<DIV CLASS="Code" STYLE="" id="Matrixpy">\n<PRE C... D[i][i]=v[i]\n\n return D\n</CODE>\n</PRE>\n</DIV>', '</TD>', '</TR>', '</TABLE>', '</CENTER>']], ' </LI>', r' <LI>Matriz de Vandermonte, [;D_{ij}=v_i^j,~ i,j \in \{0,1,...,n-1\};]:', [[], ['<CENTER>', '<TABLE>', '<TR>', '<TD class="Table_Frame Code">', ['<DIV class="Code_Title">', 'Python Listing: ../../Code/Matrix.py.', '</DIV>'], '<DIV CLASS="Code" STYLE="" id="Matrixpy">\n<PRE C... fact*=v[i]\n\n return V\n</CODE>\n</PRE>\n</DIV>', '</TD>', '</TR>', '</TABLE>', '</CENTER>']], ' </LI>', r' <LI>Matriz Diádica, [;D_{ij}=v_i v_j,~ i,j \in \{0,1,...,n-1\};]:', [[], ['<CENTER>', '<TABLE>', '<TR>', '<TD class="Table_Frame Code">', ['<DIV class="Code_Title">', 'Python Listing: ../../Code/Matrix.py.', '</DIV>'], '<DIV CLASS="Code" STYLE="" id="Matrixpy">\n<PRE C...[i]=v[i]*v[j]\n\n return D\n</CODE>\n</PRE>\n</DIV>', '</TD>', '</TR>', '</TABLE>', '</CENTER>']], ' </LI>', ' <LI>Matriz de Rota\xc3\xa7ão:', ' @Code ../../Code/Matrix.py Matrix_Rotation', ...], 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>Matrizes Notáveis</H1>', '', '<UL>', ' <LI>Matriz Zero:', [[], ['<CENTER>', '<TABLE>', '<TR>', '<TD class="Table_Frame Code">', ['<DIV class="Code_Title">', 'Python Listing: ../../Code/Matrix.py.', '</DIV>'], '<DIV CLASS="Code" STYLE="" id="Matrixpy">\n<PRE C...,n):\n return Matrix(m,n)\n</CODE>\n</PRE>\n</DIV>', '</TD>', '</TR>', '</TABLE>', '</CENTER>']], ' </LI>', r' <LI>Matriz Identidade, [;a_{ij}=\delta_{ij},~ i,j \in \{0,1,...,n-1\};]:', [[], ['<CENTER>', '<TABLE>', '<TR>', '<TD class="Table_Frame Code">', ['<DIV class="Code_Title">', 'Python Listing: ../../Code/Matrix.py.', '</DIV>'], '<DIV CLASS="Code" STYLE="" id="Matrixpy">\n<PRE C... I[i][i]=1.0\n\n return I\n</CODE>\n</PRE>\n</DIV>', '</TD>', '</TR>', '</TABLE>', '</CENTER>']], ' </LI>', r' <LI>Matriz Diagonal, [;a_{ij}=v[i]\delta_{ij},~ i,j \in \{0,1,...,n-1\};]:', [[], ['<CENTER>', '<TABLE>', '<TR>', '<TD class="Table_Frame Code">', ['<DIV class="Code_Title">', 'Python Listing: ../../Code/Matrix.py.', '</DIV>'], '<DIV CLASS="Code" STYLE="" id="Matrixpy">\n<PRE C... D[i][i]=v[i]\n\n return D\n</CODE>\n</PRE>\n</DIV>', '</TD>', '</TR>', '</TABLE>', '</CENTER>']], ' </LI>', r' <LI>Matriz de Vandermonte, [;D_{ij}=v_i^j,~ i,j \in \{0,1,...,n-1\};]:', [[], ['<CENTER>', '<TABLE>', '<TR>', '<TD class="Table_Frame Code">', ['<DIV class="Code_Title">', 'Python Listing: ../../Code/Matrix.py.', '</DIV>'], '<DIV CLASS="Code" STYLE="" id="Matrixpy">\n<PRE C... fact*=v[i]\n\n return V\n</CODE>\n</PRE>\n</DIV>', '</TD>', '</TR>', '</TABLE>', '</CENTER>']], ' </LI>', r' <LI>Matriz Diádica, [;D_{ij}=v_i v_j,~ i,j \in \{0,1,...,n-1\};]:', [[], ['<CENTER>', '<TABLE>', '<TR>', '<TD class="Table_Frame Code">', ['<DIV class="Code_Title">', 'Python Listing: ../../Code/Matrix.py.', '</DIV>'], '<DIV CLASS="Code" STYLE="" id="Matrixpy">\n<PRE C...[i]=v[i]*v[j]\n\n return D\n</CODE>\n</PRE>\n</DIV>', '</TD>', '</TR>', '</TABLE>', '</CENTER>']], ' </LI>', ' <LI>Matriz de Rota\xc3\xa7ão:', ' @Code ../../Code/Matrix.py Matrix_Rotation', ...], n = 19, self = <Slides.Slides instance>, self.Slide_Cell_Code_Insert = <bound method Slides.Slide_Cell_Code_Insert of <Slides.Slides instance>>, paths = ['1_Disciplines', '2_MC', '8_Matrices', '5_Notables'] |
/usr/local/Python/Slides/Slide/Cell/Code/__init__.py in Slide_Cell_Code_File(self=<Slides.Slides instance>, content=['from Vector import Vector', '', 'class Matrix(list): ', ' def __init__(self,A,j=None):', ' ## Matrix creator: allocates and/or initializes', ' if (A):', " if (A.__class__.__name__=='int'):", ' #Just allocate', ' if (not j): j=A', ' for i in range(A):', ' ', " elif (A.__class__.__name__ in [ 'Matrix' ] ):", ' #Copy content!', ' for i in range( len(A) ):', ' self.append(Vector([]))', ' for j in range( len(A[i]) ):', ' self[i].append( 1.0*A[i][j] )', ' else:', ' print "Matrix.init: Invalid first argument type",A,"\'"+A.__class__.__name__+"\'"', ' exit()', ...], scriptfile='../../Code/Matrix.py', paths=['1_Disciplines', '2_MC', '8_Matrices', '5_Notables'], args=['../../Code/Matrix.py', 'Matrix_Rotation'], options={}) |
366 if (len(rargs)>0):
|
367 content=self.Slide_Cell_Code_File_Index(
|
=> 368 scriptfile,content,rargs
|
369 )
|
370
|
scriptfile = '../../Code/Matrix.py', content = ['from Vector import Vector', '', 'class Matrix(list): ', ' def __init__(self,A,j=None):', ' ## Matrix creator: allocates and/or initializes', ' if (A):', " if (A.__class__.__name__=='int'):", ' #Just allocate', ' if (not j): j=A', ' for i in range(A):', ' ', " elif (A.__class__.__name__ in [ 'Matrix' ] ):", ' #Copy content!', ' for i in range( len(A) ):', ' self.append(Vector([]))', ' for j in range( len(A[i]) ):', ' self[i].append( 1.0*A[i][j] )', ' else:', ' print "Matrix.init: Invalid first argument type",A,"\'"+A.__class__.__name__+"\'"', ' exit()', ...], rargs = ['Matrix_Rotation'] |
/usr/local/Python/Slides/Slide/Cell/Code/__init__.py in Slide_Cell_Code_File_Index(self=<Slides.Slides instance>, scriptfile='../../Code/Matrix.py', contents=['from Vector import Vector', '', 'class Matrix(list): ', ' def __init__(self,A,j=None):', ' ## Matrix creator: allocates and/or initializes', ' if (A):', " if (A.__class__.__name__=='int'):", ' #Just allocate', ' if (not j): j=A', ' for i in range(A):', ' ', " elif (A.__class__.__name__ in [ 'Matrix' ] ):", ' #Copy content!', ' for i in range( len(A) ):', ' self.append(Vector([]))', ' for j in range( len(A[i]) ):', ' self[i].append( 1.0*A[i][j] )', ' else:', ' print "Matrix.init: Invalid first argument type",A,"\'"+A.__class__.__name__+"\'"', ' exit()', ...], rargs=['Matrix_Rotation']) |
538 while (i<len(line_nos)):
|
539 i+=1
|
=> 540 m=line_nos[i]
|
541 if (m>n): break
|
542
|
m = 151, line_nos = [3, 21, 29, 47, 51, 69, 80, 89, 100, 103, 106, 110, 114, 117, 120, 127, 134, 141, 151], i = 19 |