Error 999998 Saving Raster with ArcpyError 999998 when saving raster dataset after using any raster algebra...

Integer but not Laurent sequences

Can someone explain what a key is?

How do I add a strong "onion flavor" to the biryani (in restaurant style)?

Are all power cords made equal?

What could cause an entire planet of humans to become aphasic?

EM Vs PM Speaker

What is this mysterious *green square* on my Content Editor?

Is Developer Console going to be deprecated?

What is the reward?

When distributing a Linux kernel driver as source code, what's the difference between Proprietary and GPL license?

Are one-line email responses considered disrespectful?

Coworker asking me to not bring cakes due to self control issue. What should I do?

Is layered encryption more secure than long passwords?

Did ancient Germans take pride in leaving the land untouched?

In a post apocalypse world, with no power and few survivors, would Satnav still work?

Including proofs of known theorems in master's thesis

Is the percentage symbol a constant?

How to know you are over-explaining and oversimplifying a subject?

What is an efficient way to digitize a family photo collection?

Expression for "unconsciously using words (or accents) used by a person you often talk with or listen to"?

Crack the bank account's password!

How to deal with an underperforming subordinate?

Is it possible to narrate a novel in a faux-historical style without alienating the reader?

bash aliases do not expand even with shopt expand_aliases



Error 999998 Saving Raster with Arcpy


Error 999998 when saving raster dataset after using any raster algebra functions in ArcPy?













0















To start, I found a similar question posted on stack exchange here, but I am not using the zonal statistics tool, which the answer to that question is based on.



With that out of the way, I'm attempting to write a very simple arcpy script.
The purpose of the script is to reclassify the values of an input raster, and save the output to a folder.



Currently I'm using this script in a toolbox. I am using arcpy "GetParameterAsText" to determine the input file and output folder.
I have tried using raw file paths instead of using GetParameter, but the script still fails. The file paths I use never include spaces, so I think that can be ruled out.



Here is the code:



#Import libraries
import arcpy, sys, os
arcpy.env.overwriteOutput = True
from arcpy import env
from arcpy.sa import *

#Have tried GetParameter as well as raw file paths/names
input = arcpy.GetParameterAsText(0)
saveFolder = arcpy.GetParameterAsText (1)

#Have confirmed following line works using the python window within arcmap
planAreas = Reclassify(input, "VALUE", RemapRange([[100, 169, 0], [170, 179, 1]]))

planAreas.save(saveFolder) #Crashes here


If I run just the "Reclassify" function in the ArcMap python window, it successfully saves an output as a feature class in Default.gdb.
Running the very same code, but in an python script using the save function, crashes with the dreaded error 999998.



I am using Arc version 10.6.1









share



























    0















    To start, I found a similar question posted on stack exchange here, but I am not using the zonal statistics tool, which the answer to that question is based on.



    With that out of the way, I'm attempting to write a very simple arcpy script.
    The purpose of the script is to reclassify the values of an input raster, and save the output to a folder.



    Currently I'm using this script in a toolbox. I am using arcpy "GetParameterAsText" to determine the input file and output folder.
    I have tried using raw file paths instead of using GetParameter, but the script still fails. The file paths I use never include spaces, so I think that can be ruled out.



    Here is the code:



    #Import libraries
    import arcpy, sys, os
    arcpy.env.overwriteOutput = True
    from arcpy import env
    from arcpy.sa import *

    #Have tried GetParameter as well as raw file paths/names
    input = arcpy.GetParameterAsText(0)
    saveFolder = arcpy.GetParameterAsText (1)

    #Have confirmed following line works using the python window within arcmap
    planAreas = Reclassify(input, "VALUE", RemapRange([[100, 169, 0], [170, 179, 1]]))

    planAreas.save(saveFolder) #Crashes here


    If I run just the "Reclassify" function in the ArcMap python window, it successfully saves an output as a feature class in Default.gdb.
    Running the very same code, but in an python script using the save function, crashes with the dreaded error 999998.



    I am using Arc version 10.6.1









    share

























      0












      0








      0








      To start, I found a similar question posted on stack exchange here, but I am not using the zonal statistics tool, which the answer to that question is based on.



      With that out of the way, I'm attempting to write a very simple arcpy script.
      The purpose of the script is to reclassify the values of an input raster, and save the output to a folder.



      Currently I'm using this script in a toolbox. I am using arcpy "GetParameterAsText" to determine the input file and output folder.
      I have tried using raw file paths instead of using GetParameter, but the script still fails. The file paths I use never include spaces, so I think that can be ruled out.



      Here is the code:



      #Import libraries
      import arcpy, sys, os
      arcpy.env.overwriteOutput = True
      from arcpy import env
      from arcpy.sa import *

      #Have tried GetParameter as well as raw file paths/names
      input = arcpy.GetParameterAsText(0)
      saveFolder = arcpy.GetParameterAsText (1)

      #Have confirmed following line works using the python window within arcmap
      planAreas = Reclassify(input, "VALUE", RemapRange([[100, 169, 0], [170, 179, 1]]))

      planAreas.save(saveFolder) #Crashes here


      If I run just the "Reclassify" function in the ArcMap python window, it successfully saves an output as a feature class in Default.gdb.
      Running the very same code, but in an python script using the save function, crashes with the dreaded error 999998.



      I am using Arc version 10.6.1









      share














      To start, I found a similar question posted on stack exchange here, but I am not using the zonal statistics tool, which the answer to that question is based on.



      With that out of the way, I'm attempting to write a very simple arcpy script.
      The purpose of the script is to reclassify the values of an input raster, and save the output to a folder.



      Currently I'm using this script in a toolbox. I am using arcpy "GetParameterAsText" to determine the input file and output folder.
      I have tried using raw file paths instead of using GetParameter, but the script still fails. The file paths I use never include spaces, so I think that can be ruled out.



      Here is the code:



      #Import libraries
      import arcpy, sys, os
      arcpy.env.overwriteOutput = True
      from arcpy import env
      from arcpy.sa import *

      #Have tried GetParameter as well as raw file paths/names
      input = arcpy.GetParameterAsText(0)
      saveFolder = arcpy.GetParameterAsText (1)

      #Have confirmed following line works using the python window within arcmap
      planAreas = Reclassify(input, "VALUE", RemapRange([[100, 169, 0], [170, 179, 1]]))

      planAreas.save(saveFolder) #Crashes here


      If I run just the "Reclassify" function in the ArcMap python window, it successfully saves an output as a feature class in Default.gdb.
      Running the very same code, but in an python script using the save function, crashes with the dreaded error 999998.



      I am using Arc version 10.6.1







      arcpy arcgis-10.6 error-999998





      share












      share










      share



      share










      asked 1 min ago









      sockssocks

      9617




      9617






















          0






          active

          oldest

          votes











          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "79"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fgis.stackexchange.com%2fquestions%2f313281%2ferror-999998-saving-raster-with-arcpy%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes
















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Geographic Information Systems Stack Exchange!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fgis.stackexchange.com%2fquestions%2f313281%2ferror-999998-saving-raster-with-arcpy%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Щит и меч (фильм) Содержание Названия серий | Сюжет |...

          is 'sed' thread safeWhat should someone know about using Python scripts in the shell?Nexenta bash script uses...

          Meter-Bus Содержание Параметры шины | Стандартизация |...