Got a Key Error when trying to access ReactionPredict

#3
by CosmoJX - opened

File "/home/user/.local/lib/python3.8/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 552, in _run_script
exec(code, module.dict)
File "/home/user/app/app.py", line 151, in
run_prompt(user_input)
File "/home/user/app/app.py", line 76, in run_prompt
response = agent.run(prompt, callbacks=[st_callback])
File "/home/user/.local/lib/python3.8/site-packages/langchain/chains/base.py", line 475, in run
return self(args[0], callbacks=callbacks, tags=tags, metadata=metadata)[
File "/home/user/.local/lib/python3.8/site-packages/langchain/chains/base.py", line 282, in call
raise e
File "/home/user/.local/lib/python3.8/site-packages/langchain/chains/base.py", line 276, in call
self._call(inputs, run_manager=run_manager)
File "/home/user/.local/lib/python3.8/site-packages/langchain/agents/agent.py", line 1036, in _call
next_step_output = self._take_next_step(
File "/home/user/.local/lib/python3.8/site-packages/langchain/agents/agent.py", line 891, in _take_next_step
observation = tool.run(
File "/home/user/.local/lib/python3.8/site-packages/langchain/tools/base.py", line 351, in run
raise e
File "/home/user/.local/lib/python3.8/site-packages/langchain/tools/base.py", line 325, in run
else self._run(*tool_args, **tool_kwargs)
File "/home/user/.local/lib/python3.8/site-packages/chemcrow/tools/rxn4chem.py", line 97, in _run
prediction_id = self.predict_reaction(reactants)
File "/home/user/.local/lib/python3.8/site-packages/chemcrow/tools/rxn4chem.py", line 76, in newfn
return func(*args, **kwargs)
File "/home/user/.local/lib/python3.8/site-packages/chemcrow/tools/rxn4chem.py", line 109, in predict_reaction
raise KeyError

Sign up or log in to comment