已有184人关注
处理声音和WORD 的例子执行有错误
发表在Python图书答疑 2020-09-09 《Python编程锦囊》第5章 图形图像与多媒体 115页-137页
是否精华
版块置顶:
  1. 处理声音是百度云的 appid 、apikey secretkey 要填写吗?如何获得?

  2. 处理word的例子第一个例子:

  3. Traceback (most recent call last):
      File "D:\PYTHON\python385\Python编程锦囊\Code(实例源码及使用说明)\Code(实例源码及使用说明)\06\01\wordtopdf.py", line 72, in <module>
        valueList = wordtopdf(filelist,targetpath)  # 实现将Word文档批量转换为PDF
      File "D:\PYTHON\python385\Python编程锦囊\Code(实例源码及使用说明)\Code(实例源码及使用说明)\06\01\wordtopdf.py", line 36, in wordtopdf
        gencache.EnsureModule('{00020905-0000-0000-C000-000000000046}', 0, 8, 4)
      File "D:\PYTHON\python385\lib\site-packages\win32com\client\gencache.py", line 518, in EnsureModule
        module = MakeModuleForTypelib(typelibCLSID, lcid, major, minor, progressInstance, bForDemand = bForDemand, bBuildHidden = bBuildHidden)
      File "D:\PYTHON\python385\lib\site-packages\win32com\client\gencache.py", line 287, in MakeModuleForTypelib
        makepy.GenerateFromTypeLibSpec( (typelibCLSID, lcid, major, minor), progressInstance=progressInstance, bForDemand = bForDemand, bBuildHidden = bBuildHidden)
      File "D:\PYTHON\python385\lib\site-packages\win32com\client\makepy.py", line 223, in GenerateFromTypeLibSpec
        tlb = pythoncom.LoadRegTypeLib(typelibCLSID, major, minor, lcid)
    pywintypes.com_error: (-2147319779, '库没有注册。', None, None)

    如第二个:Traceback (most recent call last):
      File "D:\PYTHON\python385\Python编程锦囊\Code(实例源码及使用说明)\Code(实例源码及使用说明)\06\01\wordtopdf.py", line 72, in <module>
        valueList = wordtopdf(filelist,targetpath)  # 实现将Word文档批量转换为PDF
      File "D:\PYTHON\python385\Python编程锦囊\Code(实例源码及使用说明)\Code(实例源码及使用说明)\06\01\wordtopdf.py", line 36, in wordtopdf
        gencache.EnsureModule('{00020905-0000-0000-C000-000000000046}', 0, 8, 4)
      File "D:\PYTHON\python385\lib\site-packages\win32com\client\gencache.py", line 518, in EnsureModule
        module = MakeModuleForTypelib(typelibCLSID, lcid, major, minor, progressInstance, bForDemand = bForDemand, bBuildHidden = bBuildHidden)
      File "D:\PYTHON\python385\lib\site-packages\win32com\client\gencache.py", line 287, in MakeModuleForTypelib
        makepy.GenerateFromTypeLibSpec( (typelibCLSID, lcid, major, minor), progressInstance=progressInstance, bForDemand = bForDemand, bBuildHidden = bBuildHidden)
      File "D:\PYTHON\python385\lib\site-packages\win32com\client\makepy.py", line 223, in GenerateFromTypeLibSpec
        tlb = pythoncom.LoadRegTypeLib(typelibCLSID, major, minor, lcid)
    pywintypes.com_error: (-2147319779, '库没有注册。', None, None)
    >>>是什么出问题了?


分享到:
手机同步功能介绍
友情提示:以下图书配套资源能够实现手机同步功能
明日微信公众号
明日之星 明日之星编程特训营
客服热线(每日9:00-17:00)
400 675 1066
mingrisoft@mingrisoft.com
吉林省明日科技有限公司Copyright ©2007-2022,mingrisoft.com, All Rights Reserved长春市北湖科技开发区盛北大街3333号长春北湖科技园项目一期A10号楼四、五层
吉ICP备10002740号-2吉公网安备22010202000132经营性网站备案信息 营业执照