Traceback (most recent call last):
File "D:\диплом\КР\расчет перекрытия.py", line 238, in <module>
doc.render(context)
File "C:\Users\mayf1\Anaconda3\lib\site-packages\docxtpl\template.py", line 368, in render
xml_src = self.build_xml(context, jinja_env)
File "C:\Users\mayf1\Anaconda3\lib\site-packages\docxtpl\template.py", line 315, in build_xml
xml = self.render_xml_part(xml, self.docx._part, context, jinja_env)
File "C:\Users\mayf1\Anaconda3\lib\site-packages\docxtpl\template.py", line 245, in render_xml_part
raise exc
File "C:\Users\mayf1\Anaconda3\lib\site-packages\docxtpl\template.py", line 238, in render_xml_part
template = Template(src_xml)
File "C:\Users\mayf1\Anaconda3\lib\site-packages\jinja2\environment.py", line 1031, in __new__
return env.from_string(source, template_class=cls)
File "C:\Users\mayf1\Anaconda3\lib\site-packages\jinja2\environment.py", line 941, in from_string
return cls.from_code(self, self.compile(source), globals, None)
File "C:\Users\mayf1\Anaconda3\lib\site-packages\jinja2\environment.py", line 638, in compile
self.handle_exception(source=source_hint)
File "C:\Users\mayf1\Anaconda3\lib\site-packages\jinja2\environment.py", line 832, in handle_exception
reraise(*rewrite_traceback_stack(source=source))
File "C:\Users\mayf1\Anaconda3\lib\site-packages\jinja2\_compat.py", line 28, in reraise
raise value.with_traceback(tb)
File "<unknown>", line 37, in template
TemplateSyntaxError: unexpected '<'
from docxtpl import DocxTemplate
#import docx
doc = DocxTemplate("shablon_raschet_perekrytiya.docx")
#doc = docx.Document("шаблон расчет перекрытия.docx")
context = {'Rbn' : Rbn,
"Rb":Rb, "Rbt":Rbt,
"Ebdelitna1000": str(Eb/1000).replace(".",","),
"epsilonb2":str(epsilonb2).replace(".",","),
"Rsn":Rsn, "Rs":Rs, "Rsc":Rsc,
"Es":str(Es/100000).replace(".",","),
"b":b, "b_v_metrakh":str(b_v_metrakh).replace(".",","),
"h":h, "h_v_metrakh":str(h_v_metrakh).replace(".",","),
"bpilona":bpilona, "apilona":apilona,
"a1": str(a1).replace(".",","),
"a2":str(a2).replace(".",","),
"a3":str(a3).replace(".",","),
"a4":str(a4).replace(".",","),
"d1":d1,"d2":d2,"d3":d3,"d4":d4,
"Asx_v":str(Asx_v).replace(".",","), "Asy_v":str(Asy_v).replace(".",","),
"Asx_n":str(Asx_n).replace(".",","),
"ds":str(ds).replace(".",","), "nd1":nd1,
"nd2":nd2, "nd3":nd3, "nd4":nd4,
"Asx_n_sered":str(Asx_n_sered).replace(".",","),
"nd11":nd11, "d11":d11, "Asx_v_sered":str(Asx_v_sered).replace(".",","),
"nd12":nd12, "d12":d12, "ds_sered":str(ds_sered).replace(".",","),
"a_crc_ult_l":str(a_crc_ult_l).replace(".",","),
"a_crc_ult":str(a_crc_ult).replace(".",","),
"Mx_r_p_n_na_opore":str(Mx_r_p_n_na_opore).replace(".",","),
"My_r_p_n_na_opore":str(My_r_p_n_na_opore).replace(".",","),
"Mxn_na_opore":str(Mxn_na_opore).replace(".",","),
"Mxnl_na_opore":str(Mxnl_na_opore).replace(",","."),
"Mx_r_p_n_v_prolete":str(Mx_r_p_n_v_prolete).replace(".",","),
"My_r_p_n_v_prolete":str(My_r_p_n_v_prolete).replace(".",","),
"Mxn_v_prolete":str(Mxn_v_prolete).replace(".",","),
"Mnl_v_prolete":str(Mnl_v_prolete).replace(".",","),
"Qx":Qx, "N1":N1,
"My1":str(My1).replace(".",","),
"Mz1":str(Mz1).replace(".",","),
"N2":N2, "My2":str(My2).replace(".",","),
"Mz2":str(Mz2).replace(".",","),
"gamman":str(gamman).replace(".",","),
"h0":str(h0).replace(".",","),
"epsilon_s_el":str(epsilon_s_el).replace(".",","),
"xR":str(xR).replace(".",","),
"ksiR":str(ksiR).replace(".",",")
}
doc.render(context)
doc.save("ручной_расчет_перекрытия.docx")