Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When Julia doesn't recognize long file name. #41735

Closed
andyname opened this issue Jul 30, 2021 · 5 comments
Closed

When Julia doesn't recognize long file name. #41735

andyname opened this issue Jul 30, 2021 · 5 comments

Comments

@andyname
Copy link

andyname commented Jul 30, 2021

Hello.
I've made file storage system by Julia. It is to save DataFrame format as a file. It's being saved through Serialize. However, Serialize makes an error when the file name is long. I think save and load sytem of JuliaDB has same problem. Long file name error. Here is an example. I'm using Julia 1.5.4 and 1.6.2 on windows 10.

#############
using Serialization

df=DataFrame(c1=[5,6,7])

folderName="C:\\ChamGo\\ADGOIMMUGYUL2_2_OIL_STS_SL01_WONCHEON\\WON_IDv1v36869vEPOCHMSv63602211600000v63602985600000\\WON_IDv1v36869vEPOCHMSv63602211600000v63602985600000\\WON_IDv1v36869vEPOCHMSv63602211600000v63602985600000"

mkpath(folderName)

fileName="C:\\ChamGo\\ADGOIMMUGYUL2_2_OIL_STS_SL01_WONCHEON\\WON_IDv1v36869vEPOCHMSv63602211600000v63602985600000\\WON_IDv1v36869vEPOCHMSv63602211600000v63602985600000\\WON_IDv1v36869vEPOCHMSv63602211600000v63602985600000\\WON_IDv1v36869vEPOCHMSv63602211600000v63602985600000.jls"

serialize(fileName,df)   ## It makes an error.

#############

fileName="C:\\ChamGo\\shortName.jls"

serialize(fileName,df)   ## It's not.
@barucden
Copy link
Contributor

I suspect this is not an issue with Julia, but with Windows. Have you tried to create the file manually (e.g., from command line)? Did it work?

Windows defines the maximum length of a path and it is 260 characters. It should be possible to remove this limitation on Windows 10.

@andyname
Copy link
Author

I've made a path on windows 10 manually by GUI interface and CMD as well. It works.

C:> mkdir C:\ChamGo1\ADGOIMMUGYUL2_2_OIL_STS_SL01_WONCHEON\WON_IDv1v36869vEPOCHMSv63602211600000v63602985600000\WON_IDv1v36869vEPOCHMSv63602211600000v63602985600000\WON_IDv1v36869vEPOCHMSv63602211600000v63602985600000

What I have tried.

@barucden
Copy link
Contributor

This path has only 208 characters. The one that you included in the original code snippet had 264 (exceeding the windows limitation).
Try:

mkdir C:\ChamGo1\ADGOIMMUGYUL2_2_OIL_STS_SL01_WONCHEON\WON_IDv1v36869vEPOCHMSv63602211600000v63602985600000\WON_IDv1v36869vEPOCHMSv63602211600000v63602985600000\WON_IDv1v36869vEPOCHMSv63602211600000v63602985600000
\WON_IDv1v36869vEPOCHMSv63602211600000v63602985600000jls

@Seelengrab
Copy link
Contributor

Related to #39774 - maximum allowable file name length is system dependent.

You seem to be on windows, which limits path lengths to 260 characters (see here and here for more info).

@andyname
Copy link
Author

Thank you Guys! I've solved this problem. It was not a Julia issue. It was Windows. I've followed the links that you give to me, so I could edit registry. Now my Julia system recognize long file name.

@andyname andyname changed the title Julia doesn't recognize long file name. When Julia doesn't recognize long file name. Jul 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants