python程序异常_Python程序显示异常

我想用python运行下面的程序。。在from __future__ import print_function

import sys

from OCC.STEPControl import STEPControl_Reader

from OCC.IFSelect import IFSelect_RetDone, IFSelect_ItemsByEntity

from OCC.Display.SimpleGui import init_display

from OCC.Display.WebGl import threejs_renderer

from OCC.STEPCAFControl import STEPCAFControl_Reader

step_reader = STEPControl_Reader()

status = step_reader.ReadFile('./models/part_ARROWS_ASM.stp')

if status == IFSelect_RetDone: # check status

failsonly = False

step_reader.PrintCheckLoad(failsonly, IFSelect_ItemsByEntity)

step_reader.PrintCheckTransfer(failsonly, IFSelect_ItemsByEntity)

ok = step_reader.TransferRoot(1)

_nbs = step_reader.NbShapes()

aResShape = step_reader.Shape(1)

else:

print("Error: can't read file.")

sys.exit(0)

#display, start_display, add_menu, add_function_to_menu = init_display()

#display.DisplayShape(aResShape, update=True)

#start_display()

my_renderer = threejs_renderer.ThreejsRenderer(background_color="#123345")

my_renderer.DisplayShape(aResShape)

它在没有这个模块的情况下成功运行OCC.STEPCAF控制. 在运行上述程序后,发现该程序低于EER。在

^{pr2}$

在得到这个错误粘贴之后OCC.STEPCAF控制此模块位于OCC文件夹中,此问题已解决,但它显示另一个异常,如下所述。在Traceback (most recent call last):

File "D:\software\python\pythonocc-core-master\examples\core_load_step_ap203.py", line 26, in

from OCC.STEPCAFControl import STEPCAFControl_Reader

File "C:\Python34\lib\site-packages\OCC\STEPCAFControl.py", line 28, in

_STEPCAFControl = swig_import_helper()

File "C:\Python34\lib\site-packages\OCC\STEPCAFControl.py", line 24, in swig_import_helper

_mod = imp.load_module('_STEPCAFControl', fp, pathname, description)

File "C:\Python34\lib\imp.py", line 243, in load_module

return load_dynamic(name, filename, file)

ImportError: DLL load failed: The specified module could not be found.

如何解决这个问题?有什么建议吗?在

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值