Select to view content in your preferred language

Weird Issue with Wing

933
3
11-24-2009 09:22 AM
TedCronin
MVP Alum
ImportError: DLL load failed: The specified module could not be found
File "c:\GIS\94\template_launch.py", line 1, in <module>
import arcpy
File "C:\Program Files\ArcGIS\Desktop9.4\arcpy\arcpy\__init__.py", line 3, in <module>
from geoprocessing import gp
File "C:\Program Files\ArcGIS\Desktop9.4\arcpy\arcpy\geoprocessing\__init__.py", line 1, in <module>
from _base import *
File "C:\Program Files\ArcGIS\Desktop9.4\arcpy\arcpy\geoprocessing\_base.py", line 1, in <module>
import arcgisscripting



In the python window, the following completes:

>>> import arcpy
>>> from arcpy import env as ENV
>>> from arcpy import mapping as MAP
>>> ENV.workspace = r'C:\GIS\94\Templates'
>>> wrksp = ENV.workspace
>>> print wrksp
C:\GIS\94\Templates
>>>


In the python window in WING, the following completes.

Python 2.6.4 (r264:75708, Oct 26 2009, 08:23:19) [MSC v.1500 32 bit (Intel)]
Type "help", "copyright", "credits" or "license" for more information.
>>> import arcpy
>>> from arcpy import mapping as MAP
>>> from arcpy import env as ENV
>>> ENV.workspace = r'C:\GIS\94\Templates'
>>> wrksp = ENV.workspace
>>> print wrksp
C:\GIS\94\Templates
>>>


Another issue being encountered is the intellisense for wing vs either the python shell or python window

There needs to be consistent behavior between all of these windows for python.

In the ESRI Python window, when I type:
ENV.          (workspace is listed)

In the python shell, when I type:
ENV.          (workspace is listed)

In Wing IDE, when I type:
ENV.          (no workspace is listed)
0 Kudos
3 Replies
JasonScheirer
Esri Alum
Looks like a few late v. early binding issues and a misconfiguration on the part of Wing.

1. arcgisscripting should ALWAYS show up. Wing seems to synthesize its own import paths, and ignores the addition of the Desktop94.pth file installed in the system Python path that adds the ArcGIS stack to the import path.

2. The environment variable listings (arcpy.env.*) are currently calculated at runtime on-the-fly. Anything that uses static analysis, Wing included, will not be able to give intellisense for arcpy.env.* in its current state.
0 Kudos
TedCronin
MVP Alum
This is Wing Personal 3.1/3.2 (First 3.1, then I upgraded). We have Wing 101 on another machine (Jesusa's Machine), and it seemed to work correctly. Wing Pro has not been tested, but I assume it should work. Will have to come up with something or move to another machine, because this is going to be quite limiting.

I think this is related to your install fiasco, where you install 2.6.2, and if I have geodjango running with 2.6.1, I now have two instances and hence a problem with running wing. That is my bet. I have a few different modules outside of esri on this particular machine. For beta 2, now that I know of this esri limitation, I will have to clean up this machine, and just know that this is a going to be a huge issue, and perhaps just have that sort of py dev on a completely separate machine away from arcpy.
0 Kudos
TedCronin
MVP Alum
Wing on another machine is good to go.  You can definitely tell who esri favors in the ide space (I like wing too:)).  Much more integrated.  Not testing pyWin, though, so I bet that is pretty good too.

Not as slow for importing arcpy as gp

hello arcpy!!!!



At beta 2, I will just rebuild all the py stuff on my other sde machine, which should fix all the bad karma thats taking place over there, but then maybe its just that arcmap likes the killers.
0 Kudos