Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

After using arcpy and python for months with ArcGIS 10.1 without any problems I'm encountering something I can't work around or even find help with online. Something as simple as "import arcpy" is failing for no reason I can think of:

>>> import arcpy
Traceback (most recent call last):
  File "<interactive input>", line 1, in <module>
  File "C:\Program Files\ArcGIS\Desktop10.1\arcpy\arcpy\", line 24, in <module>
    from arcpy.toolbox import *
  File "C:\Program Files\ArcGIS\Desktop10.1\arcpy\arcpy\", line 342, in <module>
    from management import Graph, GraphTemplate
  File "C:\Program Files\ArcGIS\Desktop10.1\arcpy\arcpy\", line 153
SyntaxError: Non-ASCII character '\xe2' in file C:\Program Files\ArcGIS\Desktop10.1\arcpy\arcpy\ on line 154, but no encoding declared; see for details

I've looked around and I've seen other people with similar symptomes but nothing with the same last message, the Non-ASCII character '\xe2' in file C:\Program Files\ArcGIS\Desktop10.1\arcpy\arcpy\ on line 154, but no encoding declared; part seems different.

I haven't done anything like installing new python extensions or versions or any other type of software. The only thing remotely related was that I had an FME process working in the background while I was testing my code. I didn't modify any pre-existing ArcGIS python scripts.

I have tried using IDLE installed by ArcGIS 10.1, pyscripter, and the Python window that can be opened inside of ArcGIS. I tried rebooting on the off chance it was some fluke. The only thing I can think of to try next is a fresh instal, and if that doesn't work maybe going as extreme as wiping the PC's OS and starting over from scratch.

Any help would be greatly appreciated.

share|improve this question
Sounds like you might have some file system corruption going on. I would back up your important work and then check your file system for errors. Off topic for this site of course so hit up Google. – blah238 Feb 8 '13 at 22:17
Just sounds like a bad installation to me. You may need to reinstall. – Jason Scheirer Feb 8 '13 at 23:02

For me a basic uninstall/reinstall of ArcGIS 10.1 is relatively painless taking perhaps 30 mins in total, so as @JasonScheirer says I would try that for a possible quick fix - but take care if your install has lots installed on top of it.

If you have not read the bottom of this page from the Online Help about Paths and Import it may be worth doing so (although it may not be related to this specific problem).

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.