<?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 000229: Cannot open temp_layer Failed to execute (PointToRaster). in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/error-000229-cannot-open-temp-layer-failed-to/m-p/1281652#M68273</link>
    <description>&lt;P&gt;I tried a sample .csv of only a few lines, and that worked. So then I split the data up into 2001.csv, 2002.csv, etc and found that I got the same error. because of this I simply shortened each year to 150 samples, and cleaned a few columns I didn't end up using, and this worked. Below is the final version of the code, thank you for all the help!&lt;/P&gt;&lt;P&gt;import arcpy&lt;BR /&gt;from arcpy.sa import *&lt;BR /&gt;arcpy.env.workspace = r"C:\Testing"&lt;BR /&gt;arcpy.env.overwriteOutput = True&lt;/P&gt;&lt;P&gt;in_csv_list = ["2001.csv", "2002.csv", "2003.csv", "2004.csv", "2005.csv", "2006.csv", "2007.csv", "2008.csv", "2009.csv", "2010.csv", "2011.csv"]&lt;BR /&gt;for in_csv in in_csv_list:&lt;BR /&gt;out_raster = in_csv.split(".")[0] + ".tif"&lt;BR /&gt;layer_name = r"C:\Testing\templayer"&lt;BR /&gt;x_field = "X"&lt;BR /&gt;y_field = "Y"&lt;BR /&gt;spatial_reference = arcpy.SpatialReference(4326)&lt;BR /&gt;arcpy.MakeXYEventLayer_management(in_csv, x_field, y_field, layer_name, spatial_reference)&lt;/P&gt;&lt;P&gt;cellsize = 0.08&lt;BR /&gt;value_field = "Total_PCB(ppm)"&lt;BR /&gt;assignment_type = "RANGE"&lt;BR /&gt;arcpy.PointToRaster_conversion(layer_name, value_field, out_raster, assignment_type, value_field, cellsize)&lt;/P&gt;&lt;P&gt;arcpy.Delete_management(layer_name)&lt;BR /&gt;del layer_name&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 22 Apr 2023 22:00:35 GMT</pubDate>
    <dc:creator>AlexanderZirilli</dc:creator>
    <dc:date>2023-04-22T22:00:35Z</dc:date>
    <item>
      <title>ERROR 000229: Cannot open temp_layer Failed to execute (PointToRaster).</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/error-000229-cannot-open-temp-layer-failed-to/m-p/1279033#M68013</link>
      <description>&lt;P&gt;Hi. Just wondering if anyone could tell me what's wrong with the temp_layer here? I am using the temp layer to avoid problems with the&amp;nbsp;PointToRaster_conversion and data sources with joins. (error 000055)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;import arcpy&lt;BR /&gt;from arcpy.sa import *&lt;/P&gt;&lt;P&gt;arcpy.env.workspace = r"C:\Users\aazma\Desktop\Incomplete(503)\Incomplete"&lt;BR /&gt;arcpy.env.overwriteOutput = True&lt;/P&gt;&lt;P&gt;in_csv = r"C:\Users\aazma\Desktop\Incomplete(503)\Incomplete\PCBsData.csv"&lt;BR /&gt;out_raster = r"C:\Users\aazma\Desktop\Incomplete(503)\Incomplete\output.tif"&lt;/P&gt;&lt;P&gt;layer_name = "temp_layer"&lt;BR /&gt;x_field = "X"&lt;BR /&gt;y_field = "Y"&lt;BR /&gt;spatial_reference = arcpy.SpatialReference(4326)&lt;BR /&gt;arcpy.MakeXYEventLayer_management(in_csv, x_field, y_field, layer_name, spatial_reference)&lt;/P&gt;&lt;P&gt;cellsize = 0.1&lt;BR /&gt;value_field = "value"&lt;BR /&gt;assignment_type = "MEAN"&lt;BR /&gt;arcpy.PointToRaster_conversion(layer_name, value_field, out_raster, assignment_type, value_field, cellsize)&lt;/P&gt;&lt;P&gt;arcpy.Delete_management(layer_name)&lt;/P&gt;</description>
      <pubDate>Sat, 15 Apr 2023 16:31:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/error-000229-cannot-open-temp-layer-failed-to/m-p/1279033#M68013</guid>
      <dc:creator>AlexanderZirilli</dc:creator>
      <dc:date>2023-04-15T16:31:24Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR 000229: Cannot open temp_layer Failed to execute (PointToRaster).</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/error-000229-cannot-open-temp-layer-failed-to/m-p/1279039#M68016</link>
      <description>&lt;P&gt;I'd say it's having an issue accessing the layer, parentheses in the workspace path could be an issue.&amp;nbsp; Maybe write to memory or try a different workspace path, or make the temp location explicit.&amp;nbsp; psb writing to memory example:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;import arcpy
from arcpy.sa import *


arcpy.env.overwriteOutput = True

in_csv = r"C:\Users\aazma\Desktop\Incomplete(503)\Incomplete\PCBsData.csv"
out_raster = r"C:\Users\aazma\Desktop\Incomplete(503)\Incomplete\output.tif"

layer_name = r"memory\temp_layer"
x_field = "X"
y_field = "Y"
spatial_reference = arcpy.SpatialReference(4326)
arcpy.MakeXYEventLayer_management(in_csv, x_field, y_field, layer_name, spatial_reference)

cellsize = 0.1
value_field = "value"
assignment_type = "MEAN"
arcpy.PointToRaster_conversion(layer_name, value_field, out_raster, assignment_type, value_field, cellsize)

try:
  arcpy.Delete_management(layer_name)
  del layer_name
except:
  pass&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 15 Apr 2023 17:49:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/error-000229-cannot-open-temp-layer-failed-to/m-p/1279039#M68016</guid>
      <dc:creator>DavidPike</dc:creator>
      <dc:date>2023-04-15T17:49:28Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR 000229: Cannot open temp_layer Failed to execute (PointToRaster).</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/error-000229-cannot-open-temp-layer-failed-to/m-p/1281635#M68270</link>
      <description>&lt;P&gt;Added the recommendations, and removed the underscore from temp_layer, as pictured. any other ideas? my dataset is also many years of time, so potentially splitting the data into years and then processing could help? I couldn't find anything about file size limitations online but just an idea.&lt;/P&gt;&lt;P&gt;import arcpy&lt;BR /&gt;from arcpy.sa import *&lt;BR /&gt;arcpy.env.workspace = r"C:\Users\aazma\Desktop\Incomplete503\Incomplete"&lt;BR /&gt;arcpy.env.overwriteOutput = True&lt;/P&gt;&lt;P&gt;in_csv = r"C:\Users\aazma\Desktop\Incomplete503\Incomplete\PCBsData.csv"&lt;BR /&gt;out_raster = r"C:\Users\aazma\Desktop\Incomplete503\Incomplete\output.tif"&lt;/P&gt;&lt;P&gt;layer_name = r"C:\Users\aazma\Desktop\Incomplete503\Incomplete\templayer"&lt;BR /&gt;x_field = "X"&lt;BR /&gt;y_field = "Y"&lt;BR /&gt;spatial_reference = arcpy.SpatialReference(4326)&lt;BR /&gt;arcpy.MakeXYEventLayer_management(in_csv, x_field, y_field, layer_name, spatial_reference)&lt;/P&gt;&lt;P&gt;cellsize = 0.1&lt;BR /&gt;value_field = "value"&lt;BR /&gt;assignment_type = "MEAN"&lt;BR /&gt;arcpy.PointToRaster_conversion(layer_name, value_field, out_raster, assignment_type, value_field, cellsize)&lt;/P&gt;&lt;P&gt;try:&lt;BR /&gt;arcpy.Delete_management(layer_name)&lt;BR /&gt;del layer_name&lt;BR /&gt;except:&lt;BR /&gt;pass&lt;/P&gt;</description>
      <pubDate>Sat, 22 Apr 2023 17:10:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/error-000229-cannot-open-temp-layer-failed-to/m-p/1281635#M68270</guid>
      <dc:creator>AlexanderZirilli</dc:creator>
      <dc:date>2023-04-22T17:10:52Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR 000229: Cannot open temp_layer Failed to execute (PointToRaster).</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/error-000229-cannot-open-temp-layer-failed-to/m-p/1281640#M68271</link>
      <description>&lt;P&gt;Have you tried the "memory" example?&amp;nbsp; You're currently writing to your desktop/user data folder, there could be organisational or personal setup restrictions on executables writing to this location so I'd also try a folder within a drive e.g. C:\Testing\Testing.gdb&lt;/P&gt;&lt;P&gt;I'd also always try the script on a very small subset of data initially.&lt;/P&gt;</description>
      <pubDate>Sat, 22 Apr 2023 17:31:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/error-000229-cannot-open-temp-layer-failed-to/m-p/1281640#M68271</guid>
      <dc:creator>DavidPike</dc:creator>
      <dc:date>2023-04-22T17:31:13Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR 000229: Cannot open temp_layer Failed to execute (PointToRaster).</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/error-000229-cannot-open-temp-layer-failed-to/m-p/1281652#M68273</link>
      <description>&lt;P&gt;I tried a sample .csv of only a few lines, and that worked. So then I split the data up into 2001.csv, 2002.csv, etc and found that I got the same error. because of this I simply shortened each year to 150 samples, and cleaned a few columns I didn't end up using, and this worked. Below is the final version of the code, thank you for all the help!&lt;/P&gt;&lt;P&gt;import arcpy&lt;BR /&gt;from arcpy.sa import *&lt;BR /&gt;arcpy.env.workspace = r"C:\Testing"&lt;BR /&gt;arcpy.env.overwriteOutput = True&lt;/P&gt;&lt;P&gt;in_csv_list = ["2001.csv", "2002.csv", "2003.csv", "2004.csv", "2005.csv", "2006.csv", "2007.csv", "2008.csv", "2009.csv", "2010.csv", "2011.csv"]&lt;BR /&gt;for in_csv in in_csv_list:&lt;BR /&gt;out_raster = in_csv.split(".")[0] + ".tif"&lt;BR /&gt;layer_name = r"C:\Testing\templayer"&lt;BR /&gt;x_field = "X"&lt;BR /&gt;y_field = "Y"&lt;BR /&gt;spatial_reference = arcpy.SpatialReference(4326)&lt;BR /&gt;arcpy.MakeXYEventLayer_management(in_csv, x_field, y_field, layer_name, spatial_reference)&lt;/P&gt;&lt;P&gt;cellsize = 0.08&lt;BR /&gt;value_field = "Total_PCB(ppm)"&lt;BR /&gt;assignment_type = "RANGE"&lt;BR /&gt;arcpy.PointToRaster_conversion(layer_name, value_field, out_raster, assignment_type, value_field, cellsize)&lt;/P&gt;&lt;P&gt;arcpy.Delete_management(layer_name)&lt;BR /&gt;del layer_name&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 22 Apr 2023 22:00:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/error-000229-cannot-open-temp-layer-failed-to/m-p/1281652#M68273</guid>
      <dc:creator>AlexanderZirilli</dc:creator>
      <dc:date>2023-04-22T22:00:35Z</dc:date>
    </item>
  </channel>
</rss>

