Error "File name too long"
Closed this issue · 3 comments
RoelN commented
➤ python3 fonts2svg.py -c 2a3f6f,ff4c47,fcfbfa fonts/layer1.otf fonts/layer2.otf fonts/layer3.otf
Traceback (most recent call last):
File "fonts2svg.py", line 304, in <module>
sys.exit(main())
File "fonts2svg.py", line 300, in main
processFonts(font_paths_list, hex_colors_list, output_folder_path, opts)
File "fonts2svg.py", line 187, in processFonts
write_file(svgFilePath, svgStr)
File "/Users/roel/code/opentype-svg/util/shared_utils.py", line 23, in write_file
with open(file_path, "w") as f:
OSError: [Errno 63] File name too long: '/Users/roel/code/opentype-svg/fonts/SVGs/_moreSVGs_/_moreSVGs_/_moreSVGs_/_moreSVGs_/_moreSVGs_/_moreSVGs_/_moreSVGs_/_moreSVGs_/_moreSVGs_/_moreSVGs_/_moreSVGs_/_moreSVGs_/_moreSVGs_/_moreSVGs_/_moreSVGs_/_moreSVGs_/_moreSVGs_/_moreSVGs_/_moreSVGs_/_moreSVGs_/_moreSVGs_/_moreSVGs_/_moreSVGs_/_moreSVGs_/_moreSVGs_/_moreSVGs_/_moreSVGs_/_moreSVGs_/_moreSVGs_/_moreSVGs_/_moreSVGs_/_moreSVGs_/_moreSVGs_/_moreSVGs_/_moreSVGs_/_moreSVGs_/_moreSVGs_/_moreSVGs_/_moreSVGs_/_moreSVGs_/_moreSVGs_/_moreSVGs_/_moreSVGs_/_moreSVGs_/_moreSVGs_/_moreSVGs_/_moreSVGs_/_moreSVGs_/_moreSVGs_/_moreSVGs_/_moreSVGs_/_moreSVGs_/_moreSVGs_/_moreSVGs_/_moreSVGs_/_moreSVGs_/_moreSVGs_/_moreSVGs_/_moreSVGs_/_moreSVGs_/_moreSVGs_/_moreSVGs_/_moreSVGs_/_moreSVGs_/_moreSVGs_/_moreSVGs_/_moreSVGs_/_moreSVGs_/_moreSVGs_/_moreSVGs_/_moreSVGs_/_moreSVGs_/_moreSVGs_/_moreSVGs_/_moreSVGs_/_moreSVGs_/_moreSVGs_/_moreSVGs_/_moreSVGs_/_moreSVGs_/_moreSVGs_/_moreSVGs_/_moreSVGs_/_moreSVGs_/_moreSVGs_/_moreSVGs_/_moreSVGs_/_moreSVGs_/_moreSVGs_/sacute.svg'
Happens on the current master, using Python 3. The font has quite a large character set, maybe that's a cause?
First directory has the most files:
➤ ls
A.calt.svg D.svg Gcircumflex.calt.svg Jcircumflex.svg Ocircumflex.calt.svg Scircumflex.calt.svg W.svg
A.svg Dcaron.calt.svg Gcircumflex.svg K.calt.svg Ocircumflex.svg Scircumflex.svg Wacute.calt.svg
AE.calt.svg Dcaron.svg Gcommaaccent.calt.svg K.svg Odieresis.calt.svg Scommaaccent.calt.svg Wacute.svg
AE.svg Dcroat.calt.svg Gcommaaccent.svg Kcommaaccent.calt.svg Odieresis.svg Scommaaccent.svg Wcircumflex.calt.svg
Aacute.calt.svg Dcroat.svg Gdotaccent.calt.svg Kcommaaccent.svg Ograve.calt.svg T.calt.svg Wcircumflex.svg
Aacute.svg E.alt.svg Gdotaccent.svg L.calt.svg Ograve.svg T.svg Wdieresis.calt.svg
Abreve.calt.svg E.calt.svg H.calt.svg L.svg Ohungarumlaut.calt.svg Tbar.calt.svg Wdieresis.svg
Abreve.svg E.svg H.svg Lacute.calt.svg Ohungarumlaut.svg Tbar.svg Wgrave.calt.svg
Acircumflex.calt.svg Eacute.calt.svg Hbar.calt.svg Lacute.svg Omacron.calt.svg Tcaron.calt.svg Wgrave.svg
Acircumflex.svg Eacute.svg Hbar.svg Lcaron.calt.svg Omacron.svg Tcaron.svg X.calt.svg
Adieresis.calt.svg Ebreve.calt.svg Hcircumflex.calt.svg Lcaron.svg Oslash.calt.svg Thorn.calt.svg X.svg
Adieresis.svg Ebreve.svg Hcircumflex.svg Lcommaaccent.calt.svg Oslash.svg Thorn.svg Y.calt.svg
Agrave.calt.svg Ecaron.calt.svg I.calt.svg Lcommaaccent.svg Oslashacute.calt.svg U.calt.svg Y.svg
Agrave.svg Ecaron.svg I.svg Ldot.calt.svg Oslashacute.svg U.svg Yacute.calt.svg
Amacron.calt.svg Ecircumflex.calt.svg IJ.calt.svg Ldot.svg Otilde.calt.svg Uacute.calt.svg Yacute.svg
Amacron.svg Ecircumflex.svg IJ.svg Lslash.calt.svg Otilde.svg Uacute.svg Ycircumflex.calt.svg
Aogonek.calt.svg Edieresis.calt.svg Iacute.calt.svg Lslash.svg P.calt.svg Ubreve.calt.svg Ycircumflex.svg
Aogonek.svg Edieresis.svg Iacute.svg M.calt.svg P.svg Ubreve.svg Ydieresis.calt.svg
Aring.calt.svg Edotaccent.calt.svg Ibreve.calt.svg M.svg Q.alt.svg Ucircumflex.calt.svg Ydieresis.svg
Aring.svg Edotaccent.svg Ibreve.svg N.calt.svg Q.calt.svg Ucircumflex.svg Ygrave.calt.svg
Atilde.calt.svg Egrave.calt.svg Icircumflex.calt.svg N.svg Q.svg Udieresis.calt.svg Ygrave.svg
Atilde.svg Egrave.svg Icircumflex.svg Nacute.calt.svg R.calt.svg Udieresis.svg Z.alt.svg
B.calt.svg Emacron.calt.svg Idieresis.calt.svg Nacute.svg R.svg Ugrave.calt.svg Z.calt.svg
B.svg Emacron.svg Idieresis.svg Ncaron.calt.svg Racute.calt.svg Ugrave.svg Z.svg
C.calt.svg Eogonek.calt.svg Idotaccent.calt.svg Ncaron.svg Racute.svg Uhungarumlaut.calt.svg Zacute.alt.svg
C.svg Eogonek.svg Idotaccent.svg Ncommaaccent.calt.svg Rcaron.calt.svg Uhungarumlaut.svg Zacute.calt.svg
Cacute.calt.svg Eth.calt.svg Igrave.calt.svg Ncommaaccent.svg Rcaron.svg Umacron.calt.svg Zacute.svg
Cacute.svg Eth.svg Igrave.svg Ntilde.calt.svg Rcommaaccent.calt.svg Umacron.svg Zcaron.alt.svg
Ccaron.calt.svg Euro.osf.svg Imacron.calt.svg Ntilde.svg Rcommaaccent.svg Uogonek.calt.svg Zcaron.calt.svg
Ccaron.svg Euro.svg Imacron.svg O.calt.svg S.calt.svg Uogonek.svg Zcaron.svg
Ccedilla.calt.svg F.alt.svg Iogonek.calt.svg O.svg S.svg Uring.calt.svg Zdotaccent.alt.svg
Ccedilla.svg F.calt.svg Iogonek.svg OE.calt.svg Sacute.calt.svg Uring.svg Zdotaccent.calt.svg
Ccircumflex.calt.svg F.svg Itilde.calt.svg OE.svg Sacute.svg Utilde.calt.svg Zdotaccent.svg
Ccircumflex.svg G.calt.svg Itilde.svg Oacute.calt.svg Scaron.calt.svg Utilde.svg _moreSVGs_
Cdotaccent.calt.svg G.svg J.calt.svg Oacute.svg Scaron.svg V.calt.svg
Cdotaccent.svg Gbreve.calt.svg J.svg Obreve.calt.svg Scedilla.calt.svg V.svg
D.calt.svg Gbreve.svg Jcircumflex.calt.svg Obreve.svg Scedilla.svg W.calt.svg
Going deeper in the nested _moreSVGs_
folders:
➤ ls
_moreSVGs_ a.alt.svg a.sc.svg a.svg
➤ ls
_moreSVGs_ aacute.alt.svg aacute.sc.svg aacute.svg
➤ ls
_moreSVGs_ abreve.alt.svg abreve.sc.svg abreve.svg
etc.
miguelsousa commented
There's something strange going on. There should be only one _moreSVGs_
folder. It seems like one of the functions went into an infinite loop. I'll try to reproduce.
miguelsousa commented
I think this is fixed now. Thanks for the report.
RoelN commented
Works perfectly now — thanks for picking this up so quickly! 🍰