<?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 Visual Studio Code do not save files to disk (ArcGIS Pro conda based envs) in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/visual-studio-code-do-not-save-files-to-disk/m-p/1259708#M66895</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I want to write python scripts in Visual Studio Code and use arcpy module. ArcGIS Pro 3.x and Anaconda 3 are installed.&lt;BR /&gt;First, I had a problem with “conda” message – “The term 'conda' is not recognized as the name of a cmdlet, function, script file, or operable program”. I solved the touble by this link:&lt;BR /&gt;&lt;A href="https://stackoverflow.com/questions/56314710/the-term-conda-is-not-recognized-as-the-name-of-a-cmdlet" target="_blank"&gt;https://stackoverflow.com/questions/56314710/the-term-conda-is-not-recognized-as-the-name-of-a-cmdlet&lt;/A&gt;&lt;/P&gt;&lt;P&gt;But now I'm solving another problem - when using conda-based python interpreters:&lt;BR /&gt;C:\Users\USER\AppData\Local\ESRI\conda\envs\arcgispro-py3-clone\python.exe&lt;BR /&gt;or C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\python.exe&lt;BR /&gt;files are not written to disk at all. For example:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;f = open(r"C:\_work\Output.txt","a")&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;f.close()&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;import arcpy&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;arcpy.FeatureClassToFeatureClass_conversion(r"C:\_work\File_A.shp", r"C:\_work", "File_B.shp")&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;After running this realy simple code, I don’t get any errors or warnings. But neither file &lt;STRONG&gt;Output.txt&lt;/STRONG&gt; nor file &lt;STRONG&gt;File_B.shp&lt;/STRONG&gt; &lt;STRONG&gt;cannot be found&lt;/STRONG&gt; in C:\_work folder&lt;/P&gt;&lt;P&gt;When I run this line of code again:&lt;BR /&gt;&lt;EM&gt;arcpy.FeatureClassToFeatureClass_conversion(r"C:\_work\File_A.shp", r"C:\_work", "File_B.shp")&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;I'm getting his message:&lt;BR /&gt;arcpy.FeatureClassToFeatureClass_conversion(r"C:\_work\File_A.shp", r"C:\_work", "File_B.shp") arcgisscripting.ExecuteError: ERROR 000258: Output C:\_work\File_B.shp already exists Failed to execute (FeatureClassToFeatureClass). &lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="VSC_file_already_exists.PNG" style="width: 498px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/63210i06ABC7ADE5115E39/image-dimensions/498x244?v=v2" width="498" height="244" role="button" title="VSC_file_already_exists.PNG" alt="VSC_file_already_exists.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;But there &lt;STRONG&gt;is no file&lt;/STRONG&gt; File_B.shp in my folder C:\_work&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;When I run this piece of code with a different python interpreter in Visual Studio Code (e.g.: C:\Users\USER\AppData\Local\Microsoft\WindowsApps\python3.9.exe)&lt;BR /&gt;&lt;EM&gt;f = open(r"C:\_work\Output.txt","a")&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;f.close()&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;the file Output.txt is created &lt;STRONG&gt;without any problems&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Does anybody know where the problem could be?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards, Petr&lt;/P&gt;</description>
    <pubDate>Sun, 19 Feb 2023 15:45:24 GMT</pubDate>
    <dc:creator>PetrSTASTNY</dc:creator>
    <dc:date>2023-02-19T15:45:24Z</dc:date>
    <item>
      <title>Visual Studio Code do not save files to disk (ArcGIS Pro conda based envs)</title>
      <link>https://community.esri.com/t5/python-questions/visual-studio-code-do-not-save-files-to-disk/m-p/1259708#M66895</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I want to write python scripts in Visual Studio Code and use arcpy module. ArcGIS Pro 3.x and Anaconda 3 are installed.&lt;BR /&gt;First, I had a problem with “conda” message – “The term 'conda' is not recognized as the name of a cmdlet, function, script file, or operable program”. I solved the touble by this link:&lt;BR /&gt;&lt;A href="https://stackoverflow.com/questions/56314710/the-term-conda-is-not-recognized-as-the-name-of-a-cmdlet" target="_blank"&gt;https://stackoverflow.com/questions/56314710/the-term-conda-is-not-recognized-as-the-name-of-a-cmdlet&lt;/A&gt;&lt;/P&gt;&lt;P&gt;But now I'm solving another problem - when using conda-based python interpreters:&lt;BR /&gt;C:\Users\USER\AppData\Local\ESRI\conda\envs\arcgispro-py3-clone\python.exe&lt;BR /&gt;or C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\python.exe&lt;BR /&gt;files are not written to disk at all. For example:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;f = open(r"C:\_work\Output.txt","a")&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;f.close()&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;import arcpy&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;arcpy.FeatureClassToFeatureClass_conversion(r"C:\_work\File_A.shp", r"C:\_work", "File_B.shp")&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;After running this realy simple code, I don’t get any errors or warnings. But neither file &lt;STRONG&gt;Output.txt&lt;/STRONG&gt; nor file &lt;STRONG&gt;File_B.shp&lt;/STRONG&gt; &lt;STRONG&gt;cannot be found&lt;/STRONG&gt; in C:\_work folder&lt;/P&gt;&lt;P&gt;When I run this line of code again:&lt;BR /&gt;&lt;EM&gt;arcpy.FeatureClassToFeatureClass_conversion(r"C:\_work\File_A.shp", r"C:\_work", "File_B.shp")&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;I'm getting his message:&lt;BR /&gt;arcpy.FeatureClassToFeatureClass_conversion(r"C:\_work\File_A.shp", r"C:\_work", "File_B.shp") arcgisscripting.ExecuteError: ERROR 000258: Output C:\_work\File_B.shp already exists Failed to execute (FeatureClassToFeatureClass). &lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="VSC_file_already_exists.PNG" style="width: 498px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/63210i06ABC7ADE5115E39/image-dimensions/498x244?v=v2" width="498" height="244" role="button" title="VSC_file_already_exists.PNG" alt="VSC_file_already_exists.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;But there &lt;STRONG&gt;is no file&lt;/STRONG&gt; File_B.shp in my folder C:\_work&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;When I run this piece of code with a different python interpreter in Visual Studio Code (e.g.: C:\Users\USER\AppData\Local\Microsoft\WindowsApps\python3.9.exe)&lt;BR /&gt;&lt;EM&gt;f = open(r"C:\_work\Output.txt","a")&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;f.close()&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;the file Output.txt is created &lt;STRONG&gt;without any problems&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Does anybody know where the problem could be?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards, Petr&lt;/P&gt;</description>
      <pubDate>Sun, 19 Feb 2023 15:45:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/visual-studio-code-do-not-save-files-to-disk/m-p/1259708#M66895</guid>
      <dc:creator>PetrSTASTNY</dc:creator>
      <dc:date>2023-02-19T15:45:24Z</dc:date>
    </item>
    <item>
      <title>Re: Visual Studio Code do not save files to disk (ArcGIS Pro conda based envs)</title>
      <link>https://community.esri.com/t5/python-questions/visual-studio-code-do-not-save-files-to-disk/m-p/1260087#M66908</link>
      <description>&lt;P&gt;Since the command says the file exists my guess is the files are really there and that you need to refresh whatever tool you are using to see them.&lt;/P&gt;&lt;P&gt;What does this tell you? True or False?&lt;/P&gt;&lt;P&gt;import os&lt;/P&gt;&lt;P&gt;os.path.exists(r"C:\_work\Output.txt")&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;arcpy.Exists(r"C:\_work\File_B.shp")&lt;/P&gt;&lt;P&gt;Hope this helps&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Feb 2023 16:26:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/visual-studio-code-do-not-save-files-to-disk/m-p/1260087#M66908</guid>
      <dc:creator>Brian_Wilson</dc:creator>
      <dc:date>2023-02-21T16:26:32Z</dc:date>
    </item>
  </channel>
</rss>

