メインコンテンツへスキップ

File src/gurobipy/gurobi.pxi:3647, in gurobipy.read() File src/gurobipy/gurobi.pxi:70, in gurobipy.gurobi.read() AttributeError: 'PosixPath' object has no attribute 'find'

回答済み

コメント

1件のコメント

  • Riley Clement
    • Gurobi Staff

    Hi Junyang Cai,

    The Path.glob function is returning a generator expression of PosixPath objects, and then you are passing one of these to gurobipy.read, which causes an error because this function only accepts strings.

    The easiest fix is to modify the line with the read function to:

    model = grb.read(str(mip_file))

    so that the PosixPath is converted to a string representation.

    - Riley

    0

サインインしてコメントを残してください。