Comments (8)
I am getting the exact same issue. All I did was replace the values for token_v2 and the page url with my own exactly as shown in readme.
from notion.client import NotionClient
notion_token_from_header = 'the v2token'
notion_page = 'https://www.notion.so/___/___'
client = NotionClient(token_v2=notion_token_from_header)
print(client) # this part is working
page = client.get_block(notion_page) # this gives error
The error msg:
Traceback (most recent call last):
File "/Users/emin/Development/for_pamela/notion/script.py", line 75, in <module>
page = client.get_block(url)
File "/Users/emin/Development/for_pamela/notion/virtualenv/lib/python3.10/site-packages/notion/client.py", line 169, in get_block
block = self.get_record_data("block", block_id, force_refresh=force_refresh)
File "/Users/emin/Development/for_pamela/notion/virtualenv/lib/python3.10/site-packages/notion/client.py", line 162, in get_record_data
return self._store.get(table, id, force_refresh=force_refresh)
File "/Users/emin/Development/for_pamela/notion/virtualenv/lib/python3.10/site-packages/notion/store.py", line 184, in get
self.call_load_page_chunk(id)
File "/Users/emin/Development/for_pamela/notion/virtualenv/lib/python3.10/site-packages/notion/store.py", line 286, in call_load_page_chunk
recordmap = self._client.post("loadPageChunk", data).json()["recordMap"]
File "/Users/emin/Development/for_pamela/notion/virtualenv/lib/python3.10/site-packages/notion/client.py", line 260, in post
raise HTTPError(
requests.exceptions.HTTPError: Invalid input.
I've ensured that I'm logged in my browser, using token_v2
request cookie from loading the intended page request, and the permissions on the page are private.
Can you address this? Otherwise such a waste of a beautiful sdk.
from notion-py.
I am getting the exact same issue. All I did was replace the values for token_v2 and the page url with my own exactly as shown in readme.
I highly doubt that it's a proxy problem, since we all come from mainland, china. This issue can not be solved by using vpn, it can only be solved by setting proxy server into parameters of certain functions.
from notion-py.
Also getting the same issues :(
from notion-py.
Is it possible this issue is fixed in this fork? https://github.com/vzhd1701/notion-py
from notion-py.
I had the same issue and solved it.
The cause was in the cookie value (token_v2).
I cleared the cookie value in the web browser and refreshed the browser.
After that, I proceeded based on the newly received cookie value, and it worked normally.
from notion-py.
I have already switched to notion-sdk-py and notional. They are both very active repositories.
from notion-py.
vpn is not the issue, I am currently US still not working
from notion-py.
Hi all,
the issue is solved by https://github.com/vzhd1701/notion-py as stated by @egeres . Thanks
The problem is that the 0.0.36 is not updated to pip, thus directly using pip cannot install the newest version.
My approach is to download from GitHub the source code from https://github.com/vzhd1701/notion-py
and install through
pip install .
from notion-py.
Related Issues (20)
- HTTPERROR using children.add_new
- collection.add_row() fails on new databases HOT 2
- How to set database column calculation?
- Not documented: how to set the size of an image HOT 1
- > this is a pretty paralyzing issue. does anyone know how long it will take for it to get merged in? HOT 1
- Uploading image doesn't work HOT 2
- Need to cut a new release
- Notion crashes when setting CollectionView filter with no id HOT 2
- Is this module still work now? I got an error, outdated? HOT 1
- Failed To Run "setup.py" Due To Encoding Error
- Unsaved transactions: SpaceShardRecordPointer have no space id HOT 1
- raise InvalidNotionIdentifier(input_value)
- Help!!! requests.exceptions.HTTPError: Invalid input. HOT 4
- TypeError: Retry.__init__() got an unexpected keyword argument 'method_whitelist' HOT 3
- Client POST generates a HTTPError HOT 1
- (question) is there `get_all_comments`? HOT 1
- notion_client.errors.RequestTimeoutError: Request to Notion API has timed out
- HTTPError (400) when trying to load a database despite trying proposed solutions HOT 3
- Search (and find best matching page titles)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from notion-py.