Open byndstd opened 3 years ago
anyone can help please?
Try give us more information, which errors occours? Post some logs and etc. Maybe so more people can help you.
Try give us more information, which errors occours? Post some logs and etc. Maybe so more people can help you.
this the error
lotfi@Lenovo:~/dprojects/pyt$ python3 auto_notion_read.py
Traceback (most recent call last):
File "auto_notion_read.py", line 19, in <module>
collection_read = client.get_collection_rows(list_url_read)
AttributeError: 'NotionClient' object has no attribute 'get_collection_rows'
@byndstd your line comment out is different from the error
### collection_read = client.collection.collection_view(list_url_read)
Anyway the method get_collection_rows
its from client._store
its not public acess, you can check that copy and paste the name in search box of git repository.
And check the documentation in the start page looking for that method.
Its probaly what you want
cv = client.get_collection_view("https://www.notion.so/myorg/8511b9fc522249f79b90768b832599cc?v=8dee2a54f6b64cb296c83328adba78e1")
# List all the records with "Bob" in them
for row in cv.collection.get_rows(search="Bob"):
Check that and hope it can help you
@byndstd your line comment out is different from the error
### collection_read = client.collection.collection_view(list_url_read)
Anyway the method
get_collection_rows
its fromclient._store
its not public acess, you can check that copy and paste the name in search box of git repository.And check the documentation in the start page looking for that method.
Its probaly what you want
cv = client.get_collection_view("https://www.notion.so/myorg/8511b9fc522249f79b90768b832599cc?v=8dee2a54f6b64cb296c83328adba78e1") # List all the records with "Bob" in them for row in cv.collection.get_rows(search="Bob"):
Check that and hope it can help you
I didn't work I post the code and error
from notion.client import NotionClient
import time
# Log in
token_v2 = "tocken_2"
client = NotionClient(token_v2 = token_v2)
# Connection to the page
## The page to read
list_url_read = 'url_page_read'
collection_read = client.get_collection_view(list_url_read)
for row in collection_read.collection.get_rows(search="Bob"):
print("We estimate the value of '{}' at {}".format(row.name, row.estimated_value))
## The page to post
list_url_post = 'url_page_to_post'
collection_post = client.get_collection_view(list_url_post)
The error is
lotfi@Lenovo:~/dprojects/pyt$ python3 auto_notion_read.py
Traceback (most recent call last):
File "auto_notion_read.py", line 16, in <module>
collection_read = client.get_collection_view(list_url_read)
File "/home/lotfi/.local/lib/python3.6/site-packages/notion/client.py", line 214, in get_collection_view
raise Exception("Invalid collection view URL")
Exception: Invalid collection view URL
lotfi@Lenovo:~/dprojects/pyt$
I'm trying to get a notion page block using notion.py but I didn't succeed my code is
The page one that I want to get it's block value is : https://i.stack.imgur.com/LFqM0.png
~/dprojects/pyt$ python3 auto_notion_read.py