Skip to main content
14 events
when toggle format what by license comment
Jul 21, 2022 at 2:15 comment added Martan If someone is getting error in pro, changing "open(csvfile, 'wb')" to "open(csvfile, 'w')" fixes byte error.
Apr 13, 2017 at 12:34 history edited CommunityBot
replaced http://gis.stackexchange.com/ with https://gis.stackexchange.com/
Dec 20, 2016 at 22:39 comment added Cotton.Rockwood Excellent answer! Helped me to solve a similar problem outputting Geostatistical Layer Cross Validation statistics to a csv file. Thanks @blah238!
Jun 7, 2012 at 6:48 history edited blah238 CC BY-SA 3.0
edited body
Jun 7, 2012 at 6:42 comment added blah238 FYI I have updated the instructions and screenshots to use nested models to avoid Calculate Value running multiple times as well as fix the problem where the the text file had to exist beforehand (you now specify its output location and file name as two separate parameters).
Jun 7, 2012 at 6:39 history edited blah238 CC BY-SA 3.0
Use nested inner and outer models to avoid Calculate Value running multiple times; function now takes output location and output filename arguments; function returns output text file path
May 30, 2012 at 16:18 comment added blah238 The Python code will create the CSV file for you, no need to create it beforehand. As you have seen though, if you open the file in Excel, that locks the file and it can't be written to by Python until you close it.
May 30, 2012 at 15:08 vote accept JPD
May 30, 2012 at 15:08 comment added JPD Just fixed it - this is the perfect solution. Thanks so much for your help!
May 30, 2012 at 14:29 comment added JPD Hello, thanks for putting so much effort into your reply and apologies for my late reply. I'm trying to run the model as you've described, but i'm having trouble with the CSV. I've made a blank CSV file in Excel and saved it, then loaded it into the model. ERROR 000539: Error running expression: multivaluesToCsv(r"%CSV File%", "%FC Name Values%", "%Minimum Values%", "%Average Values%", "%Maximum Values%") <type 'exceptions.IOError'>: [Errno 13] Permission denied: u'%CSV File%' Failed to execute (Calculate Value). I keep getting this error. My CSV is called CSVFile.csv.
May 24, 2012 at 23:47 history edited blah238 CC BY-SA 3.0
added raw string link
May 24, 2012 at 23:32 history edited blah238 CC BY-SA 3.0
added more information, related question link, ModelBuilder screenshot and improved formatting/structure
May 24, 2012 at 17:44 history edited blah238 CC BY-SA 3.0
edited body
May 24, 2012 at 17:37 history answered blah238 CC BY-SA 3.0