POST
|
08-29-2024
09:54 AM
|
0
|
0
|
1048
|
POST
|
After much struggle - PythonWin lives at ArcGIS Pro v3.3.1! For future reference, the PythonWin.exe installer no longer works for Pro 3.3.1 – at least in Pro’s anaconda environment - and you seemly have to install via command prompt. After installing Pro 3.3.1, to globally install PythonWin (and the 'pywin32' module) to the base ArcGIS Pro Python install: Start a command window Execute the following lines: cd C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3 python -m pip install --upgrade pywin32 python Scripts/pywin32_postinstall.py -install #this step is needed for the global install My issue was that I had (only partially) installed PythonWin via the .exe installer, which was fudging up the whole thing.... pip wouldn't work... all messed up. After uninstalling and cleaning all that mess up it finally worked. Hooray!
... View more
08-29-2024
08:23 AM
|
1
|
0
|
488
|
POST
|
After much struggle - PythonWin lives at ArcGIS Pro v3.3.1! For future reference, the PythonWin.exe installer no longer works for Pro 3.3.1 – at least in Pro’s anaconda environment - and you seemly have to install via command prompt. After installing Pro 3.3.1, to globally install PythonWin (and the 'pywin32' module) to the base ArcGIS Pro Python install: Start a command window Execute the following lines: cd C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3 python -m pip install --upgrade pywin32 python Scripts/pywin32_postinstall.py -install #this step is needed for the global install My issue was that I had (only partially) installed PythonWin via the .exe installer, which was fudging up the whole thing.... pip wouldn't work... all messed up. After uninstalling and cleaning all that mess up it finally worked. Hooray!
... View more
08-29-2024
08:21 AM
|
1
|
0
|
1053
|
POST
|
I'm having the same issue as you Emma and Tim. Prior to updating to Pro v3.3.1 I was able to install PythonWin which also installs pywin32... and I've always installed to the base Python install. PythonWin seems to install but errors out now upon attempting to start the PythonWin IDE (error message: "The application can not locate Python39.dll (126) The specified module could not be found"). Also, perhaps more concerning, other modules I use that depend on pywin32 such as 'pyad' (Python access to MS Active Directly) and 'win32com' (Excel) all error out now: Python 3.11.8 (main, Mar 22 2024, 13:25:41) [MSC v.1938 64 bit (AMD64)] :: Anaconda, Inc. on win32 Type "help", "copyright", "credits" or "license" for more information. >>> from win32com import client Traceback (most recent call last): File "<stdin>", line 1, in <module> File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\Lib\site-packages\win32com\__init__.py", line 8, in <module> import pythoncom File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\Lib\site-packages\pythoncom.py", line 2, in <module> import pywintypes File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\Lib\site-packages\win32\lib\pywintypes.py", line 126, in <module> __import_pywin32_system_module__("pywintypes", globals()) File "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\Lib\site-packages\win32\lib\pywintypes.py", line 52, in __import_pywin32_system_module__ import _win32sysloader ImportError: DLL load failed while importing _win32sysloader: The specified module could not be found.
... View more
08-28-2024
08:55 AM
|
0
|
0
|
2425
|
POST
|
A longshot that anyone else is still using the Pythonwin IDE, but... Has anyone had issues installing Pythonwin in Pro v3.3.1? I've been merrily installing/using Pythonwin for 15 years to the base ESRI python install up until yesterday when I upgraded from Pro 3.2.1 to v3.3.1. I have always used the .exe Pythonwin installers - this time using pywin32-306.win-amd64-py3.11.exe from https://github.com/mhammond/pywin32/releases. Starting with ArcGIS Pro, I've been able to hack the PythonWin installer to "find" the ESRI-installed python.exe using this .reg file <edited for Python version of course>: Windows Registry Editor Version 5.00 Note: So that PythonWin can function still with ArcGIS Pro arcpy... may needed to be edited if > v3.11 [HKEY_LOCAL_MACHINE\SOFTWARE\Python\PythonCore\3.11] [HKEY_LOCAL_MACHINE\SOFTWARE\Python\PythonCore\3.11\Help] @="" [HKEY_LOCAL_MACHINE\SOFTWARE\Python\PythonCore\3.11\Help\Pythonwin Reference] @="C:\\Program Files\\ArcGIS\\Pro\\bin\\Python\\envs\\arcgispro-py3\\Lib\\site-packages\\PyWin32.chm" [HKEY_LOCAL_MACHINE\SOFTWARE\Python\PythonCore\3.11\InstallPath] @="C:\\Program Files\\ArcGIS\\Pro\\bin\\Python\\envs\\arcgispro-py3" [HKEY_LOCAL_MACHINE\SOFTWARE\Python\PythonCore\3.11\InstallPath\InstallGroup] @="Python 3.11" [HKEY_LOCAL_MACHINE\SOFTWARE\Python\PythonCore\3.11\Modules] [HKEY_LOCAL_MACHINE\SOFTWARE\Python\PythonCore\3.11\PythonPath] @="C:\\Program Files\\ArcGIS\\Pro\\bin\\Python\\envs\\arcgispro-py3\\Lib;C:\\Program Files\\ArcGIS\\Pro\\bin\\Python\\envs\\arcgispro-py3\\DLLs;C:\\Program Files\\ArcGIS\\Pro\\bin\\Python\\envs\\arcgispro-py3\\Lib\\lib-tk" Pythonwin seems to install correctly but upon startup it throws an error: "The application can not locate Python39.dll (126). The specified module could not be found." ...and yes, I am using the 3.11 Pythonwin installer, so not sure why it is looking for Python39.dll?!? Anyone successfully get Pythonwin working with Pro v3.3.1? If so, any tricks to go about it? BTW: This may be actually a good thing.... and actually force me to use a modern Python IDE 😉.
... View more
08-27-2024
09:27 AM
|
0
|
3
|
1142
|
IDEA
|
One of the last things I truly can't stand about Pro... Please add (bring back) the Cancel button!
... View more
07-09-2024
08:47 AM
|
0
|
0
|
937
|
POST
|
Francis - In it's current state it will only work with planar coordinate systems (State Plane, UTM, etc.). Another way to do what you need is to use the "Raster To Point" tool and just add/calc a Lat and Long field to the table. Since geometry is produced (in addition to tabular records) this method would take longer, but should yield you your necessary outcome. Chris
... View more
10-28-2019
09:33 AM
|
0
|
1
|
2463
|
IDEA
|
Conspiracy theory: ESRI is withholding Python AddIns in Pro to maximize Professional Services/Business Partner profits associated with the ArcGIS Desktop to ArcGIS Pro conver$ion. Prove me wrong.
... View more
07-02-2019
09:18 AM
|
2
|
0
|
1867
|
IDEA
|
In Desktop, the arcpy.GetMessages() function generally returned full and useful geoprocessing tool information. However, in Pro (currently at 2.3.3) GetMessages() now generally only returns start/end/elapsed time (!?!?!). ESRI: Please bring back the full geoprocessing message! Many of us record extensive log files for the purposes of debugging and performance monitoring and testing. The messages retuned in Pro now don't even have the tool name any more! As a GIS Programmer/Analyst with 20+ years experience in geoprocessing automation, I find this pretty disappointing. In Desktop (v10.7 and before) >>> arcpy.Select_analysis(blah, blah) >>> arcpy.GetMessages() Executing: Select E:\lidar_derivatives\processing_data\rs_hydro_processing\fishnet.shp E:\lidar_derivatives\processing_data\rs_hydro_processing\tile_479\tile_479.gdb\tile_479 "TILE_ID = 479" Start Time: Sat May 18 09:38:56 2019 Succeeded at Sat May 18 09:38:58 2019 (Elapsed Time: 1.47 seconds) But now in Pro: >>> arcpy.Select_analysis(blah, blah) >>> arcpy.GetMessages() Start Time: Friday, May 24, 2019 2:35:35 PM Succeeded at Friday, May 24, 2019 2:35:37 PM (Elapsed Time: 1.47 seconds)
... View more
05-28-2019
10:10 AM
|
36
|
7
|
4989
|
POST
|
From the looks of it, it seems you are just clipping 4 layers with a user defined polygon geometry and then inspecting the outputs... I think it would be much more efficient to use the Intersect tool to perform the goeprocessing here as opposed to 4, ideally simultaneous (but elusive) clips. Then you would scan the output using a searchcursor for the presence of the constituent records of the 4 inputs. Using the Intersect tool's join_attributes='ONLY_FID' parameter will probably make this more efficient if you just care about a yes/no presence. The right tool for the right job.
... View more
03-19-2019
02:32 PM
|
0
|
0
|
2153
|
POST
|
GenerateNearTable tool would be faster than a SelectByLocation in a for loop. ... then probably just SummaryStatistics based on the BUILDING_ID as the case field (mean value of the other featureclass) No programming required!
... View more
03-19-2019
02:17 PM
|
1
|
0
|
1043
|
POST
|
Thanks Dan, but I mean more in the context of a log file for a geoprocessing script. Tool name, parameters, etc... Basically I used to get this in Desktop: Mon Mar 04 18:00:44 2019 - Starting run of script file: \\dnr\divisions\FR_DATA\forest_info_2\gis\projects\synthetic_streams_westside\scripts\step_11_implement_stream_model_worker_v1061.py Mon Mar 04 18:00:44 2019 - Recording logfile to: D:\csny490\lidar_derivatives\step_11_implement_stream_model_worker_v1061_tile_4179_20190304180044.log Mon Mar 04 18:00:44 2019 - TEMP directory set to D:\csny490\lidar_derivatives\processing_data\rs_hydro_processing\tile_4179 Mon Mar 04 18:00:44 2019 - Checked out Spatial Analyst License Mon Mar 04 18:00:44 2019 - Checked out 3D Analyst License Mon Mar 04 18:00:51 2019 - Executing: CreateFileGDB D:\csny490\lidar_derivatives\processing_data\rs_hydro_processing\tile_4179 tile_4179 CURRENT Start Time: Mon Mar 4 18:00:51 2019 Succeeded at Mon Mar 4 18:00:51 2019 (Elapsed Time: 0.51 seconds) Mon Mar 04 18:00:52 2019 - Executing: Select D:\csny490\lidar_derivatives\processing_data\rs_hydro_processing\fishnet.shp D:\csny490\lidar_derivatives\processing_data\rs_hydro_processing\tile_4179\tile_4179.gdb\tile_4179 "TILE_ID = 4179" Start Time: Mon Mar 4 18:00:51 2019 Succeeded at Mon Mar 4 18:00:52 2019 (Elapsed Time: 0.76 seconds) Mon Mar 04 18:01:01 2019 - Con took 7.84943149986 seconds... Mon Mar 04 18:01:03 2019 - Executing: CopyFeatures D:\csny490\lidar_derivatives\sl_trans.gdb\sl_trans D:\csny490\lidar_derivatives\processing_data\rs_hydro_processing\tile_4179\tile_4179.gdb\sl_trans # 0 0 0 Start Time: Mon Mar 4 18:01:02 2019 Succeeded at Mon Mar 4 18:01:03 2019 (Elapsed Time: 1.31 seconds) Mon Mar 04 18:01:03 2019 - Executing: CalculateField fl ROAD_USGS_CLASS_CD 9 PYTHON # Start Time: Mon Mar 4 18:01:03 2019 Succeeded at Mon Mar 4 18:01:03 2019 (Elapsed Time: 0.02 seconds) Mon Mar 04 18:01:11 2019 - Executing: SelectLayerByLocation fl INTERSECT in_memory\f07C41C46_821F_403E_B860_78A1103462AD # NEW_SELECTION NOT_INVERT Start Time: Mon Mar 4 18:01:11 2019 Succeeded at Mon Mar 4 18:01:11 2019 (Elapsed Time: 0.12 seconds) Mon Mar 04 18:01:11 2019 - Executing: AddField D:\csny490\lidar_derivatives\processing_data\rs_hydro_processing\tile_4179\tile_4179.gdb\sl_trans BUFF_DIST SHORT # # # # NULLABLE NON_REQUIRED # Start Time: Mon Mar 4 18:01:11 2019 Adding BUFF_DIST to D:\csny490\lidar_derivatives\processing_data\rs_hydro_processing\tile_4179\tile_4179.gdb\sl_trans... Succeeded at Mon Mar 4 18:01:11 2019 (Elapsed Time: 0.09 seconds) Mon Mar 04 18:01:12 2019 - Executing: AddField D:\csny490\lidar_derivatives\processing_data\rs_hydro_processing\tile_4179\tile_4179.gdb\sl_trans RASTER_VAL SHORT # # # # NULLABLE NON_REQUIRED # Start Time: Mon Mar 4 18:01:12 2019 Adding RASTER_VAL to D:\csny490\lidar_derivatives\processing_data\rs_hydro_processing\tile_4179\tile_4179.gdb\sl_trans... Succeeded at Mon Mar 4 18:01:12 2019 (Elapsed Time: 0.12 seconds) but now I just get.... Wed Mar 13 11:41:29 2019 - Starting run of script file: \\dnr\divisions\FR_DATA\forest_info_2\gis\projects\synthetic_streams_westside\scripts\step_11_implement_stream_model_worker_vpro231.py Wed Mar 13 11:41:29 2019 - Recording logfile to: D:\csny490\lidar_derivatives\step_11_implement_stream_model_worker_vpro231_tile_4179_20190313114129.log Wed Mar 13 11:41:29 2019 - TEMP directory set to D:\csny490\lidar_derivatives\processing_data\rs_hydro_processing\tile_4179 Wed Mar 13 11:41:29 2019 - Checked out Spatial Analyst License Wed Mar 13 11:41:29 2019 - Checked out 3D Analyst License Wed Mar 13 11:41:30 2019 - Start Time: Wednesday, March 13, 2019 11:41:30 AM Succeeded at Wednesday, March 13, 2019 11:41:30 AM (Elapsed Time: 0.52 seconds) Wed Mar 13 11:41:31 2019 - Start Time: Wednesday, March 13, 2019 11:41:30 AM Succeeded at Wednesday, March 13, 2019 11:41:31 AM (Elapsed Time: 0.73 seconds) Wed Mar 13 11:41:32 2019 - Start Time: Wednesday, March 13, 2019 11:41:31 AM Succeeded at Wednesday, March 13, 2019 11:41:32 AM (Elapsed Time: 0.63 seconds) Wed Mar 13 11:41:41 2019 - Con took 8.238934079187088 seconds... Wed Mar 13 11:41:43 2019 - Start Time: Wednesday, March 13, 2019 11:41:41 AM Succeeded at Wednesday, March 13, 2019 11:41:43 AM (Elapsed Time: 1.19 seconds) Wed Mar 13 11:41:43 2019 - Start Time: Wednesday, March 13, 2019 11:41:43 AM Succeeded at Wednesday, March 13, 2019 11:41:43 AM (Elapsed Time: 0.17 seconds) Wed Mar 13 11:41:53 2019 - Start Time: Wednesday, March 13, 2019 11:41:51 AM Succeeded at Wednesday, March 13, 2019 11:41:51 AM (Elapsed Time: 0.12 seconds) Wed Mar 13 11:41:54 2019 - Start Time: Wednesday, March 13, 2019 11:41:53 AM Adding BUFF_DIST to sl_trans... Succeeded at Wednesday, March 13, 2019 11:41:54 AM (Elapsed Time: 0.43 seconds) Wed Mar 13 11:41:55 2019 - Start Time: Wednesday, March 13, 2019 11:41:54 AM Adding RASTER_VAL to sl_trans... Succeeded at Wednesday, March 13, 2019 11:41:55 AM (Elapsed Time: 0.44 seconds) Sad!
... View more
03-13-2019
01:47 PM
|
1
|
1
|
821
|
POST
|
Finally dabbling in porting some geoprocessing scripts to Pro. But... one of my 1st complainants is that arcpy.GetMessages() used to return pretty robust info in Desktop. For example, the buffer tool in Desktop would give something like: Executing: Buffer D:\csny490\lidar_derivatives\processing_data\rs_hydro_processing\tile_2\tile_2.gdb\sl_trans D:\csny490\lidar_derivatives\processing_data\rs_hydro_processing\tile_2\tile_2.gdb\sl_trans_buff BUFF_DIST FULL ROUND NONE # PLANAR Start Time: Wed Mar 6 09:20:33 2019 Succeeded at Wed Mar 6 09:20:43 2019 (Elapsed Time: 10.00 seconds) Now in Pro, it just yields: "Start Time: Wednesday, March 13, 2019 11:14:49 AM Succeeded at Wednesday, March 13, 2019 11:14:50 AM (Elapsed Time: 10.31 seconds)" Maybe there is some setting I am missing, or... Any insights?!?
... View more
03-13-2019
11:26 AM
|
2
|
3
|
1386
|
POST
|
Well that's good news... Yeah, I'm finding that some of the arcpy.mapping functions aren't the fastest horses on the track. Onwards and upwards!
... View more
02-08-2018
09:25 AM
|
0
|
0
|
1443
|
POST
|
Why is there a need to write data to the in_memory tables? Seems like the stats you are calculating only rely on read data. Perhaps a dictionary could serve the purpose of you intermediate in_memory tables? Significant bottlenecks I see are: 1. Creating the intermediate tables, adding fields to them, and inserting values 2. Writing data to numpy arrays from the cursors. Seems like the np.square() calculations are entirely doable outside of numpy. Certainly more convenient in np though. 3. Using arcpy.mapping to get a hook into the layer. Maybe you could just have a toolbox w/ an input feature layer variable that had a default value set to your desired layer name?
... View more
02-07-2018
04:27 PM
|
0
|
3
|
1443
|
Title | Kudos | Posted |
---|---|---|
1 | 08-29-2024 08:23 AM | |
1 | 08-29-2024 08:21 AM | |
1 | 02-13-2012 09:06 AM | |
2 | 10-05-2010 07:50 PM | |
1 | 02-08-2012 03:09 PM |
Online Status |
Offline
|
Date Last Visited |
08-30-2024
12:25 AM
|