Multiple ring buffer error

9054
22
02-02-2011 03:15 AM
LuděkKrtička
New Contributor II
Hello,
I am having problems with Multiple Ring Buffer tool in ArcGIS 10. Not working for me, even for my colleagues. I searched forum, but no help solving my case. After selecting input layer, when you start to define distances following error occures:
ERROR
updateParameters Execution Error:
Runtime error: 'ascii' codec can't decode byte 0xa0 in position 0: ordinal not in range(128)

file with screenshot:
http://www1.osu.cz/~krticka/MultipleRingBufferError.jpg

My system info:
Microsoft® Windows Vista�?� Business , Service Pack 2
ArcGIS 10 SP1
Microsoft .NET Framework 3.5 SP1
Python 2.6.5 (Python files and subfolders are in c:\Python26\ArcGIS10.0\)

Thank you for any help.

Ludek Krticka
0 Kudos
22 Replies
NiklasNorrthon
Occasional Contributor III
Python 2.x actually supports unicode better than most programming languages. But as in other languages you have to think to get it done correctly, and since ArcGIS is developed in US, and non-ascii characters is something strange there, the developers are not used to thinking about this problem and they get it wrong most of the time.

The correct way to program python, is to use unicode strings instead of standard strings all the time. (To do that just put a u in from of the string literals). Then encode the strings to UTF-8, latin-1 or whatever just before writing to somehing that doesn't understand unicode, and decode immediatly when reading from something that doesn't provide unicode (like text files).

In Python 3 this is enforced, since standard strings are now unicode, and if you want something else (like byte strings) you must say so explicitly. But most of the unicode functionality is already in place in Python 2.
0 Kudos
JamieMacKay
New Contributor
I'm also having problems. I have been unable to generate dissolved multiple ring buffers using version 9.3.1 (which I gather is a well known bug) so I tracked down another machine with version 10. So far no success using the XY data attached. I'm trying to draw buffers at 18, 29 and 35m around each point, the tool produced an 18m buffer which didn't have any relation to the data points and was just a large rectangle somewhere on the screen. Please help!

Jamie
0 Kudos
DavidWynne
Esri Contributor
Hello,
I am having problems with Multiple Ring Buffer tool in ArcGIS 10. Not working for me, even for my colleagues. I searched forum, but no help solving my case. After selecting input layer, when you start to define distances following error occures:
ERROR
updateParameters Execution Error:
Runtime error: 'ascii' codec can't decode byte 0xa0 in position 0: ordinal not in range(128)


Hi Ludek,
I believe this issue you're describing is covered by this bug report: http://resources.arcgis.com/content/nimbus-bug?bugID=TklNMDYyNDk3

-Dave
0 Kudos
IrshadJamal
New Contributor II
Greetings,

Have any of you folks found a workaround for the multiple ring buffer error? I am in the same predicament as you when buffering at a distance of 2000m. I am using ArcGIS 9.3.

Would very much appreciate your feedback

Thanks.

Irshad
0 Kudos
DonFerguson
New Contributor III
I am also having a problem with the Multiple Ring Buffer.  The error seems to be in dissolving the rings into seperate features.  The script generates the rings, merges them but the dissolve either crashes or doesn't actually dissolve all of the rings into separate features.

thoughts?
Don Ferguson
0 Kudos
MichalBrach
New Contributor
I had this same error so I wrote to ESRI Poland help-desk.

Here is an answer:

  1. Create new Toolbox in ArcCatalog

  2. Add it to ArcToolbox

  3. Copy Multiple Ring Buffer to your new Toolbox

  4. Right click -> Properties -> Validation -> Edit

  5. Open script

  6. Find: locale.setlocale(locale.LC_NUMERIC, '')

  7. Correct it to: locale.setlocale(locale.LC_NUMERIC, 'C')


In my situation it works correctly now. I have ArcGIS 10 SP2 and Windows 7 OS.
0 Kudos
DonFerguson
New Contributor III
I think I have it working now.

This was a statement in the original script:

codeblock = '''def pullDistance(distL, *fids):
return min([i for i, j in zip(distL, fids) if j != -1])'''


I changed it to the following:

codeblock = '''def pullDistance(distL, *fids):
return min([i for i, j in zip(distL, fids) if j == 1])'''

and now it seems to be working. Not sure if this fix is universal though.
0 Kudos
SabrinaKlein
New Contributor
I am having a similar issue with the multiple ring buffer.
I can run one ring, but not more than one. It also completes but the layer itself doesn't show up on the table of contents or map. I have waited 45 min- hour for it to do so. I have left the pre-generated file name and location, changed the file name and location to "multbuff" and left it. Maybe I am missing something. My prof told me it takes a little while to use it. Yet the other day I did a five ring buffer in about 5 minutes. Now it wont do it. Please help.
Much thanks,
Elvenlotus
0 Kudos
MelanieHans
New Contributor
I have been getting the same error in ArcCatalog 10. Is there a way to see where it is hanging up? When you look in Geoprocessing - Results it just says failed.
0 Kudos
MarcelHoule
New Contributor
I think I have it working now.

This was a statement in the original script:

codeblock = '''def pullDistance(distL, *fids):
return min([i for i, j in zip(distL, fids) if j != -1])'''


I changed it to the following:

codeblock = '''def pullDistance(distL, *fids):
return min([i for i, j in zip(distL, fids) if j == 1])'''

and now it seems to be working. Not sure if this fix is universal though.


I tried that but got the same error.
0 Kudos