64-bit ArcPy and PostgreSQL at 10.4.1

672
0
07-29-2016 06:05 PM
VinceAngelo
Esri Esteemed Contributor
3 0 672

I wrote some pretty extensive ArcPy scripts for a project that required custom data-loading into PostgreSQL 9.4 using ArcGIS 10.4.  In order to improve performance I created some large dictionary caches, which blew out 32-bit process space limits ("Out of client memory" errors),  so I installed the 64-bit Background Geoprocessing module, changed the Windows batch script path to include "...\Python27\ArcGISx6410.4" and "...\ArcGIS10.4\bin64" (vice "..\Python27\ArcGIS10.4" and "...\ArcGIS10.4\bin") and I was in business.

When it came time to upgrade to 10.4.1, I experienced disaster -- My scripts weren't working! I couldn't even connect to PostgreSQL! Eventually, Tech Support walked me to a possible cause, and then I found the real cause: My connections failed because a PostgreSQL support library was missing from ArcGIS10.4\bin64 at 10.4.1.  Unfortunately, the connections didn't fail in a useful way (say, by raising an exception), they sort of silently failed, only raising an exception when I tried to access the connectionProperties of the workspace description (props = arcpy.Describe(pathToDotSDEfile).connectionProperties)

So, for the record, the solution is to install a replacement for the missing "libintl-8.dll" library. This can be done by:

  1. Installing a copy of 64-bit PostgreSQL server on all clients, and prepending the bin directory to the PATH
  2. Downloading and extracting the "binaries-only" install of PostgreSQL (or copying the bin directory out of your server, if it's a Windows install), and prependng that to the PATH
  3. Installing ArcGIS for Server 10.4.1, and prepending its Server\bin directory to the PATH
  4. Copying the "libintl-8.dll" file from an ArcGIS  Server 10.4.1 install Server\bin directory into Desktop10.4\bin64
  5. [Haven't tried, but it might work] Copy the "libintl-8.dll" file from a 10.4.0 Desktop bin64 directory (where Background Geoprocessing is installed) into the 10.4.1 bin64 folder ​[I've been told this *doesn't* work]

I'm sure a QFE will come out on this pretty quick, but at least there's lots of workarounds.

About the Author
Thirty-five years with Esri, with expertise in Software Engineering, Large Database Management and Administration, Real-time Spatial Data Manipulation, Modeling and Simulation, and Spatial Data Manipulation involving Topology, Projection, and Geometric Transformation. Certifications: Security+ (SY0-601), Esri EGMP (2201), Esri EGMP (19001), Esri EGMP (10.3/10.1), Esri ESDA (10.3), Esri EGMA (10.1) Note: Please do not try to message me directly or tag me in questions; just ask a question in an appropriate community, and if I see it, have something to add, and have the time, I'll respond.
Labels