Skip to content
  • 最新
  • 版块
  • 东岳流体
  • 随机看[请狂点我]
皮肤
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • 默认(不使用皮肤)
  • 不使用皮肤
折叠
CFD中文网

CFD中文网

  1. CFD中文网
  2. OpenFOAM
  3. Paraview求助,操作出现问题了

Paraview求助,操作出现问题了

已定时 已固定 已锁定 已移动 OpenFOAM
5 帖子 1 发布者 1.1k 浏览
  • 从旧到新
  • 从新到旧
  • 最多赞同
回复
  • 在新帖中回复
登录后回复
此主题已被删除。只有拥有主题管理权限的用户可以查看。
  • L 离线
    L 离线
    liu_shiqi1111
    写于 最后由 编辑
    #1

    各位大佬,想请教一下paraview操作的问题,突然无法运行了,然后重新下载了一个新版本,还是有这个问题,这个是运行时候的错误提示,能不能帮我指导处理一下,谢谢各位了。

    Generic Warning: In vtkSMColorMapEditorHelper.cxx, line 3180
    Failed to determine the LookupTable being used.

    Generic Warning: In vtkSMColorMapEditorHelper.cxx, line 3180
    Failed to determine the LookupTable being used.

    Traceback (most recent call last):
    File "F:\OpenFOAM\ParaView-5.13.1-Windows-Python3.10-msvc2017-AMD64\ParaView-5.13.1-Windows-Python3.10-msvc2017-AMD64\bin\Lib\site-packages\paraview\servermanager.py", line 3273, in GetAssociationFromString
    return ASSOCIATIONS[val]
    KeyError: 'NONE'

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
    File "F:\OpenFOAM\ParaView-5.13.1-Windows-Python3.10-msvc2017-AMD64\ParaView-5.13.1-Windows-Python3.10-msvc2017-AMD64\bin\Lib\site-packages\paraview\servermanager.py", line 3276, in GetAssociationFromString
    return _LEGACY_ASSOCIATIONS[val]
    KeyError: 'NONE'

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
    File "<string>", line 217, in <module>
    File "F:\OpenFOAM\ParaView-5.13.1-Windows-Python3.10-msvc2017-AMD64\ParaView-5.13.1-Windows-Python3.10-msvc2017-AMD64\bin\Lib\site-packages\paraview\simple.py", line 1082, in ColorBy
    rep.SetScalarColoring(None, servermanager.GetAssociationFromString(association))
    File "F:\OpenFOAM\ParaView-5.13.1-Windows-Python3.10-msvc2017-AMD64\ParaView-5.13.1-Windows-Python3.10-msvc2017-AMD64\bin\Lib\site-packages\paraview\servermanager.py", line 3278, in GetAssociationFromString
    raise RuntimeError("invalid association string '%s'" % val)
    RuntimeError: invalid association string 'NONE'

    L 1 条回复 最后回复
  • L 离线
    L 离线
    liu_shiqi1111
    写于 最后由 编辑
    #2

    这个是另一个版本的,提示的问题

    Generic Warning: In vtkSMColorMapEditorHelper.cxx, line 772
    Failed to determine the LookupTable being used.

    Generic Warning: In vtkSMColorMapEditorHelper.cxx, line 772
    Failed to determine the LookupTable being used.

    Traceback (most recent call last):
    File "F:\OpenFOAM\ParaView-5.12.0-MPI-Windows-Python3.10-msvc2017-AMD64-2\ParaView-5.12.0-MPI-Windows-Python3.10-msvc2017-AMD64\bin\Lib\site-packages\paraview\servermanager.py", line 3203, in GetAssociationFromString
    return ASSOCIATIONS[val]
    KeyError: 'NONE'

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
    File "F:\OpenFOAM\ParaView-5.12.0-MPI-Windows-Python3.10-msvc2017-AMD64-2\ParaView-5.12.0-MPI-Windows-Python3.10-msvc2017-AMD64\bin\Lib\site-packages\paraview\servermanager.py", line 3206, in GetAssociationFromString
    return _LEGACY_ASSOCIATIONS[val]
    KeyError: 'NONE'

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
    File "<string>", line 217, in <module>
    File "F:\OpenFOAM\ParaView-5.12.0-MPI-Windows-Python3.10-msvc2017-AMD64-2\ParaView-5.12.0-MPI-Windows-Python3.10-msvc2017-AMD64\bin\Lib\site-packages\paraview\simple.py", line 791, in ColorBy
    rep.SetScalarColoring(None, servermanager.GetAssociationFromString(association))
    File "F:\OpenFOAM\ParaView-5.12.0-MPI-Windows-Python3.10-msvc2017-AMD64-2\ParaView-5.12.0-MPI-Windows-Python3.10-msvc2017-AMD64\bin\Lib\site-packages\paraview\servermanager.py", line 3208, in GetAssociationFromString
    raise RuntimeError ("invalid association string '%s'" % val)
    RuntimeError: invalid association string 'NONE'

    1 条回复 最后回复
  • L 离线
    L 离线
    liu_shiqi1111
    在 中回复了 liu_shiqi1111 最后由 编辑
    #3

    但是在另一台电脑上,两个版本都能用。裂开了。是不是这台电脑的什么文件不合适了?有没有大佬能指导一下,5555555555555555555555,裂开了。
    :zoule:

    1 条回复 最后回复
  • L 离线
    L 离线
    liu_shiqi1111
    写于 最后由 编辑
    #4

    def GetAssociationFromString(val):
    """Returns array association integer value from its string representation"""
    global ASSOCIATIONS, _LEGACY_ASSOCIATIONS
    val = str(val).upper()
    try:
    return ASSOCIATIONS[val]
    except KeyError:
    try:
    return _LEGACY_ASSOCIATIONS[val]
    except KeyError:
    raise RuntimeError ("invalid association string '%s'" % val)

    这个是“ParaView-5.12.0-MPI-Windows-Python3.10-msvc2017-AMD64-2\ParaView-5.12.0-MPI-Windows-Python3.10-msvc2017-AMD64\bin\Lib\site-packages\paraview\simple.py"的

    第3198到3208行代码

    1 条回复 最后回复
  • L 离线
    L 离线
    liu_shiqi1111
    写于 最后由 编辑
    #5

    "ParaView-5.12.0-MPI-Windows-Python3.10-msvc2017-AMD64-2\ParaView-5.12.0-MPI-Windows-Python3.10-msvc2017-AMD64\bin\Lib\site-packages\paraview\simple.py"

    第790-792行:

    if value == None:
        rep.SetScalarColoring(None, servermanager.GetAssociationFromString(association))
        return
    

    第786-826行代码:

    rep.UseSeparateColorMap = separate
    association = rep.ColorArrayName.GetAssociation()
    arrayname = rep.ColorArrayName.GetArrayName()
    component = None
    if value == None:
    rep.SetScalarColoring(None, servermanager.GetAssociationFromString(association))
    return
    if not isinstance(value, tuple) and not isinstance(value, list):
    value = (value,)
    if len(value) == 1:
    arrayname = value[0]
    elif len(value) >= 2:
    association = value[0]
    arrayname = value[1]
    if len(value) == 3:
    # component name provided
    componentName = value[2]
    if componentName == "Magnitude":
    component = -1
    else:
    if association == "POINTS":
    array = rep.Input.PointData.GetArray(arrayname)
    if association == "CELLS":
    array = rep.Input.CellData.GetArray(arrayname)
    if array:
    # looking for corresponding component name
    for i in range(0, array.GetNumberOfComponents()):
    if componentName == array.GetComponentName(i):
    component = i
    break
    # none have been found, try to use the name as an int
    if i == array.GetNumberOfComponents() - 1:
    try:
    component = int(componentName)
    except ValueError:
    pass
    if component is None:
    rep.SetScalarColoring(arrayname, servermanager.GetAssociationFromString(association))
    else:
    rep.SetScalarColoring(arrayname, servermanager.GetAssociationFromString(association), component)
    rep.RescaleTransferFunctionToDataRange()

    1 条回复 最后回复

  • 登录

  • 登录或注册以进行搜索。
  • 第一个帖子
    最后一个帖子
0
  • 最新
  • 版块
  • 东岳流体
  • 随机看[请狂点我]