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
Used the read_pdf function with columns parameter being a tuple.
Problem arises because of this line 238 in util.py:
if self.columns != sorted(self.columns):
It should presumably say:
if list(self.columns) != sorted(self.columns):
Code
importtabula# Read pdf into list of DataFramedfs=tabula.read_pdf("test.pdf",
stream=True,
area= (145.39, 26.05, 584.21, 584.02),
columns= (26.05, 142.55, 175.47, 215.61, 252.32, 385.59, 487.44, 583.15),
pages='all')
Expected behavior
function executes successfully.
Actual behavior
Relevant part of Traceback
File "/Users/russ/project/venv/lib/python3.12/site-packages/tabula/util.py", line 239, in build_option_list
raise ValueError("columns option should be sorted")
ValueError: columns option should be sorted
Related issues
No response
The text was updated successfully, but these errors were encountered:
Summary
Docs say columns parameter can be iterable, but code requires it to be list.
Did you read the FAQ?
Did you search GitHub issues?
Did you search GitHub Discussions?
(Optional) PDF URL
No response
About your environment
What did you do when you faced the problem?
Used the read_pdf function with columns parameter being a tuple.
Problem arises because of this line 238 in
util.py
:It should presumably say:
Code
Expected behavior
function executes successfully.
Actual behavior
Relevant part of Traceback
Related issues
No response
The text was updated successfully, but these errors were encountered: