Note-Station-to-markdown
Note-Station-to-markdown copied to clipboard
OSError: [Errno 63] File name too long
Hi,
I got this OSError: [Errno 63] File name too long on MacOS for a file named /media/b9e5d7dfb4f4315b201e813e77057476_1_2_3_4_5_6_7_8_9_10_11_12_13_14_15_16_17_18_19_20_21_22_23_24_25_26_27_28_29_30_31_32_33_34_35_36_37_38_39_40_41_42_43_44_45_46_47_48_49_50_51_52_53_54_55_56_57_58_59_60_61_62_63_64_65_66_67_68_69_70_71_72_73_74_75_76.jpeg
Anything possible to at least skip this then? Or better rename it somehow?
Could you post the full text of an error. Looks like an easy fix.
Great, thanks!
Here's the traceback:
Traceback (most recent call last):
File "/Users/data/nsx2md.py", line 232, in <module>
while Path(parent_notebook.media_path / name).is_file():
File "/opt/homebrew/Cellar/[email protected]/3.10.8/Frameworks/Python.framework/Versions/3.10/lib/python3.10/pathlib.py", line 1322, in is_file
return S_ISREG(self.stat().st_mode)
File "/opt/homebrew/Cellar/[email protected]/3.10.8/Frameworks/Python.framework/Versions/3.10/lib/python3.10/pathlib.py", line 1097, in stat
return self._accessor.stat(self, follow_symlinks=follow_symlinks)
OSError: [Errno 63] File name too long: '/media/b9e5d7dfb4f4315b201e813e77057476_1_2_3_4_5_6_7_8_9_10_11_12_13_14_15_16_17_18_19_20_21_22_23_24_25_26_27_28_29_30_31_32_33_34_35_36_37_38_39_40_41_42_43_44_45_46_47_48_49_50_51_52_53_54_55_56_57_58_59_60_61_62_63_64_65_66_67_68_69_70_71_72_73_74_75_76.jpeg'
I've updated the script. Please, try the new version.
Hi @Maboroshy thanks for looking into this. Still getting that error:
Traceback (most recent call last):
File "/Users/data/nsx2md.py", line 232, in <module>
while Path(parent_notebook.media_path / name).is_file():
File "/opt/homebrew/Cellar/[email protected]/3.10.8/Frameworks/Python.framework/Versions/3.10/lib/python3.10/pathlib.py", line 1322, in is_file
return S_ISREG(self.stat().st_mode)
File "/opt/homebrew/Cellar/[email protected]/3.10.8/Frameworks/Python.framework/Versions/3.10/lib/python3.10/pathlib.py", line 1097, in stat
return self._accessor.stat(self, follow_symlinks=follow_symlinks)
OSError: [Errno 63] File name too long: '/Users/data/media/b9e5d7dfb4f4315b201e813e77057476_1_2_3_4_5_6_7_8_9_10_11_12_13_14_15_16_17_18_19_20_21_22_23_24_25_26_27_28_29_30_31_32_33_34_35_36_37_38_39_40_41_42_43_44_45_46_47_48_49_50_51_52_53_54_55_56_57_58_59_60_61_62_63_64_65_66_67_68_69_70_71_72_73_74_75_76.jpeg'
From what I see, it's still exactly the same. I saw you reduced the name length, but for some reason this seems to not work in that case.
Over at reddit I found some snippet, but my PyKnowledge isn't ready for estimating whether that's useful.
Interesting. I'll look into this.
Fixed error in media files naming that caused the issue.