Cobertos / notion_export_enhancer

Export and _enhance_, takes Notion's export and makes it just a bit more usable
MIT License
26 stars 5 forks source link

AttributeError: 'Space' object has no attribute 'parent' #1

Closed KGBicheno closed 3 years ago

KGBicheno commented 3 years ago

Hi Cobertos :+1:

I've just run notion_export_enhancer on a fresh export of my main Notion workbook, and it generated the following traceback.

I'm running Ubuntu 20.04.2 Linux 5.8.0-45-generic #51~20.04.1-Ubuntu SMP with Python version 3.8.5 and pip version 21.0.1

Extracting '/home/websinthe/code/notion/notion_export_enhancer/Export-82997127-932e-4a3c-8d28-ef7e7ba06d76.zip' temporarily...
Traceback (most recent call last):
  File "/home/websinthe/anaconda3/lib/python3.8/runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/home/websinthe/anaconda3/lib/python3.8/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/home/websinthe/code/notion/notion_export_enhancer/notion_export_enhancer/__main__.py", line 5, in <module>
    cli(sys.argv[1:])
  File "/home/websinthe/code/notion/notion_export_enhancer/notion_export_enhancer/enhancer.py", line 270, in cli
    rewriteNotionZip(nCl, args.zip_path, outputPath=args.output_path, removeTopH1=args.remove_title, rewritePaths=args.rewrite_paths)
  File "/home/websinthe/code/notion/notion_export_enhancer/notion_export_enhancer/enhancer.py", line 237, in rewriteNotionZip
    newPath, createdTime, lastEditedTime = renamer.renamePathAndTimesWithNotion(relPath)
  File "/home/websinthe/code/notion/notion_export_enhancer/notion_export_enhancer/enhancer.py", line 142, in renamePathAndTimesWithNotion
    newName, createdTime, lastEditedTime = self.renameAndTimesWithNotion(pathToRename)
  File "/home/websinthe/code/notion/notion_export_enhancer/notion_export_enhancer/enhancer.py", line 88, in renameAndTimesWithNotion
    newNameNoExt, createdTime, lastEditedTime = noteNameRewrite(self.notionClient, nameNoExt)
  File "/home/websinthe/code/notion/notion_export_enhancer/notion_export_enhancer/enhancer.py", line 36, in noteNameRewrite
    pageBlock = pageBlock.parent
AttributeError: 'Space' object has no attribute 'parent'
thomas-ricci commented 3 years ago

+1 here. I'm getting the same error on macOS 10.15.7 with Python 3.7.4. Such a promising library that would help me migrate a huge amount of data. A fix would be amazing.

Cobertos commented 3 years ago

Ill give it a look the next chance I get. Just put back together a lot of life things so hopefully have a stable foundation to fix the features necessary

On Mon, May 31, 2021, 8:02 AM thomas ricciardiello @.***> wrote:

+1 here. I'm getting the same error on macOS 10.15.7 with Python 3.7.4. Such a promising library that would help me migrate a huge amount of data. A fix would be amazing.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/Cobertos/notion_export_enhancer/issues/1#issuecomment-851442474, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABTSGCA2PB5OYRMFSA3CQBDTQN3FBANCNFSM4ZRB4WCQ .

Cobertos commented 3 years ago

This should be fixed, or at least has prints some better information now. Let me know if you get a chance to look at it.

thomas-ricci commented 3 years ago

Just got around to trying this now, and the issue is fixed for me! Holy moly thank you so much for creating this tool!! Absolute life saver

Cobertos commented 3 years ago

Sweet! If there's any other issues, feel free to open another issue