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
df is a simple dataframe with Timestamp/Value. The question was "Does the time series show any unusual trends?".
And the error:
Traceback (most recent call last):
File "/var/folders/fy/2zls_q7526d7rk8xmp_kkcjh0000gn/T/ipykernel_29184/1296646968.py", line 29, in analyze
result = agent.chat(question)
^^^^^^^^^^^^^^^^^^^^
File "/Users/tconte/src/Cognite/cog-ai/.venv-notebooks/lib/python3.11/site-packages/pandasai/agent/base.py", line 92, in chat
return self._process_query(query, output_type)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/tconte/src/Cognite/cog-ai/.venv-notebooks/lib/python3.11/site-packages/pandasai/agent/base.py", line 262, in _process_query
result = self.execute_with_retries(code)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/tconte/src/Cognite/cog-ai/.venv-notebooks/lib/python3.11/site-packages/pandasai/agent/base.py", line 177, in execute_with_retries
result = self.execute_code(code)
^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/tconte/src/Cognite/cog-ai/.venv-notebooks/lib/python3.11/site-packages/pandasai/agent/base.py", line 127, in execute_code
return self._sandbox.execute(code, code_executor.environment)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/tconte/src/Cognite/cog-ai/.venv-notebooks/lib/python3.11/site-packages/pandasai/sandbox/sandbox.py", line 19, in execute
return self._exec_code(code, environment)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/tconte/src/Cognite/cog-ai/.venv-notebooks/lib/python3.11/site-packages/pandasai_docker/docker_sandbox.py", line 119, in _exec_code
sql_queries = self._extract_sql_queries_from_code(code)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/tconte/src/Cognite/cog-ai/.venv-notebooks/lib/python3.11/site-packages/pandasai/sandbox/sandbox.py", line 63, in _extract_sql_queries_from_code
SQLQueryExtractor().visit(tree)
File "/Users/tconte/.pyenv/versions/3.11.9/lib/python3.11/ast.py", line 418, in visit
return visitor(node)
^^^^^^^^^^^^^
File "/Users/tconte/.pyenv/versions/3.11.9/lib/python3.11/ast.py", line 426, in generic_visit
self.visit(item)
File "/Users/tconte/.pyenv/versions/3.11.9/lib/python3.11/ast.py", line 418, in visit
return visitor(node)
^^^^^^^^^^^^^
File "/Users/tconte/.pyenv/versions/3.11.9/lib/python3.11/ast.py", line 428, in generic_visit
self.visit(value)
File "/Users/tconte/.pyenv/versions/3.11.9/lib/python3.11/ast.py", line 418, in visit
return visitor(node)
^^^^^^^^^^^^^
File "/Users/tconte/src/Cognite/cog-ai/.venv-notebooks/lib/python3.11/site-packages/pandasai/sandbox/sandbox.py", line 57, in visit_Call
if "SELECT" in arg.s.upper():
^^^^^^^^^^^
AttributeError: 'bool' object has no attribute 'upper'
The text was updated successfully, but these errors were encountered:
System Info
❯ python --version
Python 3.11.9
❯ pip freeze | grep pandasai
pandasai==3.0.0b11
pandasai-docker==0.1.2
pandasai-openai==0.1.4
🐛 Describe the bug
Sometimes, when using the sandbox, the following failure happens.
Here is what I did:
df
is a simple dataframe with Timestamp/Value. The question was "Does the time series show any unusual trends?".And the error:
The text was updated successfully, but these errors were encountered: