<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Error exporting feature attributes in Spatial Statistics Questions</title>
    <link>https://community.esri.com/t5/spatial-statistics-questions/error-exporting-feature-attributes/m-p/517544#M1657</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Wow, this is funny!&amp;nbsp; I was going to post a reply on how I use the exportXYv_stats tool and I am seeing a reference to one of my previous posts showing how I do it!&amp;nbsp; Thanks Wayne for the point!&amp;nbsp; I wanted to post some code on here of something I was playing around with yesterday, which is an &lt;/SPAN&gt;&lt;STRONG&gt;alternative&lt;/STRONG&gt;&lt;SPAN&gt; to using the exportXYv_stats tool.&amp;nbsp; I have found that this actually works much faster than creating a csv file with the exportXYv_stats tool.&amp;nbsp; This method uses a search cursor to grab values and write them out into a new csv file.&amp;nbsp; I tested this and it worked on 9,000 Address points in 3 seconds! Very Cool!&amp;nbsp; Anyways here is an another way to write out attributes to text.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; print 'Creating Text File...'
&amp;nbsp;&amp;nbsp;&amp;nbsp; text = open(p.join(ws, "Addresses2.csv"), "w")
&amp;nbsp;&amp;nbsp;&amp;nbsp; text.writelines('"PID","FULL_ADD","POINT_X","POINT_Y"')
&amp;nbsp;&amp;nbsp;&amp;nbsp; srows = arcpy.SearchCursor(address)
&amp;nbsp;&amp;nbsp;&amp;nbsp; for row in srows:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pid = row.getValue('PID')
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; add = row.getValue('FULL_ADD')
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; x&amp;nbsp;&amp;nbsp; = row.getValue('POINT_X')
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; y&amp;nbsp;&amp;nbsp; = row.getValue('POINT_Y')
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; text.writelines('\n"%s","%s",%s,%s' % (pid,add,x,y))
&amp;nbsp;&amp;nbsp;&amp;nbsp; text.close()
 
&amp;nbsp;&amp;nbsp;&amp;nbsp; del row, srows
&amp;nbsp;&amp;nbsp;&amp;nbsp; print 'Text File Created Successfully'
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you would rather make a tab delimited text file you can simply change the commas to '\t'.&amp;nbsp; This is obviously more ideal if you do not have ton of fields you want to export out or if you just want to quickly make stand alone tables using just a few fields from another table.&amp;nbsp; I also realize this is a lot more code than just using Esri's XYv_stats tool, but you have a lot more control over this.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;One thing you need to pay attention to if you want to use this method is to wrap double quotes around the parameter substitutions for string fields ("%s")&amp;nbsp; and do not put double quotes around numeric fields (%s, x and y fields in my example).&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 11 Dec 2021 22:34:27 GMT</pubDate>
    <dc:creator>Anonymous User</dc:creator>
    <dc:date>2021-12-11T22:34:27Z</dc:date>
    <item>
      <title>Error exporting feature attributes</title>
      <link>https://community.esri.com/t5/spatial-statistics-questions/error-exporting-feature-attributes/m-p/517542#M1655</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Has anyone else experienced any problems using the Export Feature Attributes to ASCII tool via python window?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am using the following command yet it keeps telling me there is a syntax error, even though I followed the help on the tool syntax:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.ExportXYv_stats(infile,"State_Code";"County_Code";"Site_Code";"RASTERVALU","COMMA",outfile,"ADD_FIELD_NAMES")&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;-Steve&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Oct 2012 17:39:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/spatial-statistics-questions/error-exporting-feature-attributes/m-p/517542#M1655</guid>
      <dc:creator>steveSuperczynski</dc:creator>
      <dc:date>2012-10-24T17:39:09Z</dc:date>
    </item>
    <item>
      <title>Re: Error exporting feature attributes</title>
      <link>https://community.esri.com/t5/spatial-statistics-questions/error-exporting-feature-attributes/m-p/517543#M1656</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The problem is the tool 'sees' that you've provided more than the 5 parameters allowed.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This is the syntax:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;ExportXYv_stats (Input_Feature_Class, Value_Field, Delimiter, Output_ASCII_File, Add_Field_Names_to_Output)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Your Value_Field is expecting a Python list, so test this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.ExportXYv_stats(infile,&lt;/SPAN&gt;&lt;SPAN style="color:&amp;quot;#FF0000&amp;quot;;"&gt;[&lt;/SPAN&gt;&lt;SPAN&gt;"State_Code","County_Code","Site_Code","RASTERVALU"&lt;/SPAN&gt;&lt;SPAN style="color:&amp;quot;#FF0000&amp;quot;;"&gt;]&lt;/SPAN&gt;&lt;SPAN&gt;,"COMMA",outfile,"ADD_FIELD_NAMES")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Caleb Mackey made a great post (see link below), using the technique to populate his fieldnames list from another object list return on the ListFields method (see the red highlighted variables and corresponding brackets delineating the list):&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://forums.arcgis.com/threads/66118-Problem-with-coding-on-ExportXYv_stats-tool?highlight=Exportxyv_stats" rel="nofollow"&gt;http://forums.arcgis.com/threads/66118-Problem-with-coding-on-ExportXYv_stats-tool?highlight=Exportxyv_stats&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN style="color:&amp;quot;#FF0000&amp;quot;;"&gt;fieldnames&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN style="color:&amp;quot;#FF0000&amp;quot;;"&gt;[&lt;/SPAN&gt;&lt;SPAN&gt;f.name for f in arcpy.ListFields(outfeat)&lt;/SPAN&gt;&lt;SPAN style="color:&amp;quot;#FF0000&amp;quot;;"&gt;]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.ExportXYv_stats(outfeat, &lt;/SPAN&gt;&lt;SPAN style="color:&amp;quot;#FF0000&amp;quot;;"&gt;fieldnames&lt;/SPAN&gt;&lt;SPAN&gt;, "COMMA", out_table,"ADD_FIELD_NAMES")&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've used this tool before but have forgotten the syntax...don't think I've fed in my fields like that before though.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks, I liked it so much I had to give Caleb points for that!...well, 1 point anyway. If that works for you, you could give him another point if you like.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Oct 2012 00:40:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/spatial-statistics-questions/error-exporting-feature-attributes/m-p/517543#M1656</guid>
      <dc:creator>T__WayneWhitley</dc:creator>
      <dc:date>2012-10-25T00:40:14Z</dc:date>
    </item>
    <item>
      <title>Re: Error exporting feature attributes</title>
      <link>https://community.esri.com/t5/spatial-statistics-questions/error-exporting-feature-attributes/m-p/517544#M1657</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Wow, this is funny!&amp;nbsp; I was going to post a reply on how I use the exportXYv_stats tool and I am seeing a reference to one of my previous posts showing how I do it!&amp;nbsp; Thanks Wayne for the point!&amp;nbsp; I wanted to post some code on here of something I was playing around with yesterday, which is an &lt;/SPAN&gt;&lt;STRONG&gt;alternative&lt;/STRONG&gt;&lt;SPAN&gt; to using the exportXYv_stats tool.&amp;nbsp; I have found that this actually works much faster than creating a csv file with the exportXYv_stats tool.&amp;nbsp; This method uses a search cursor to grab values and write them out into a new csv file.&amp;nbsp; I tested this and it worked on 9,000 Address points in 3 seconds! Very Cool!&amp;nbsp; Anyways here is an another way to write out attributes to text.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; print 'Creating Text File...'
&amp;nbsp;&amp;nbsp;&amp;nbsp; text = open(p.join(ws, "Addresses2.csv"), "w")
&amp;nbsp;&amp;nbsp;&amp;nbsp; text.writelines('"PID","FULL_ADD","POINT_X","POINT_Y"')
&amp;nbsp;&amp;nbsp;&amp;nbsp; srows = arcpy.SearchCursor(address)
&amp;nbsp;&amp;nbsp;&amp;nbsp; for row in srows:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pid = row.getValue('PID')
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; add = row.getValue('FULL_ADD')
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; x&amp;nbsp;&amp;nbsp; = row.getValue('POINT_X')
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; y&amp;nbsp;&amp;nbsp; = row.getValue('POINT_Y')
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; text.writelines('\n"%s","%s",%s,%s' % (pid,add,x,y))
&amp;nbsp;&amp;nbsp;&amp;nbsp; text.close()
 
&amp;nbsp;&amp;nbsp;&amp;nbsp; del row, srows
&amp;nbsp;&amp;nbsp;&amp;nbsp; print 'Text File Created Successfully'
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you would rather make a tab delimited text file you can simply change the commas to '\t'.&amp;nbsp; This is obviously more ideal if you do not have ton of fields you want to export out or if you just want to quickly make stand alone tables using just a few fields from another table.&amp;nbsp; I also realize this is a lot more code than just using Esri's XYv_stats tool, but you have a lot more control over this.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;One thing you need to pay attention to if you want to use this method is to wrap double quotes around the parameter substitutions for string fields ("%s")&amp;nbsp; and do not put double quotes around numeric fields (%s, x and y fields in my example).&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 22:34:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/spatial-statistics-questions/error-exporting-feature-attributes/m-p/517544#M1657</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2021-12-11T22:34:27Z</dc:date>
    </item>
    <item>
      <title>Re: Error exporting feature attributes</title>
      <link>https://community.esri.com/t5/spatial-statistics-questions/error-exporting-feature-attributes/m-p/517545#M1658</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Nice, rack 1 more point... I was going to write that I had modified the exportXYv_stats (but wasn't directly relevant to this post at the time) in order not to trip on Unicode characters - don't know if Unicode is supported now, and it has been awhile since I checked it out.&amp;nbsp; I don't know, maybe I should have stripped out the Unicode to replace ANSI text in the fc I was dealing with (which was doable) but it isn't a source fc I am responsible...so guess I got lazy and it was easier to accommodate!&amp;nbsp; &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Anyway, thanks Caleb!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Oct 2012 13:56:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/spatial-statistics-questions/error-exporting-feature-attributes/m-p/517545#M1658</guid>
      <dc:creator>T__WayneWhitley</dc:creator>
      <dc:date>2012-10-25T13:56:09Z</dc:date>
    </item>
    <item>
      <title>Re: Error exporting feature attributes</title>
      <link>https://community.esri.com/t5/spatial-statistics-questions/error-exporting-feature-attributes/m-p/517546#M1659</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I suppose I was getting a little off topic here, but I just thought I would provide another way of writing out text files that is not using that tool if anyone is interested.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;@ Steve- I should've mentioned in my first reply that Wayne was correct in that your error was being created because your field names were not in brackets.&amp;nbsp; Python did not know how to interpret your field list.&amp;nbsp; If you use his advice and wrap your field names in brackets, the tool should work fine.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;@ Wayne-&amp;nbsp; Hmm, you bring up a good point and I am now curious about writing unicoded values out to new text files. I have not played around with this yet so I do not know how that would work.&amp;nbsp; :confused:&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Oct 2012 14:16:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/spatial-statistics-questions/error-exporting-feature-attributes/m-p/517546#M1659</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2012-10-25T14:16:06Z</dc:date>
    </item>
    <item>
      <title>Re: Error exporting feature attributes</title>
      <link>https://community.esri.com/t5/spatial-statistics-questions/error-exporting-feature-attributes/m-p/517547#M1660</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks Wayne and Caleb. The brackets solution fixed the error I was getting. I should have figured that the brackets were needed, I missed that in the help window.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Unfortunately this uncovered another error which only occurs when either running the tool in batch mode or through Python:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;"ERROR 000204: Error creating input feature cursor"&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I seem to remember coming across this error previously when searching for answers to my problem so I will have to go back and look for it.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Oct 2012 14:38:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/spatial-statistics-questions/error-exporting-feature-attributes/m-p/517547#M1660</guid>
      <dc:creator>steveSuperczynski</dc:creator>
      <dc:date>2012-10-25T14:38:13Z</dc:date>
    </item>
    <item>
      <title>Re: Error exporting feature attributes</title>
      <link>https://community.esri.com/t5/spatial-statistics-questions/error-exporting-feature-attributes/m-p/517548#M1661</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Can you post your full code?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Oct 2012 14:51:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/spatial-statistics-questions/error-exporting-feature-attributes/m-p/517548#M1661</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2012-10-25T14:51:30Z</dc:date>
    </item>
    <item>
      <title>Re: Error exporting feature attributes</title>
      <link>https://community.esri.com/t5/spatial-statistics-questions/error-exporting-feature-attributes/m-p/517549#M1662</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Here is the code.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;[PHP]import os, sys, glob, re &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;import arcpy&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;source = 'C:/DISCOVER_AQ/MODEL/CMAQ/PM2.5/'&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;for infile in glob.iglob(os.path.join(source, 'PM*.shp')):&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; fn = os.path.splitext(os.path.basename(infile))[0]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; outfile = source+fn+'.txt'&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.ExportXYv_stats(infile,["State_Code","County_Code","Site_Code","RASTERVALU"],"COMMA",outfile,"ADD_FIELD_NAMES")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[/PHP]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;-Steve&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Oct 2012 15:09:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/spatial-statistics-questions/error-exporting-feature-attributes/m-p/517549#M1662</guid>
      <dc:creator>steveSuperczynski</dc:creator>
      <dc:date>2012-10-25T15:09:59Z</dc:date>
    </item>
    <item>
      <title>Re: Error exporting feature attributes</title>
      <link>https://community.esri.com/t5/spatial-statistics-questions/error-exporting-feature-attributes/m-p/517550#M1663</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Steve,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I do not see any problems with your code, but I have had lots of strange behavior with this tool which is why I decided to create an alternate way to write to text files.&amp;nbsp; I looked up the error message and found a link to this forum on GIS stack exchange:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://gis.stackexchange.com/questions/23776/error-000204-using-export-feature-attribute-to-ascii-tool-on-arcgis-server-10"&gt;http://gis.stackexchange.com/questions/23776/error-000204-using-export-feature-attribute-to-ascii-tool-on-arcgis-server-10&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;According to this, the person changed the delimiter from comma to semi colon and it worked for some strange reason?&amp;nbsp; It may be worth a shot, but who knows.&amp;nbsp; There does not appear to be anything wrong with your script so I don't know why you are getting that error (unless I am overlooking something in your glob functions, I have never used that module before).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;also, you can save yourself some time by importing os.path as p (from os import path as p).&amp;nbsp; This way instead of typing out "os.path.join" every time, you can replace it with "p.join".&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;hope this helps&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Oct 2012 16:16:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/spatial-statistics-questions/error-exporting-feature-attributes/m-p/517550#M1663</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2012-10-25T16:16:27Z</dc:date>
    </item>
    <item>
      <title>Re: Error exporting feature attributes</title>
      <link>https://community.esri.com/t5/spatial-statistics-questions/error-exporting-feature-attributes/m-p/517551#M1664</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Changing the delimiter didn't make any difference for me. Thanks for the tip though. I guess I will go your route and write my own script to export the attributes. I used this tool with similar files using batch mode before and had no issues so this is a bit puzzling. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for the os.path tip as well!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;-Steve&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Oct 2012 17:29:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/spatial-statistics-questions/error-exporting-feature-attributes/m-p/517551#M1664</guid>
      <dc:creator>steveSuperczynski</dc:creator>
      <dc:date>2012-10-25T17:29:36Z</dc:date>
    </item>
    <item>
      <title>Re: Error exporting feature attributes</title>
      <link>https://community.esri.com/t5/spatial-statistics-questions/error-exporting-feature-attributes/m-p/517552#M1665</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;@Caleb - about keeping the Unicode characters, it's been awhile so I don't remember exactly what I did, but you have the option to write various text standard-compliant files, like utf-8 for example.&amp;nbsp; I took a look at using Python's codecs too I think.&amp;nbsp; Anyway, you can choose to keep the 'non-compliant' characters and write a unicode type text file - but then you may have problems in an app that adheres to the ANSI standard (which defeats the purpose of producing the file in the 1st place if you needed it as sort of an 'interoperable' solution).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;At the very least, it was more useful not to crash the tool upon the mere encounter with non-ANSI characters, lol!&amp;nbsp; If I remember correctly, part of the exercise was trying to find out why some of the other tools were crashing too -- they were all choking on an apostrophe Unicode character, interesting but annoying.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I'll try to dig up and post what I put together that served the purpose at the time.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Oct 2012 17:30:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/spatial-statistics-questions/error-exporting-feature-attributes/m-p/517552#M1665</guid>
      <dc:creator>T__WayneWhitley</dc:creator>
      <dc:date>2012-10-25T17:30:16Z</dc:date>
    </item>
    <item>
      <title>Re: Error exporting feature attributes</title>
      <link>https://community.esri.com/t5/spatial-statistics-questions/error-exporting-feature-attributes/m-p/517553#M1666</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;@Wayne- Thanks for unicode the info.&amp;nbsp; If you find that example of when you do this I would definitely be interested in seeing it!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;@Steve- I do not know what is with that tool, but I have a script that runs every night that uses the ExportXYv_stats tool and it will randomly crash once in a while even though I have made no changes.&amp;nbsp; So there must be some sort of bug with that tool.&amp;nbsp; I just found a potential flaw in my method of creating a CSV with a search cursor.&amp;nbsp; I do not know why but there seems to be an error with precision when writing these values out into a text file. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Screenshot 1 is a look at the table created by the XYv_stats table.&amp;nbsp; Screenshot 2 is the table created by my search cursor.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;[ATTACH=CONFIG]18743[/ATTACH][ATTACH=CONFIG]18742[/ATTACH]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I need to find a solution on how to fix this or as to why the values are changing.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Oct 2012 18:01:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/spatial-statistics-questions/error-exporting-feature-attributes/m-p/517553#M1666</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2012-10-25T18:01:55Z</dc:date>
    </item>
    <item>
      <title>Re: Error exporting feature attributes</title>
      <link>https://community.esri.com/t5/spatial-statistics-questions/error-exporting-feature-attributes/m-p/517554#M1667</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;@Wayne- Thanks for the info about unicoding.&amp;nbsp; If you find the script where you did this operation I would definitely be interested in seeing it!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;@Steve-&amp;nbsp; It does not make any sense as to why this tool is not working for you.&amp;nbsp; I have had problems with it too.&amp;nbsp; It is used in a script that I have running every night and it will decide to randomly crash out every once in a while even though I have not altered the script.&amp;nbsp; I did find one flaw in my search cursor method of writing out text files.&amp;nbsp; It appears that some precision errors are created when I use the search cursor to grab values and put them into a new text file.&amp;nbsp; Some of the values change by a very small amount (ex. 6.2 becomes 6.199999809).&amp;nbsp; So this may not be a good fix (it does work like a charm for exporting text values of course!).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'll show you what I mean below.&amp;nbsp; Screenshot 1 is a csv created with the ExportXYv_stats tool (correct values).&amp;nbsp; Screenshot 2 is a csv created from the search cursor (some values are randomly off by very small amounts :confused:).&amp;nbsp; I am going to try to figure out why this is happening.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;[ATTACH=CONFIG]18744[/ATTACH][ATTACH=CONFIG]18745[/ATTACH]&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Oct 2012 18:14:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/spatial-statistics-questions/error-exporting-feature-attributes/m-p/517554#M1667</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2012-10-25T18:14:22Z</dc:date>
    </item>
    <item>
      <title>Re: Error exporting feature attributes</title>
      <link>https://community.esri.com/t5/spatial-statistics-questions/error-exporting-feature-attributes/m-p/517555#M1668</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I figured out why I was having that problem...I was using the %s which is the string formatting (I should have known not to use this for float types!).&amp;nbsp; I found that when I replaced those with %f (float format) it worked perfectly.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Oct 2012 18:34:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/spatial-statistics-questions/error-exporting-feature-attributes/m-p/517555#M1668</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2012-10-25T18:34:15Z</dc:date>
    </item>
  </channel>
</rss>

