码迷,mamicode.com
首页 > 其他好文 > 详细

有没有大神来帮忙看下问题出在哪里?

时间:2020-04-11 00:22:15      阅读:162      评论:0      收藏:0      [点我收藏+]

标签:test   def   span   att   main   document   attribute   doc   class   

报错:‘Document‘ object has no attribute ‘add_paragragh‘

from docx import Document

class Test(object):
    def __init__(self):
        self.doc = Document()

    def test(self):
        self.doc.add_paragragh(test)

if __name__ == __main__:
    t = Test()
    t.test()

 

  

有没有大神来帮忙看下问题出在哪里?

标签:test   def   span   att   main   document   attribute   doc   class   

原文地址:https://www.cnblogs.com/watalo/p/12677048.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!