melih-unsal / DemoGPT

🤖 Everything you need to create an LLM Agent—tools, prompts, frameworks, and models—all in one place.
MIT License
1.69k stars 200 forks source link

TypeError for path #6

Closed Yayutan closed 1 year ago

Yayutan commented 1 year ago

Describe the bug I am using DemoGPT on MAC, and ran into TypeError once I submitted.

To Reproduce Steps to reproduce the behavior:

  1. On terminal, run app with command streamlit run app.py
  2. Click on the example Language Translator
  3. Click submit button
  4. See error

Error Message Language Translator đź“ť 2023-07-03 17:26:34.783 Uncaught app exception Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 552, in _run_script exec(code, module.__dict__) File "/Users/mchuang/Desktop/Testing tools/DemoGPT/src/prompt_based/app.py", line 67, in <module> for data in generate_response(demo_idea): File "/Users/mchuang/Desktop/Testing tools/DemoGPT/src/prompt_based/app.py", line 16, in generate_response for data in agent(txt,num_of_iterations): File "/Users/mchuang/Desktop/Testing tools/DemoGPT/src/prompt_based/model.py", line 69, in __call__ response, error = self.run_python(total_code) File "/Users/mchuang/Desktop/Testing tools/DemoGPT/src/prompt_based/model.py", line 35, in run_python process = subprocess.Popen([python_path,tmp.name], env=environmental_variables,stdout=PIPE, stderr=PIPE) File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/subprocess.py", line 966, in __init__ self._execute_child(args, executable, preexec_fn, close_fds, File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/subprocess.py", line 1717, in _execute_child and os.path.dirname(executable) File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/posixpath.py", line 152, in dirname p = os.fspath(p) TypeError: expected str, bytes or os.PathLike object, not NoneType

Screenshots

image

Desktop (please complete the following information):

melih-unsal commented 1 year ago

Hey @Yayutan ,

Thank you for your detailed report and for bringing this issue to our attention. We sincerely apologize for any inconvenience caused. It appears that the issue was related to the "which" command runs in the macOS operating system, as you rightly pointed out.

I'm glad to inform you that we've pushed a new update to the repository that should resolve the issue. You should now be able to run the Streamlit app without encountering this problem.

Please update your local copy of the repository and retry running the Streamlit app. If you encounter any further issues, don't hesitate to report them. Your feedback is highly appreciated and helps us improve the overall user experience.

Thank you for your support and contribution to DemoGPT.

Best, Melih