KeyError: 'note' when Importing from Obsidian #4852
-
Hello, i've been an Obsidian User for a long time and wanted to try Trilium. I have both the server part via Docker and the local GUI on my Linux Desktop. I was quite surprised to see that i have to write some python code to import from Obsidian? I assume i did the obsidian-export part correct and have the whole Vault exported in an /out folder. I then wrote this importer.py file that contains:
I installed trilium-py inside a python venv and running this importer.py throws me this error:
I can't find anything for that and chatGPT isn't helpful :D May i ask why we have to write codesnippets ourselves when everything is already written out? Why isn't there just an "Import" Menu in the Application for that? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 4 replies
-
To be honest, I'm not sure what kind of export format Obsidian has, but in Trilium, you can import by right-clicking on any node in the note tree and choosing import. Then you can change the import options. Trilium should port any HTML or markdown relatively well unless there are proprietary formattings or stylings which are non-standard. If you've tried the import feature and it still does not work well with obsidian exports, please let us know so we can make this process easier. |
Beta Was this translation helpful? Give feedback.
-
I have hundreds of notes in my Obsidian vaults. This would take ages to manually import them all hand by hand in the correct structure. I tried importing multiple notes at once but the images aren't imported with it. I found this trilium-py module that talks about me being able to use obsidian-export to convert them all so trilium-py would be able to import them all and take care of the images. So i would assume the obsidian-export format should be supported? Nonetheless the error i get doesn't come from the obisidan export format, but rather from trilium-py itself i assume. You see that's the part that could be done easier i assume. Maybe create some migration process? For example how a browser might ask to import everything from your old browser to properly onboard you. It seems like you already have all the tools, infos and code written out to import everything from obsidian, so maybe you could bundle that all into one menu in the settings? I know just enough about python to know how to copy & paste some lines, how to name the script and work with venv's. But i don't know how to properly troubleshoot. Many people are using Obsidian and search for a good open source alternative. And trilium seems like the absolutely perfect replacement. But if it's impossible to simply import everything in one go, people will not do that. To be honest if i can't get this migration to work, i cannot use trilium... and that is sad 😄 i really like the look and feel of it and i love that it's open source. But i will not import hundreds of notes with complex folder trees by hand. |
Beta Was this translation helpful? Give feedback.
-
Alright, i was now able to zip the /out folder and import it into the root. That worked now. Maybe you guys should make some little info about this somewhere? This whole trilium-py thing really threw me off the rails |
Beta Was this translation helpful? Give feedback.
Alright, i was now able to zip the /out folder and import it into the root.
That worked now. Maybe you guys should make some little info about this somewhere? This whole trilium-py thing really threw me off the rails