model.Write "Unknown file type" with json
AnsweredI'm able to use model.write('test.lp') and model.write('test.sol') but not model.write('test.attr') or model.write('test.json'). The error message is " GurobiError: Unknown file type for file 'test.attr' " Anyone have any idea why this may be the case? I'm using Gurobi 8.1 with Python and the model is solved to optimality.
-
Official comment
This post is more than three years old. Some information may not be up to date. For current information, please check the Gurobi Documentation or Knowledge Base. If you need more help, please create a new post in the community forum. Or why not try our AI Gurobot?. -
Hi Kati,
Gurobi 9.0.0 was the first version to support writing .attr and .json files. Could you upgrade to the latest version of Gurobi (9.0.2) and try again?
Thanks,
Eli
0 -
I updated to Gurobi 9.5.2, but I am getting the same error with writing the log file:
I can run
m.write("myfile.sol")
m.write("myfile.lp")
m.write("myfile.log")But then I get the error
GurobiError: Unknown file type for file 'myfile.log'
0 -
I see. I can write it by using
m.Params.logfile = "myfile.log"
0
Post is closed for comments.
Comments
4 comments