You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I cannot push anything right now, I'm writing how to solve it hoping that someone can commit a fixed code.
The method dict.keys() in python 3 doesn't return a list. You should use list(dict) to get a list of keys, in that it works for both python 2 and 3
________________________________
From: Jean-Christophe Lachance <[email protected]>
Sent: Friday, April 12, 2019 2:02 AM
To: jclachance/BOFdat
Cc: Christiansj83; Author
Subject: Re: [jclachance/BOFdat] error when trying to update biomass (#31)
Hi Christian,
Are you still struggling with this issue?
Thank you,
JC
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<#31 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/ApDBhEjHcvdcuDm2m4eBBRIHcMFen2aXks5vf80AgaJpZM4YFc7K>.
TypeError Traceback (most recent call last)
in ()
----> 1 update.update_biomass(d,model_so)
~/.local/lib/python3.6/site-packages/BOFdat-0.1.7-py3.6.egg/BOFdat/util/update.py in update_biomass(dict_of_coefficients, model)
115 :return: none
116 """
--> 117 biomass = _get_biomass_objective_function(model)
118 find_in_biomass(biomass, dict_of_coefficients)
119
~/.local/lib/python3.6/site-packages/BOFdat-0.1.7-py3.6.egg/BOFdat/util/update.py in _get_biomass_objective_function(model)
62 def _get_biomass_objective_function(model):
63 from cobra.util.solver import linear_reaction_coefficients
---> 64 return linear_reaction_coefficients(model).keys()[0]
65
66 #------------------------------#
TypeError: 'dict_keys' object does not support indexing
The text was updated successfully, but these errors were encountered: