Skip to content

Notion sync fails when the page uses a "synced block" #488

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

Open
teddysupercuts opened this issue Apr 23, 2025 · 3 comments · May be fixed by #508
Open

Notion sync fails when the page uses a "synced block" #488

teddysupercuts opened this issue Apr 23, 2025 · 3 comments · May be fixed by #508
Assignees

Comments

@teddysupercuts
Copy link
Contributor

teddysupercuts commented Apr 23, 2025

2025-04-22 23:59:37,350 MainProcess DEBUG    => {'start_cursor': '5ef52d39-4033-40c2-9e5b-995fd2077181'} -- None
< DELETED THE ACTUAL OBJECT FOR PRIVACY>
93b6d326e197437b9e2e0c51fa6ef16a: "failed to map to associated block type -> synced_block: {'synced_from': None}"
2025-04-22 23:59:38,856 MainProcess INFO     download finished in 2.608050956s, attributes: file_id=9e6bb569e5e4
2025-04-22 23:59:38,856 MainProcess ERROR    Exception raised while running download
Traceback (most recent call last):
  File "/venv/lib/python3.11/site-packages/unstructured_ingest/pipeline/interfaces.py", line 171, in run_async
    return await self._run_async(fn=fn, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/venv/lib/python3.11/site-packages/unstructured_ingest/pipeline/steps/download.py", line 113, in _run_async
    return self.create_step_results(
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/venv/lib/python3.11/site-packages/unstructured_ingest/pipeline/steps/download.py", line 129, in create_step_results
    download_path = download_results["path"]
                    ~~~~~~~~~~~~~~~~^^^^^^^^
TypeError: 'NoneType' object is not subscriptable
2025-04-22 23:59:38,857 MainProcess INFO     download step finished in 2.610142597s
2025-04-22 23:59:38,858 MainProcess INFO     ingest process finished in 5.0995602s
2025-04-22 23:59:38,858 MainProcess ERROR    1 failed documents:
2025-04-22 23:59:38,858 MainProcess ERROR    /root/.cache/unstructured/ingest/pipeline/process_431/indexer/9e6bb569e5e4.json: [download] 'NoneType' object is not subscriptable
2025-04-22 23:59:38,858 MainProcess INFO     deleting cache directory: /root/.cache/unstructured/ingest/pipeline/process_431
Error during Notion download: Pipeline did not run successfully

Steps to reproduce:

  1. Create a Notion page
  2. Add a new block of type 'Synced Block'
  3. Try to Sync the page using the Notion connector
Image
@mateuszkuprowski mateuszkuprowski self-assigned this May 12, 2025
@mateuszkuprowski
Copy link
Contributor

Did you start any work on this already by any chance @teddysupercuts ? If not I'll be looking into it.

@teddysupercuts
Copy link
Contributor Author

@mateuszkuprowski yes, I already have a fix for this in my fork. I will put up a PR later today.

@teddysupercuts
Copy link
Contributor Author

teddysupercuts commented May 13, 2025

@mateuszkuprowski here is my fix:

#508

Feel free to merge this PR into a PR of your own, so I get still get credit and so you can get tests running properly.

Feel free to remove my comments if they are too wordy. I just wanted to give a lot of clarity on the difference between parent and child synced blocks

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

Successfully merging a pull request may close this issue.

2 participants