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

raise HTTPError( requests.exceptions.HTTPError: Invalid input. #66

Closed
ShuibCodes opened this issue Oct 26, 2021 · 9 comments
Closed

raise HTTPError( requests.exceptions.HTTPError: Invalid input. #66

ShuibCodes opened this issue Oct 26, 2021 · 9 comments

Comments

@ShuibCodes
Copy link

I tried running the script and i get that error

@zaan
Copy link

zaan commented Nov 3, 2021

I had the same issue. Running on Mac OS Big Sur, MacBook Pro M1, Python 3.10. Traceback:


Traceback (most recent call last):
  File "/usr/local/bin/kindle2notion", line 8, in <module>
    sys.exit(main())
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/click/core.py", line 1134, in __call__
    return self.main(*args, **kwargs)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/click/core.py", line 1059, in main
    rv = self.invoke(ctx)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/click/core.py", line 1401, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/click/core.py", line 767, in invoke
    return __callback(*args, **kwargs)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/kindle2notion/__main__.py", line 26, in main
    export_to_notion(books, enable_highlight_date, enable_book_cover, notion_token, notion_table_id)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/kindle2notion/exporting.py", line 29, in export_to_notion
    message = _add_book_to_notion(title, author, highlight_count, aggregated_text_from_highlights, last_date,
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/kindle2notion/exporting.py", line 60, in _add_book_to_notion
    notion_collection_view_rows = notion_collection_view.collection.get_rows()
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/notion/collection.py", line 180, in get_rows
    return self.query(**kwargs)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/notion/collection.py", line 177, in query
    return CollectionQuery(self, self._get_a_collection_view(), **kwargs).execute()
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/notion/collection.py", line 322, in execute
    self._client.query_collection(
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/notion/client.py", line 243, in query_collection
    return self._store.call_query_collection(*args, **kwargs)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/notion/store.py", line 338, in call_query_collection
    response = self._client.post("queryCollection", data).json()
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/notion/client.py", line 209, in post
    raise HTTPError(
requests.exceptions.HTTPError: Invalid input.

@vin1391
Copy link

vin1391 commented Nov 30, 2021

Same problem for me as well.
OS: Windows 10

File "C:\Users\Vinlite\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\notion\collection.py", line 385, in execute
self._client.query_collection(
File "C:\Users\Vinlite\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\notion\client.py", line 294, in query_collection
return self._store.call_query_collection(*args, **kwargs)
File "C:\Users\Vinlite\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\notion\store.py", line 344, in call_query_collection
response = self._client.post("queryCollection", data).json()
File "C:\Users\Vinlite\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\notion\client.py", line 260, in post
raise HTTPError(
requests.exceptions.HTTPError: Invalid input.

@ttuan
Copy link

ttuan commented Dec 23, 2021

I fixed with this temporary solution: #63 (comment)

I have the same problem. Fixed it with this command:
pip install git+https://github.com/jamalex/notion-py.git@refs/pull/352/merge
and rerun python -m kindle2notion 'notion_token' 'notion_table_id' 'clipping_file_path'

Reference: jamalex/notion-py#352 (comment)

@benooirj
Copy link

benooirj commented Dec 24, 2021

I fixed with this temporary solution: #63 (comment)

I have the same problem. Fixed it with this command:

pip install git+https://github.com/jamalex/notion-py.git@refs/pull/352/merge
and rerun python -m kindle2notion 'notion_token' 'notion_table_id' 'clipping_file_path'

Reference: jamalex/notion-py#352 (comment)

I tried this but got this error instead:
ERROR: Command errored out with exit status 1:
command: git version
cwd: None
Complete output (2 lines):
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun

WARNING: Discarding git+https://github.com/jamalex/notion-py.git@refs/pull/352/merge. Command errored out with exit status 1: git version Check the logs for full command output.
ERROR: Command errored out with exit status 1: git version Check the logs for full command output.

What should I do?

@ttuan
Copy link

ttuan commented Dec 25, 2021

@benooirj Maybe your xcode commandline tools needs to be updated.

You could try this command: xcode-select --install
https://stackoverflow.com/a/52522566/4381022

@damouzo
Copy link

damouzo commented Dec 27, 2021

Nice tool! Same error from here (Windows 10), I tried the temporary solution but give the same error after the next warning:

I fixed with this temporary solution: #63 (comment)

I have the same problem. Fixed it with this command:
pip install git+https://github.com/jamalex/notion-py.git@refs/pull/352/merge
and rerun python -m kindle2notion 'notion_token' 'notion_table_id' 'clipping_file_path'

Reference: jamalex/notion-py#352 (comment)

C:\Windows\system32>pip install git+https://github.com/jamalex/notion-py.git@refs/pull/352/merge
Collecting git+https://github.com/jamalex/notion-py.git@refs/pull/352/merge
Cloning https://github.com/jamalex/notion-py.git (to revision refs/pull/352/merge) to c:\users\danie\appdata\local\temp\pip-req-build-8_bv7o4t
Running command git clone --filter=blob:none -q https://github.com/jamalex/notion-py.git 'C:\Users\danie\AppData\Local\Temp\pip-req-build-8_bv7o4t'
WARNING: Did not find branch or tag 'refs/pull/352/merge', assuming revision or ref.
Running command git fetch -q https://github.com/jamalex/notion-py.git refs/pull/352/merge
Running command git checkout -q 017de43af765e232f6ba4403c5fa3513e614c955
Resolved https://github.com/jamalex/notion-py.git to commit 017de43af765e232f6ba4403c5fa3513e614c955
Preparing metadata (setup.py) ... done

@WintermuteTwin
Copy link

Same error here and the temp fix didn't resolve it. Mac OS Big Sur, MacBook Pro M1, Python 3.93

@Rukenshia
Copy link

Nice tool! Same error from here (Windows 10), I tried the temporary solution but give the same error after the next warning:

I fixed with this temporary solution: #63 (comment)

I have the same problem. Fixed it with this command:
pip install git+https://github.com/jamalex/notion-py.git@refs/pull/352/merge
and rerun python -m kindle2notion 'notion_token' 'notion_table_id' 'clipping_file_path'

Reference: jamalex/notion-py#352 (comment)

C:\Windows\system32>pip install git+jamalex/notion-py.git@refs#352 (merge) Collecting git+jamalex/notion-py.git@refs#352 (merge) Cloning jamalex/notion-py.git (to revision refs/pull/352/merge) to c:\users\danie\appdata\local\temp\pip-req-build-8_bv7o4t Running command git clone --filter=blob:none -q jamalex/notion-py.git 'C:\Users\danie\AppData\Local\Temp\pip-req-build-8_bv7o4t' WARNING: Did not find branch or tag 'refs/pull/352/merge', assuming revision or ref. Running command git fetch -q jamalex/notion-py.git refs/pull/352/merge Running command git checkout -q 017de43af765e232f6ba4403c5fa3513e614c955 Resolved jamalex/notion-py.git to commit 017de43af765e232f6ba4403c5fa3513e614c955 Preparing metadata (setup.py) ... done

Got it working by directly installing the fork (instead of the ref to the PR):

# in a pipenv (in my case)

pip install kindle2notion
pip install git+https://github.com/wsykala/notion-py.git
python -m kindle2notion .....

@paperboi
Copy link
Owner

Hi, just got around to this- please update to the latest version (1.0.0) and try again. The setup is a little different too so please go through the README file and docs. Latest solution does away with notion-py and the code is built upon the official API (python wrapper is notional which is based on notion-sdk-py.

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

No branches or pull requests

9 participants