visualcurrent / Notion-2-Obsidan

Conversion routines to convert all Notion .md exports to full Obsidian compatibility
262 stars 47 forks source link

FileNotFoundError with long Cyrilic (potentially ASCII, too) filenames #27

Open sithamet opened 2 years ago

sithamet commented 2 years ago

It appears that N2O throws FileNotFound when any of the files has a very long name (no specific limit found for now).

It leads to the situation where it's practically impossible to migrate large workspaces

Will update the issue as I'll be manually moving Notion export to N2O-acceptabke way

The error looks as follows

Traceback (most recent call last):
  File "C:\Users\vlasi\Desktop\N2O test\Notion-2-Obsidan-master\N2O.py", line 132, in <module>
    with open(newfilepath, append_write, encoding='utf-8') as tempFile:
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\vlasi\\AppData\\Local\\Temp\\tmpyfr6_amn\\ZettelKasten\\Сюжетная идея для игры долго борются с большим и сложным противником, а потом вдруг противник повержен, и нет четкого врага. В этот момент, предложить много ситуаций, где много насилия и использования всей накопленной силы по инерции обернется плохими последствиями.md'
PS C:\Users\vlasi\Desktop\N2O test\Notion-2-Obsidan-master>
jasonagriffis commented 2 years ago

I'm receiving this error as well: Traceback (most recent call last): File "C:\Users\TronD\Documents\Notion-2-Obsidan\N2O.py", line 132, in with open(newfilepath, append_write, encoding='utf-8') as tempFile: FileNotFoundError: [Errno 2] No such file or directory: 'C:\Users\TronD\AppData\Local\Temp\tmp4r1ntapq\Hack The B 42c11\Research b4644\Getting St eba7c\Navigating ea941\Untitled D f9bd8\Simulates a fully-upgraded and up-to-date Active Directory network environment, which is hardened against attacks. It is aimed at experienced penetration testers and Red Teamers..md'