csv extension

79 views
Skip to first unread message

Arthur Griffin

unread,
Nov 12, 2020, 8:55:02 PM11/12/20
to netlogo-users

When running CSV Example of Extensions I get the following error message when trying to write turtles to a csv file:
Extension exception: Couldn't create file: C:\Program Files\NetLogo 6.1.1\app\models\Code Examples\Extensions Examples\csv\turtles.csv
error while observer running CSV:TO-FILE
  called by procedure WRITE-TURTLES-TO-CSV
  called by Button 'write-turtles-to-csv'

Does anyone have experience with this problem?

Bryan Head

unread,
Nov 14, 2020, 9:17:10 AM11/14/20
to netlogo-users
It looks like it's trying to write to the actual installation directory of NetLogo, which there's a good chance you don't have permission to do (you'd probably have to run NetLogo as an admin to do that). Try saving the CSV file to somewhere in your user directory instead. A convenient way of picking where to save the file is something like: `csv:to-file user-file data`. See https://ccl.northwestern.edu/netlogo/docs/dictionary.html#user-file

Hope that helps,
Bryan

Arthur Griffin

unread,
Nov 16, 2020, 5:37:22 PM11/16/20
to Bryan Head, netlogo-users
Thanks Bryan
You were right about not having permission to write to distribution folder.  I discovered the easiest fix was copying the nlogo file, without any edits, to my own directory. 

Sent from my iPhone

On Nov 14, 2020, at 6:17 AM, Bryan Head <bryan...@gmail.com> wrote:


--
You received this message because you are subscribed to the Google Groups "netlogo-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to netlogo-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/netlogo-users/a3aeab00-1f9e-45fc-958d-efc199911900n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages