Comments (16)
The page "notion-sdk-py" was not in workspace parent in my case. It was inside a page called "Scratch". "Scratch" had many pages, but only "notion-sdk-py" was shared with integration. I could access all the subpages of "notion-sdk-py", but not itself.
Now when i moved "notion-sdk-py" page into not shared one I also getting empty results now. May be we should issue Notion support with this.
from notion-sdk-py.
From the doc
🚧 Search indexing is not immediate
If an integration performs a search quickly after a page is shared with the integration (such as immediately after a user performs OAuth), the response may not contain the page.
When an integration needs to present a user interface that depends on search results, we recommend including a Refresh button to retry the search. This will allow users to determine if the expected result is present or not, and give them a means to try again.
May be you hit that?
from notion-sdk-py.
Hi @Blucknote, I have waited for a sufficient amount of time, also cleared all cache, and retried several times. I could get all subpages, and everything within the page, but not the root page.
from notion-sdk-py.
Hi @Blucknote, I have waited for a sufficient amount of time, also cleared all cache, and retried several times. I could get all subpages, and everything within the page, but not the root page.
I'm tried to do a "raw" request and it seems working to me. You can see workspace parent of my page (root?).
May be I'll try later with SDK
curl -X POST 'https://api.notion.com/v1/search' \
-H 'Authorization: Bearer '"$NOTION_API_KEY"'' \
-H 'Content-Type: application/json' \
-H "Notion-Version: 2021-05-13" \
--data '{
"query":"a page",
"sort":{
"direction":"ascending",
"timestamp":"last_edited_time"
}
}'
{
"object": "list",
"results": [
{
"object": "page",
"id": "b092fabd-559f-44dc-b638-93050c3e50f6",
"created_time": "2021-05-20T07:15:00.000Z",
"last_edited_time": "2021-05-20T07:32:00.000Z",
"parent": {
"type": "workspace",
"workspace": true
},
"archived": false,
"properties": {
"title": {
"id": "title",
"type": "title",
"title": [
{
"type": "text",
"text": {
"content": "a page",
"link": null
},
"annotations": {
"bold": false,
"italic": false,
"strikethrough": false,
"underline": false,
"code": false,
"color": "default"
},
"plain_text": "a page",
"href": null
}
]
}
}
}
],
"next_cursor": null,
"has_more": false
}
from notion-sdk-py.
I'm tried to do a "raw" request and it seems working to me.
Have you followed the exact steps as described in the issue?
from notion-sdk-py.
Have you followed the exact steps as described in the issue?
Not yet. Will try to duplicate. Without that search with SDK is fine
from notion-sdk-py.
Have you followed the exact steps as described in the issue?
Duplicated your page and tried with SDK. Working just fine - parent workspace.
My integration name differs but I'm pretty sure it's not a problem.
from pprint import pprint
pprint(
notion.search(query="notion-sdk-py")
)
{'has_more': False,
'next_cursor': None,
'object': 'list',
'results': [{'archived': False,
'created_time': '2021-05-20T08:13:48.050Z',
'id': 'ef3910ee-e6a3-4274-b7b6-722ab00c3265',
'last_edited_time': '2021-05-20T08:16:00.000Z',
'object': 'page',
'parent': {'type': 'workspace', 'workspace': True},
'properties': {'title': {'id': 'title',
'title': [{'annotations': {'bold': False,
'code': False,
'color': 'default',
'italic': False,
'strikethrough': False,
'underline': False},
'href': None,
'plain_text': 'notion-sdk-py',
'text': {'content': 'notion-sdk-py',
'link': None},
'type': 'text'}],
'type': 'title'}}}]}
from notion-sdk-py.
I don't know what's wrong with my setup. I am still getting the same result, as I described in the issue. Did you try with a new integration? The integration must not have access to the parent page. Just share the "notion-sdk-py" page with the integration.
from notion-sdk-py.
I don't know what's wrong with my setup. I am still getting the same result, as I described in the issue. Did you try with a new integration? The integration must not have access to the parent page. Just share the "notion-sdk-py" page with the integration.
Me neither. Just created a new integration and shared just diplicated page and still working correctly.
Also i noticed there is no way to delete integrations
from notion-sdk-py.
By the way did you tried with another top level (workspace parent) page? I don't think there can be problem with certain page but still
from notion-sdk-py.
another top-level (workspace parent) page
By the word "root", I did not mean workspace parent page. I meant the page that is shared with the integration. All the subpages are automatically shared with the integration.
The page "notion-sdk-py" was not in workspace parent in my case. It was inside a page called "Scratch". "Scratch" had many pages, but only "notion-sdk-py" was shared with integration. I could access all the subpages of "notion-sdk-py", but not itself.
Now, I share my "Home" (workspace parent level) page with the integration, and the search worked perfectly fine for "Home".
I updated my original issue description.
from notion-sdk-py.
Hi @makenotion and @ramnes please look at this issue.
from notion-sdk-py.
I don't think highlighting an org is of much use. You'd have more luck on Notion devs Slack server. :P
I don't see any reason the library would cause this. What if you try with curl or any other tool?
from notion-sdk-py.
@aahnik I noticed something interesting.
Move page shared with integration into page which does not.
On this step nothing suspecious. But
When you move page on workspace level it does not shared with integration anymore
from notion-sdk-py.
I don't see any reason the library would cause this.
I also thought that. But I am now confused. Curl and notion-sdk-py are giving different results. That is surprising.
Curl is giving way more results. When I am doing a search,
curl -X POST 'https://api.notion.com/v1/search' \
-H 'Authorization: Bearer '"$NOTION_API_KEY"''
-H 'Content-Type: application/json' \
-H "Notion-Version: 2021-05-13" \
--data '{
"query":"notion-sdk-py",
}'
I am getting this (content within that page).
Using the library, I am getting nothing. (same code and result as described in issue body).
from notion-sdk-py.
Closing due to the lack of activity but if anyone still has the issue, feel free to comment and I'll reopen. :)
from notion-sdk-py.
Related Issues (20)
- Sample query doesn't work, return empty result HOT 4
- [error] AttributeError: 'str' object has no attribute 'logger' HOT 2
- How to read the `block` text?
- Type hints HOT 2
- Logging configuration does not work HOT 2
- notion_client does not work in a class under multiprocessing HOT 2
- notion.databases.create: Is it possible to rearrange database fields according to some defined order? HOT 2
- Using asyncio for notion.pages.create requests HOT 1
- httpx 0.25.x is not compatible with notion client: "TypeError: ConnectionPool.__init__() got an unexpected keyword argument 'socket_options'" HOT 4
- Image upload error when create a new notion page HOT 1
- Alternative for `DatabasesEndpoint.list()` HOT 1
- Create database entry with `select` property HOT 1
- Deleting an icon or a cover is not possible.
- Switch to Ruff HOT 1
- iterate_paginated_api and api_endpoints#query seems to be broken in 2.2.0 HOT 3
- notion.blocks.append not accessible HOT 1
- Database query malformed schema HOT 1
- Wrong response when querying database rollup field with ascending/descending sort HOT 2
- Add Type Hints to Response and Arguments of a function HOT 1
- Allow to set the in_trash property of a page using notion.pages.update() HOT 1
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-sdk-py.