8000 Solver fails if TMPDIR includes a space · Issue #811 · coin-or/pulp · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Solver fails if TMPDIR includes a space #811
Open
@saizai

Description

@saizai

Details for the issue

What did you do?

Run pulp with environment TMP="/Volumes/RAM Disk/"

What did you expect to see?

Results

What did you see instead?

Usage: gurobi_cl [--command]* [param=value]* filename
Type 'gurobi_cl --help' for more information.
Traceback (most recent call last):
  [redacted]
  File [redacted]
    problem.solve(pulp.GUROBI_CMD(threads=16, timeLimit=600))
    ~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "[redacted]/Python/3.13/lib/python/site-packages/pulp/pulp.py", line 1996, in solve
    status = solver.actualSolve(self, **kwargs)
  File "[redacted]/Python/3.13/lib/python/site-packages/pulp/apis/gurobi_api.py", line 494, in actualSolve
    lp.assignVarsVals(values)
    ~~~~~~~~~~~~~~~~~^^^^^^^^
  File "[redacted]/Python/3.13/lib/python/site-packages/pulp/pulp.py", line 1918, in assignVarsVals
    for name in values:
                ^^^^^^
TypeError: 'NoneType' object is not iterable

Fix

Run pulp with environment TMP="/Volumes/RAMDisk/" (no space)

See e.g.

cmd += f" ResultFile={tmpSol}"
if self.optionsDict.get("warmStart", False):
self.writesol(filename=tmpMst, vs=vs)
cmd += f" InputFile={tmpMst}"
if lp.isMIP():
if not self.mip:
warnings.warn("GUROBI_CMD does not allow a problem to be relaxed")
cmd += f" {tmpLp}"
which fail to quote the file names. Probably true for other APIs too.

Useful extra information

The info below often helps, please fill it out if you're able to. :)

What operating system are you using?

  • Windows: ( version: ___ )
  • Linux: ( distro: ___ )
  • Mac OS: ( version: ___ )
  • Other: ___

I'm using python version:

  • 3.7
  • 3.8
  • 3.9
  • 3.10
  • 3.11
  • Other: 3.13.2

I installed PuLP via:

Did you also

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0