This repository was created to provide a public location to record and display the status of "issues" for the SNAP application. The SNAP developers will acknowledge, provide (and maybe request) feedback on the reported issues, and in general use the information to improve SNAP code.
3
stars
0
forks
source link
SNAP Python Example Error for "Write an Output File" #25
If you add a python script job stream and select “Insert Example” > “Write an Output File” you get:
# Retrieve the name and location of an output file by its label
outFileName = get_output_file('output1')
# Open the file
outFile = open(outFileName, 'w')
# TODO: Insert your output code here.
# Close the file
outFile.close()
But this doesn’t work. You’d need to change the ‘open’ command to:
If you add a python script job stream and select “Insert Example” > “Write an Output File” you get:
But this doesn’t work. You’d need to change the ‘open’ command to:
outFile = open(outFileName.get_location(), 'w')