g.stanny

Python - arcpy problems

Discussion created by g.stanny on Mar 26, 2012
Latest reply on Apr 3, 2012 by g.stanny
Hi

After big crash at my laptop my PythonWin doesnt work propertly. Anything what I want to do form arcpy doesnt work. Anybody knows what to do?
For example:

"import arcpy
from arcpy import env"

and python answer is:
"Traceback (most recent call last):
  File "C:\Python26\ArcGIS10.0\Lib\site-packages\pythonwin\pywin\framework\scriptutils.py", line 325, in RunScript
    exec codeObject in __main__.__dict__
  File "D:\GIS\Cwiczenia\Python\arcpy.py", line 2, in <module>
    from arcpy import env
ImportError: cannot import name env"

or another example:

"import arcpy
from arcpy import sys"

and python answer is:
"Traceback (most recent call last):
  File "C:\Python26\ArcGIS10.0\Lib\site-packages\pythonwin\pywin\framework\scriptutils.py", line 325, in RunScript
    exec codeObject in __main__.__dict__
  File "D:\GIS\Cwiczenia\Python\arcpy.py", line 2, in <module>
    from arcpy import sys
ImportError: cannot import name sys"


I reinstal PythonWin, repair ArcGis but nothing works. Still the same.
Anything, what I want to do connect with arcpy give the same error "File "C:\Python26\ArcGIS10.0\Lib\site-packages\pythonwin\pywin\framework\scriptutils.py", line 325, in RunScript
    exec codeObject in __main__.__dict__and..."

Anybody knows what to fix it.

Outcomes