Comments (3)
Yeah, I have the same.
from notion-py.
Looks like a change in notion.so API, will see into it
from notion-py.
yup, they added new key __json__
to recordMap
(huge dict with state of basically everything). What's funny is that this key is empty, so I don't know why they did it. Anyway, it's simple enough to fix, will send patch shortly.
In the meantime you can fix by hand it like so:
diff --git a/notion/store.py b/notion/store.py
index 08aa37d..1de6a1a 100644
--- a/notion/store.py
+++ b/notion/store.py
@@ -294,6 +294,8 @@ class RecordStore:
def store_record_map(self, data: dict) -> dict:
data = data["recordMap"]
+ data.pop('__json__')
+
for table, records in data.items():
for record_id, record in records.items():
self._update_record(
Details of API change:
(note to self: I should probably track this way more closely)
Before:
(Pdb) data['recordMap'].keys()
dict_keys(['notion_user', 'user_root', 'user_settings', 'space_view', 'space', 'block', 'collection'])
After:
(Pdb) data['recordMap'].keys()
dict_keys(['notion_user', 'user_root', 'user_settings', 'space_view', 'space', 'block', 'collection', '__json__'])
from notion-py.
Related Issues (20)
- Readme on PyPI is not up to date HOT 1
- Fix source in FileBlock
- Add Webclipper functionality
- Add Discussion Functionality
- Add Comments Functionality
- Add NotionReminder
- Public Announcements / Discussion Thread HOT 8
- Collection view not functioning as documented; not returning rows HOT 3
- Replace dep on beautifulsoup4 with stdlib solution
- Get Collection View returning none HOT 2
- Fix failing smoke test on search_blocks() HOT 1
- PR this fork to original repo HOT 2
- get_property() bug HOT 5
- “Invalid Input” error calling a collection. HOT 1
- How to set an icon when creating a new row? HOT 1
- Invalid Input error on getting collection
- Unable to create a new row in notion database HOT 2
- notion.client.NotionValidationError: Something went wrong. (400) HOT 1
- How can I add a TextBlock with a mention to `@today` or `@now`?
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.