is there any space limit in ascii files???

896
5
11-12-2012 08:46 AM
irinivozinaki
New Contributor III
Hello everyone!

I would like to ask if there is a space limit for ascii files in python.

For some reason I am writing some data in an ascii file and while everything seems to be ok... suddenly the code crashes and an error appears saying that something goes wrong with the delimiter "w+"

Do you have any idea why???
Tags (2)
0 Kudos
5 Replies
MikeHunter
Occasional Contributor
Files are not limited by size except by the amount of memory on your machine or memory the OS can handle, and not always by that, depending on what you are doing with it.  Post the error message and maybe we can help further.

Mike
0 Kudos
irinivozinaki
New Contributor III
This is the error that comes out:

IOError: [Errno 22] invalid mode ('w+') or filename: 'test.asc'

Thank you very much...
0 Kudos
irinivozinaki
New Contributor III
I would like to add something


When running the same code in a smaller grid (4x5) everything is ok!!! The problems appears in the big grid (300 x 300).
0 Kudos
irinivozinaki
New Contributor III
I have changed the file extension from "asc" to "ascii" and everything is running!!!

But unfortunately another problem comes up.

I need to convert this "ascii" file into raster and when I am using the command "arcpy.ASCIIToRaster_conversion" there is no way to use a file with the extension "ascii"... The file must have an "asc" extension. Why? Which is the difference between these two extensions?
0 Kudos
RaphaelR
Occasional Contributor II
try renaming it to "filename.txt", or "filename.asc".
0 Kudos