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
I created a function called simple_prompt(review, rating) and better_prompt(review, rating), but when I run this function from my prompts.py script I am landing with an error. Can anyone help me here?
"Traceback (most recent call last):░░░░░░░] 0% | ETA: 0s | 0/3 | "" File "C:\Users\JB06216\AppData\Local\npm-cache\_npx\81bbc6515d992ace\node_modules\promptfoo\dist\src\python\wrapper.py", line 39, in <module> result = call_method(script_path, method_name, *data) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\JB06216\AppData\Local\npm-cache\_npx\81bbc6515d992ace\node_modules\promptfoo\dist\src\python\wrapper.py", line 28, in call_method return method_to_call(*args) ^^^^^^^^^^^^^^^^^^^^^ TypeError: better_prompt() missing 1 required positional argument: 'rating' Traceback (most recent call last): File "C:\Users\JB06216\AppData\Local\npm-cache\_npx\81bbc6515d992ace\node_modules\promptfoo\dist\src\python\wrapper.py", line 39, in <module> result = call_method(script_path, method_name, *data) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\JB06216\AppData\Local\npm-cache\_npx\81bbc6515d992ace\node_modules\promptfoo\dist\src\python\wrapper.py", line 28, in call_method return method_to_call(*args) ^^^^^^^^^^^^^^^^^^^^^ TypeError: simple_prompt() missing 1 required positional argument: 'rating' Traceback (most recent call last): File "C:\Users\JB06216\AppData\Local\npm-cache\_npx\81bbc6515d992ace\node_modules\promptfoo\dist\src\python\wrapper.py", line 39, in <module> result = call_method(script_path, method_name, *data) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\JB06216\AppData\Local\npm-cache\_npx\81bbc6515d992ace\node_modules\promptfoo\dist\src\python\wrapper.py", line 28, in call_method return method_to_call(*args) ^^^^^^^^^^^^^^^^^^^^^ TypeError: simple_prompt() missing 1 required positional argument: 'rating' Error running Python script: TypeError: better_prompt() missing 1 required positional argument: 'rating' Stack Trace: Error: TypeError: better_prompt() missing 1 required positional argument: 'rating' at PythonShell.parseError (C:\Users\JB06216\AppData\Local\npm-cache\_npx\81bbc6515d992ace\node_modules\python-shell\index.js:303:21) at terminateIfNeeded (C:\Users\JB06216\AppData\Local\npm-cache\_npx\81bbc6515d992ace\node_modules\python-shell\index.js:193:32) at ChildProcess.<anonymous> (C:\Users\JB06216\AppData\Local\npm-cache\_npx\81bbc6515d992ace\node_modules\python-shell\index.js:185:13) at ChildProcess.emit (node:events:519:28) at ChildProcess._handle.onexit (node:internal/child_process:294:12) --Python Traceback: -- File "C:\Users\JB06216\AppData\Local\npm-cache\_npx\81bbc6515d992ace\node_modules\promptfoo\dist\src\python\wrapper.py", line 39, in <module> result = call_method(script_path, method_name, *data) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\JB06216\AppData\Local\npm-cache\_npx\81bbc6515d992ace\node_modules\promptfoo\dist\src\python\wrapper.py", line 28, in call_method return method_to_call(*args) ^^^^^^^^^^^^^^^^^^^^^ Error removing C:\Users\JB06216\AppData\Local\Temp\promptfoo-python-output-json-1729168652278-f414fd688d28b.json: Error: ENOENT: no such file or directory, unlink 'C:\Users\JB06216\AppData\Local\Temp\promptfoo-python-output-json-1729168652278-f414fd688d28b.json' C:\Users\JB06216\AppData\Local\npm-cache\_npx\81bbc6515d992ace\node_modules\promptfoo\dist\src\python\pythonUtils.js:139 throw new Error(Error running Python script: ${error.message}\nStack Trace: ${error.stack?.replace('--- Python Traceback ---', 'Python Traceback: ') ||
^
Error: Error running Python script: TypeError: better_prompt() missing 1 required positional
argument: 'rating'
Stack Trace: Error: TypeError: better_prompt() missing 1 required positional argument: 'rating'
at PythonShell.parseError (C:\Users\JB06216\AppData\Local\npm-cache_npx\81bbc6515d992ace\node_modules\python-shell\index.js:303:21)
at terminateIfNeeded (C:\Users\JB06216\AppData\Local\npm-cache_npx\81bbc6515d992ace\node_modules\python-shell\index.js:193:32)
at ChildProcess. (C:\Users\JB06216\AppData\Local\npm-cache_npx\81bbc6515d992ace\node_modules\python-shell\index.js:185:13)
at ChildProcess.emit (node:events:519:28)
at ChildProcess._handle.onexit (node:internal/child_process:294:12)
--Python Traceback: --
File "C:\Users\JB06216\AppData\Local\npm-cache_npx\81bbc6515d992ace\node_modules\promptfoo\dist\src\python\wrapper.py", line 39, in
result = call_method(script_path, method_name, *data)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\JB06216\AppData\Local\npm-cache_npx\81bbc6515d992ace\node_modules\promptfoo\dist\src\python\wrapper.py", line 28, in call_method
return method_to_call(*args)
^^^^^^^^^^^^^^^^^^^^^
at runPython (C:\Users\JB06216\AppData\Local\npm-cache_npx\81bbc6515d992ace\node_modules\promptfoo\dist\src\python\pythonUtils.js:139:15)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async renderPrompt (C:\Users\JB06216\AppData\Local\npm-cache_npx\81bbc6515d992ace\node_modules\promptfoo\dist\src\evaluatorHelpers.js:118:24)
at async Evaluator.runEval (C:\Users\JB06216\AppData\Local\npm-cache_npx\81bbc6515d992ace\node_modules\promptfoo\dist\src\evaluator.js:140:32)
at async processEvalStep (C:\Users\JB06216\AppData\Local\npm-cache_npx\81bbc6515d992ace\node_modules\promptfoo\dist\src\evaluator.js:536:25)
Node.js v20.18.0"`
The text was updated successfully, but these errors were encountered:
I created a function called simple_prompt(review, rating) and better_prompt(review, rating), but when I run this function from my prompts.py script I am landing with an error. Can anyone help me here?
"Traceback (most recent call last):░░░░░░░] 0% | ETA: 0s | 0/3 | "" File "C:\Users\JB06216\AppData\Local\npm-cache\_npx\81bbc6515d992ace\node_modules\promptfoo\dist\src\python\wrapper.py", line 39, in <module> result = call_method(script_path, method_name, *data) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\JB06216\AppData\Local\npm-cache\_npx\81bbc6515d992ace\node_modules\promptfoo\dist\src\python\wrapper.py", line 28, in call_method return method_to_call(*args) ^^^^^^^^^^^^^^^^^^^^^ TypeError: better_prompt() missing 1 required positional argument: 'rating' Traceback (most recent call last): File "C:\Users\JB06216\AppData\Local\npm-cache\_npx\81bbc6515d992ace\node_modules\promptfoo\dist\src\python\wrapper.py", line 39, in <module> result = call_method(script_path, method_name, *data) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\JB06216\AppData\Local\npm-cache\_npx\81bbc6515d992ace\node_modules\promptfoo\dist\src\python\wrapper.py", line 28, in call_method return method_to_call(*args) ^^^^^^^^^^^^^^^^^^^^^ TypeError: simple_prompt() missing 1 required positional argument: 'rating' Traceback (most recent call last): File "C:\Users\JB06216\AppData\Local\npm-cache\_npx\81bbc6515d992ace\node_modules\promptfoo\dist\src\python\wrapper.py", line 39, in <module> result = call_method(script_path, method_name, *data) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\JB06216\AppData\Local\npm-cache\_npx\81bbc6515d992ace\node_modules\promptfoo\dist\src\python\wrapper.py", line 28, in call_method return method_to_call(*args) ^^^^^^^^^^^^^^^^^^^^^ TypeError: simple_prompt() missing 1 required positional argument: 'rating' Error running Python script: TypeError: better_prompt() missing 1 required positional argument: 'rating' Stack Trace: Error: TypeError: better_prompt() missing 1 required positional argument: 'rating' at PythonShell.parseError (C:\Users\JB06216\AppData\Local\npm-cache\_npx\81bbc6515d992ace\node_modules\python-shell\index.js:303:21) at terminateIfNeeded (C:\Users\JB06216\AppData\Local\npm-cache\_npx\81bbc6515d992ace\node_modules\python-shell\index.js:193:32) at ChildProcess.<anonymous> (C:\Users\JB06216\AppData\Local\npm-cache\_npx\81bbc6515d992ace\node_modules\python-shell\index.js:185:13) at ChildProcess.emit (node:events:519:28) at ChildProcess._handle.onexit (node:internal/child_process:294:12) --Python Traceback: -- File "C:\Users\JB06216\AppData\Local\npm-cache\_npx\81bbc6515d992ace\node_modules\promptfoo\dist\src\python\wrapper.py", line 39, in <module> result = call_method(script_path, method_name, *data) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\JB06216\AppData\Local\npm-cache\_npx\81bbc6515d992ace\node_modules\promptfoo\dist\src\python\wrapper.py", line 28, in call_method return method_to_call(*args) ^^^^^^^^^^^^^^^^^^^^^ Error removing C:\Users\JB06216\AppData\Local\Temp\promptfoo-python-output-json-1729168652278-f414fd688d28b.json: Error: ENOENT: no such file or directory, unlink 'C:\Users\JB06216\AppData\Local\Temp\promptfoo-python-output-json-1729168652278-f414fd688d28b.json' C:\Users\JB06216\AppData\Local\npm-cache\_npx\81bbc6515d992ace\node_modules\promptfoo\dist\src\python\pythonUtils.js:139 throw new Error(
Error running Python script: ${error.message}\nStack Trace: ${error.stack?.replace('--- Python Traceback ---', 'Python Traceback: ') ||^
Error: Error running Python script: TypeError: better_prompt() missing 1 required positional
argument: 'rating'
Stack Trace: Error: TypeError: better_prompt() missing 1 required positional argument: 'rating'
at PythonShell.parseError (C:\Users\JB06216\AppData\Local\npm-cache_npx\81bbc6515d992ace\node_modules\python-shell\index.js:303:21)
at terminateIfNeeded (C:\Users\JB06216\AppData\Local\npm-cache_npx\81bbc6515d992ace\node_modules\python-shell\index.js:193:32)
at ChildProcess. (C:\Users\JB06216\AppData\Local\npm-cache_npx\81bbc6515d992ace\node_modules\python-shell\index.js:185:13)
at ChildProcess.emit (node:events:519:28)
at ChildProcess._handle.onexit (node:internal/child_process:294:12)
--Python Traceback: --
File "C:\Users\JB06216\AppData\Local\npm-cache_npx\81bbc6515d992ace\node_modules\promptfoo\dist\src\python\wrapper.py", line 39, in
result = call_method(script_path, method_name, *data)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\JB06216\AppData\Local\npm-cache_npx\81bbc6515d992ace\node_modules\promptfoo\dist\src\python\wrapper.py", line 28, in call_method
return method_to_call(*args)
^^^^^^^^^^^^^^^^^^^^^
at runPython (C:\Users\JB06216\AppData\Local\npm-cache_npx\81bbc6515d992ace\node_modules\promptfoo\dist\src\python\pythonUtils.js:139:15)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async renderPrompt (C:\Users\JB06216\AppData\Local\npm-cache_npx\81bbc6515d992ace\node_modules\promptfoo\dist\src\evaluatorHelpers.js:118:24)
at async Evaluator.runEval (C:\Users\JB06216\AppData\Local\npm-cache_npx\81bbc6515d992ace\node_modules\promptfoo\dist\src\evaluator.js:140:32)
at async processEvalStep (C:\Users\JB06216\AppData\Local\npm-cache_npx\81bbc6515d992ace\node_modules\promptfoo\dist\src\evaluator.js:536:25)
Node.js v20.18.0"`
The text was updated successfully, but these errors were encountered: