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

Using --rename-notion-key-column, when the input value is identical to --payload-key-column, tool errors out #35

Closed
IAmVigneswaran opened this issue May 17, 2024 · 0 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@IAmVigneswaran
Copy link
Contributor

@arjunprakash027 A bug / error occurs when --rename-notion-key-column's input is identical to --rename-notion-key-column.

Example (Correct Way) :

--payload-key-column "Marker ID" --rename-notion-key-column "Marker ID" "NOT SAME ID"

When user tries this -

--payload-key-column "Marker ID" --rename-notion-key-column "Marker ID" "Marker ID"

We get -

ERROR: Error at division                                                                                                     
Traceback (most recent call last):
  File "csv2notion_neo/cli.py", line 58, in cli
  File "csv2notion_neo/cli_steps.py", line 79, in upload_rows
  File "tqdm/std.py", line 1181, in __iter__
  File "csv2notion_neo/utils_threading.py", line 38, in process_iter
  File "csv2notion_neo/utils_threading.py", line 38, in <genexpr>
  File "concurrent/futures/_base.py", line 437, in result
  File "concurrent/futures/_base.py", line 389, in __get_result
  File "concurrent/futures/thread.py", line 57, in run
  File "csv2notion_neo/utils_threading.py", line 26, in worker
  File "csv2notion_neo/notion_uploader.py", line 29, in upload_row
  File "csv2notion_neo/notion_uploader.py", line 40, in _get_db_row
  File "csv2notion_neo/notion_uploader.py", line 17, in key
KeyError: 'Marker ID'

I think we need to make the error message a little more friendlier.

Something like - Rename key column is identical to payload key column.

@IAmVigneswaran IAmVigneswaran added the bug Something isn't working label May 17, 2024
@IAmVigneswaran IAmVigneswaran added this to the 1.2.6 milestone May 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants