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

signac view doesn't work on Windows #214

Closed
bdice opened this issue Jul 26, 2019 · 7 comments · Fixed by #236
Closed

signac view doesn't work on Windows #214

bdice opened this issue Jul 26, 2019 · 7 comments · Fixed by #236
Labels
bug Something isn't working good first issue Good for newcomers
Milestone

Comments

@bdice
Copy link
Member

bdice commented Jul 26, 2019

Description

When calling signac view on Windows, an OSError is raised because users typically do not have permissions to create symbolic links on Windows (only administrators have this ability by default). This is discussed in this StackOverflow post: https://stackoverflow.com/questions/6260149/os-symlink-support-in-windows

To reproduce

signac view, or

>>> import os
>>> os.symlink('src', 'dst')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
OSError: symbolic link privilege not held

System configuration

Please complete the following information:

  • Operating System [e.g. macOS]: Windows 10
  • Version of Python [e.g. 3.7]: 3.6.6
  • Version of signac [e.g. 1.0]: 0.9.4
@csadorf
Copy link
Contributor

csadorf commented Jul 26, 2019

Since symbolic links are not supported on Windows, the only thing we can really do is show a better error message or explicitly check the platform. I wouldn't know how to support views without symbolic links, but I'm open to suggestions.

@csadorf csadorf added this to the v1.2.1 milestone Sep 2, 2019
@csadorf csadorf added the good first issue Good for newcomers label Sep 2, 2019
@csadorf
Copy link
Contributor

csadorf commented Sep 2, 2019

This is related to #213 .

@csadorf csadorf added the bug Something isn't working label Sep 2, 2019
@bdice bdice modified the milestones: v1.2.1, v1.3.0 Dec 4, 2019
@slowglow
Copy link
Contributor

Hello,

I am here because of this error, which I encountered while doing the tutorial:
"Error: signac cannot create linked views on Windows, because symbolic links are not supported by the platform."
The second part of this error message seems to be factually incorrect. As @bdice pointed when opening this issue, "only administrators have this ability by default". It is possible for non-admin users to create symlinks on Windows 10 since at least Dec 2016 (https://blogs.windows.com/windowsdeveloper/2016/12/02/symlinks-windows-10/). In order to enable non-admin users to create symlinks "Developer mode" should be enabled (as described here: https://www.howtogeek.com/howto/16226/complete-guide-to-symbolic-links-symlinks-on-windows-or-linux/)

On my machine developer mode is enabled, and I can confirm that symlinks are created with the mklink command. However, signac view doesn't work and returns the above mentioned error.

Can we have this issue revisited?

@bdice
Copy link
Member Author

bdice commented Dec 13, 2020

@slowglow I’d be happy to review a PR that enables this feature if we are able to test it effectively. Our continuous integration may not have the appropriate privileges. I would be in favor of checking if symlinks are supported on Windows and running those tests depending on that check.

@slowglow
Copy link
Contributor

@bdice Thank you for your response. I understand about the continuous integration issues and I agree with the proposed approach. I would love to try my hand at submitting a PR, but at this time I am still trying to figure out the basic concepts.
In the meantime, may I suggest that the error message is revised to state that "at this time symbolic links are not supported by signac on the Windows the platform". Rephrased this way the end user will have a better idea where the problem lies and that there is hope of it being resolved someday, and even be motivated to dig into the code and work toward a PR. As it stands now, the error message is a bit misleading and may also be a bit discouraging.

@bdice
Copy link
Member Author

bdice commented Dec 14, 2020

@slowglow Updating the message would be fine as an interim solution. If you want help with opening a PR, let us know! I’ll open an issue to track this behavior and document the proposed long term solution.

@bdice
Copy link
Member Author

bdice commented Dec 14, 2020

@slowglow Feel free to comment on #430 if you'd like to pursue making these changes to documentation and/or behavior. If you'd like, you can also join our Slack community or come to a signac developer meeting / office hours session to discuss this topic or any other questions you have as a new user. See here for info: https://docs.signac.io/en/latest/community.html Thanks again for reaching out!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants