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

CSV Example tries to write to write-protected directory on Windows #325

Open
mrerrormessage opened this issue Dec 21, 2016 · 3 comments
Open
Milestone

Comments

@mrerrormessage
Copy link
Contributor

It's possible this issue belongs in the CSV-Extension repository, but I'll go ahead and post it here.

The CSV example model uses csv:to-file, which tries to write to a path in the same directory as the current model. On Windows, this directory is not writable by default (unless you run NetLogo as an administrator), so the user gets an error (although the error is clear enough to describe the problem).

I'm honestly not sure what the appropriate fix is here. The model works correctly on Mac and will work on Linux as long as the user has the appropriate permissions (most Linux users will be able to troubleshoot this one on their own).

@nicolaspayette
Copy link
Member

I'll go ahead and post it here.

Since the model lives here, I think that's the right place for this issue.

I'm honestly not sure what the appropriate fix is here.

Me neither. The solution probably involves using user-directory or user-new-file to give the user a chance to choose where to put the file (maybe in the "catch" part of a carefully), but it would make the model a bit less straightforward.

@qiemem, what do you think?

Also, I hesitate to propose it, but... maybe this shows the need for a home-directory primitive... (But not for 6.0, of course...) @mrerrormessage, what do you think?

@mrerrormessage
Copy link
Contributor Author

There have been several times in the past few days where I've looked hard for a home-directory primitive (or even a working-directory primitive) and have been very surprised to find that none existed. I think it's definitely worth consideration in a future release.

@UriCCL
Copy link

UriCCL commented Dec 21, 2016 via email

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

3 participants