Problem in using Pulp
Robert Kern
robert.kern at gmail.com
Thu Dec 21 23:42:46 EST 2006
amitsoni.1984 at gmail.com wrote:
> Thanks, now I am not getting that error, but now I am getting a
> different error:
> ---------------------error-------------------------------
> GLPK("C:\Documents and
> Settings\Amit\Desktop\glpk-4.9\glpk-4.9\examples\"").solve(prob)
> File "C:\Documents and Settings\Amit\Desktop\pulp\pulp.py", line 114,
> in solve
> return lp.solve(self)
> File "C:\Documents and Settings\Amit\Desktop\pulp\pulp.py", line
> 1740, in solve
> status = solver.actualSolve(self)
> File "C:\Documents and Settings\Amit\Desktop\pulp\pulp.py", line 188,
> in actualSolve
> raise "PuLP: cannot execute "+self.path
> PuLP: cannot execute C:\Documents and
> Settings\Amit\Desktop\glpk-4.9\glpk-4.9\examples"
> -------------------------------------------------------------
> can anyone tell me where the problem is? I am using following code.
> GLPK("C:\Documents and
> Settings\Amit\Desktop\glpk-4.9\glpk-4.9\examples\"").solve(prob)
The last character in that string is a double quote. You don't want that. What
you want to do is escape all of the backslashes (or use raw strings to avoid the
escaping altogether). E.g.
"C:\\Documents and Settings\\Amit\\Desktop\\glpk-4.9\\glpk-4.9\\examples\\"
or
r"C:\Documents and Settings\Amit\Desktop\glpk-4.9\gplk-4.9\examples\"
--
Robert Kern
"I have come to believe that the whole world is an enigma, a harmless enigma
that is made terrible by our own mad attempt to interpret it as though it had
an underlying truth."
-- Umberto Eco
More information about the Python-list
mailing list