str object has no attribute 'update'

906 views
Skip to first unread message

Saravanakumar Natarajan

unread,
Dec 12, 2015, 1:11:14 AM12/12/15
to Pyomo Forum
I am getting AttributeError 'str' object has no attribute 'update'

Exception location. /usr/local/lib/python3.4/site-packages/Pyomo-4.2.10784-py3.4.egg/pyomo/opt/base/solvers.py in solve, Line 530

Python version 3.4.0

tmp_solver_options = kwds.pop('options', {})
530         tmp_solver_options.update(
531             self._options_string_to_dict(kwds.pop('options_string', '')))

Gabriel Hackebeil

unread,
Dec 12, 2015, 9:50:43 AM12/12/15
to pyomo...@googlegroups.com
Looks like you are assigning the options keyword a string, when it should be assigned a dictionary. The options_string keyword is probably what you are looking for. Example:

opt.solve(model, options={‘threads: 1}, options_string=“mipgap=0.2”)

Gabe

--
You received this message because you are subscribed to the Google Groups "Pyomo Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pyomo-forum...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages