|
POST
|
To narrow it down, could you try drag/drop into a system tool like copy features? Does it still crash. This would tell us if it is specific to your tool or not.
... View more
12-21-2012
01:20 PM
|
0
|
0
|
1429
|
|
POST
|
Do you know if it crashes when you create a reference to the mxd or when you attempt to list the layers? I find I can get a reference to a 10.1 mxd from 10.0 fine, but then when it try to do stuff it raises exceptions, doesn't explain the crash, but might help us workaround it.
... View more
12-21-2012
12:19 PM
|
0
|
0
|
1378
|
|
POST
|
Adam, which version and sp are you at? I can't reproduce the crash at 10.1 sp1, but I will say drag/drop or referencing a layer from an inactive data frame has never been supported. You can see this if you click the drop-down in the parameter it will only show you the layers from the active data frame. You should get an error on the parameter saying the input dataset doesn't exist. However, it still shouldn't crash and if we can reproduce it I would like to log a bug.
... View more
12-20-2012
02:41 PM
|
0
|
0
|
1429
|
|
POST
|
Ok, I think I got it. It seems to just be a file associations issue. If I install Desktop first then Server, I am finding that launching IDLE from the 32 bit install location, C:\Python27\ArcGIS10.1\Lib\idlelib will load IDLE with the 64 bit version of python. This is because when you install the 64 bit version of python last the file association for .py and .pyw files becomes C:\Python27\ArcGISx6410.1\pythonw.exe. So when you double-click the idle.pyw it is executed using the 64 bit pythonw.exe. So you just need to modify the default file associations of .pyw to point to C:\Python27\ArcGIS10.1\pythonw.exe. Alternatively you can see the same from command line: C:\>C:\Python27\ArcGIS10.1\pythonw.exe C:\Python27\ArcGIS10.1\Lib\idlelib\idle.pyw (Opens IDLE with 32 bit version of python) C:\>C:\Python27\ArcGISx6410.1\pythonw.exe C:\Python27\ArcGIS10.1\Lib\idlelib\idle.pyw (Opens IDLE with 64 bit version of python)
... View more
09-18-2012
10:30 AM
|
0
|
0
|
4573
|
|
POST
|
Ok thats good, it is a little bit clearer now ArcGIS Desktop is using the right version of Python. The problem just comes down to why even though you have set the Editor in the Geoprocessing Options to the 32 bit version of IDLE is it opening the 64 bit version when you right-click the Python Toolbox and select Edit? I don't really know the answer to that, you could log a new incident with Tech Support and we could try to troubleshoot it. You might also try installing another Python IDE like PythonWin or PyScripter and pointing it to one of those IDEs to see if it makes a difference. Until you are able to resolve it you could always open the 32 bit version of IDLE from your desktop and browse and open the .pyt file from disk, rather than launching it from Catalog.
... View more
09-17-2012
11:28 AM
|
0
|
0
|
3437
|
|
POST
|
No that is right. So do you get an error if you import arcpy in the python window from ArcMap or ArcCatalog? If you right-click a folder in Catalog and go to New > Python Toolbox does it display with a Red X without making any changes to the code?
... View more
09-14-2012
03:53 PM
|
0
|
0
|
3437
|
|
POST
|
If you type "import arcpy" in the python window in ArcMap or ArcCatalog do you get the same exception. Could you go to start > run and type regedit and click ok. Then browse to: HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\ESRI\Python10.1, what is the value for PythonDir? Also: HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Python\PythonCore\2.7\InstallPath, what is it's value?
... View more
09-14-2012
09:56 AM
|
0
|
0
|
3437
|
|
POST
|
A couple things, I don't know why if you have pointed the editor and debugger to the 32 bit installation of IDLE in the Geoprocessing options why it would open the 64 bit installation. I might recommend you just try to clear out the path and reapply it again. Also when you say you run the tool and get the error do you mean if you run the tool from IDLE after you click to edit the python toolbox, or do you also get the exception in ArcMap or ArcCatalog? I would think if an exception was raised while importing arcpy you would see a red X on the toolbox in ArcCatalog and you wouldn't be able to double-click to open the tool. Are you able to run the tool from the application? Are you only seeing this problem if you try to run the tool from the IDE?
... View more
09-14-2012
08:32 AM
|
0
|
0
|
3437
|
|
POST
|
You should have 2 different versions of IDLE installed as a result as well. The one that you will find in the shortcut from Start > All Programs > ArcGIS > Python 2.7 will correspond to the last one you installed, in this case it seems Server and the 64 bit version. You could go directly to the 32 bit version and launch IDLE by double-clicking the file, most likely located at: C:\Python27\ArcGIS10.1\Lib\idlelib\idle.pyw Should could add a shortcut to this or update the current shortcut in the start menu by opening the You could also right-click Idle from the Start Menu and open its properties to adjust which version it is pointing to.
... View more
09-13-2012
11:14 AM
|
0
|
0
|
3437
|
|
POST
|
I would recommend anyone experiencing crashes at 10.1 that are hard to narrow down to contact Technical Support. The forums are a great resource for asking specific questions but when a problem requires a lot of work to narrow down and isolate the issue it is most efficiently done by working with Technical Support.
... View more
09-07-2012
10:02 AM
|
0
|
0
|
1413
|
|
POST
|
What license level do you have? If you have ArcInfo/Advanced you can just use the Feature to Point GP tool. If you don't, then you would just need to create a cursor to loop through the polygon FC, grab the Geometry from the Shape field and get the Centroid property from the Geometry which returns a Point object.
... View more
08-20-2012
03:36 PM
|
0
|
0
|
401
|
|
POST
|
We are using a new engine for reading and writing to text files at 10.1, however we should still honor schema.ini files. It would be helpful to get a sample of your text file and the schema.ini to test the issue. In addition, i would recommend just running the GP tool from Desktop to take python out of the equation, the problem will likely still be reproducible.
... View more
08-17-2012
01:14 PM
|
0
|
1
|
1883
|
|
POST
|
Additional info, I get the same error as you if I attempt to enter all the parameters in the same order as specified in the function's signature. >>> rows = arcpy.da.UpdateCursor("U.S. Cities", fields, None, None, False, (None, 'Order By STATE_NAME, TYPE DESC'))
Runtime error
Traceback (most recent call last):
File "<string>", line 1, in <module>
TypeError: expected callable function - logger(obj) This seems to be a bug, I will look into this further. Using sql_clause= instead works. >>> rows = arcpy.da.UpdateCursor("U.S. Cities", fields, None, None, False, sql_clause=(None, 'Order By STATE_NAME, TYPE DESC'))
... View more
08-13-2012
02:00 PM
|
0
|
0
|
1733
|
|
POST
|
Thanks Chris I'm thinking the "fancy" SQL parameter is the 6th one down the line, so it probably should be something like this: arcpy.da.UpdateCursor(oesfHydroDislvFC, fieldList, None, None, False, (None, 'ORDER_BY SL_WTRTY_CD, RIP_COMBO_UID DESC')) But that is thowing an error: Traceback (most recent call last): File "<interactive input>", line 1, in <module> TypeError: expected callable function - logger(obj) Been trying a lot of things for a while - with nothing working out... If you used a named parameter than you don't have to specify the value for every optional paramater to the function. This makes your code a lot easier to write and read and sometimes resolves errors that may have accidentally been added. So since you are just accepting the defaults for the 3rd 4th and 5th parameter you could change your code to: arcpy.da.UpdateCursor(oesfHydroDislvFC, fieldList, sql_clause=(None, 'ORDER_BY SL_WTRTY_CD, RIP_COMBO_UID DESC')) Also make sure the input is a Geodatasbase Feature Class, the sql_clause paramater does not work on shapefiles. I just tested this similar expression on my data and it worked as expected. If you remove the sql_clause paramater is the cursor created succesfully? Did you want to share a small subset of your data?
... View more
08-13-2012
01:48 PM
|
0
|
0
|
1733
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 06-02-2011 03:59 PM | |
| 1 | 06-10-2011 08:37 AM | |
| 1 | 06-08-2011 04:27 PM | |
| 1 | 06-07-2011 03:11 PM | |
| 1 | 01-31-2013 02:36 PM |
| Online Status |
Offline
|
| Date Last Visited |
11-11-2020
02:22 AM
|