Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Load PDF bug #1156

Closed
2 tasks done
jiashenC opened this issue Sep 18, 2023 · 2 comments · Fixed by #1159
Closed
2 tasks done

Load PDF bug #1156

jiashenC opened this issue Sep 18, 2023 · 2 comments · Fixed by #1159
Assignees

Comments

@jiashenC
Copy link
Member

jiashenC commented Sep 18, 2023

Search before asking

  • I have searched the EvaDB issues and found no similar bug report.

Bug

Load PDF command uses lower case does not trigger parser error but triggers executor exception.

cur = evadb.connect().cursor()
cur.query("load pdf 'omscentral.pdf' into testpdf").df()

Error output from the exception.

09-17-2023 23:16:48 ERROR [plan_executor:plan_executor.py:execute_plan:0182] cannot access local variable 'executor' where it is not associated with a value
Traceback (most recent call last):
File "/Users/jiashenc/Workspace/eva/evadb/executor/plan_executor.py", line 178, in execute_plan
yield from output
File "/Users/jiashenc/Workspace/eva/evadb/executor/load_executor.py", line 44, in exec
for batch in executor.exec():
^^^^^^^^
UnboundLocalError: cannot access local variable 'executor' where it is not associated with a value
Traceback (most recent call last):
File "/Users/jiashenc/Workspace/eva/evadb/executor/plan_executor.py", line 178, in execute_plan
yield from output
File "/Users/jiashenc/Workspace/eva/evadb/executor/load_executor.py", line 44, in exec
for batch in executor.exec():
^^^^^^^^
UnboundLocalError: cannot access local variable 'executor' where it is not associated with a value

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "", line 1, in
File "/Users/jiashenc/Workspace/eva/evadb/interfaces/relational/relation.py", line 110, in df
batch = self.execute()
^^^^^^^^^^^^^^
File "/Users/jiashenc/Workspace/eva/evadb/interfaces/relational/relation.py", line 120, in execute
result = execute_statement(self._evadb, self._query_node.copy())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/jiashenc/Workspace/eva/evadb/server/command_handler.py", line 53, in execute_statement
batch_list = list(output)
^^^^^^^^^^^^
File "/Users/jiashenc/Workspace/eva/evadb/executor/plan_executor.py", line 183, in execute_plan
raise ExecutorError(e)
evadb.executor.executor_utils.ExecutorError: cannot access local variable 'executor' where it is not associated with a value

Environment

No response

Are you willing to submit a PR?

  • Yes I'd like to help by submitting a PR!
@jiashenC
Copy link
Member Author

@xzdandy @gaurav274 Currently, other commands are case-insensitive, but those document types are still case-sensitive. Should we also make those case-insensitive?

Regardless, we should provide better error msg instead of failing inside the executor.

@xzdandy
Copy link
Collaborator

xzdandy commented Sep 18, 2023

I agree. We shall make it consistent. We can use ‘string_comparison_case_insensitive’ for string comparisons.

@jarulraj jarulraj linked a pull request Sep 19, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants