Skip to content

ValueError: Cannot convert None to Decimal error when passing table_settings #539

Answered by samkit-jain
yoavxyoav asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @yoavxyoav The reason you are seeing this behaviour is because of a bug. The issue is happening because of the None value in the fields text_x_tolerance, text_y_tolerance, intersection_x_tolerance and intersection_y_tolerance.

TLDR - If you want to use the default values, don't pass them instead of setting None. For example,

table_settings = {
    "vertical_strategy": "lines", 
    "horizontal_strategy": "lines",
    "explicit_vertical_lines": [],
    "explicit_horizontal_lines": [],
    "snap_tolerance": 3,
    "join_tolerance": 3,
    "edge_min_length": 3,
    "min_words_vertical": 3,
    "min_words_horizontal": 1,
    "keep_blank_chars": False,
    "text_tolerance": 3,
    "intersec…

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
1 reply
@yoavxyoav
Comment options

Comment options

You must be logged in to vote
2 replies
@samkit-jain
Comment options

@yoavxyoav
Comment options

Answer selected by samkit-jain
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants