I am new to Python, and am trying to write a script that would upload a geodatabase to AGOL at a scheduled interval. However, the 32 bit distribution of Python cannot handle the file size (over 1 MB), even when the multipart parameter of addItem is set to true. Through some investigation, I've learned that this is a limitation of Python32, and to do what I'd like to do I need the 64 bit version. I was trying to avoid having multiple installs of Python (as I said, I'm new to it, so the less complication, the better), but if I remove Python as it was installed with ArcGIS, I lose Arcpy, which I also need. So, my question is, does anyone know of a solution to this issue, or am I stuck dealing with multiple Python installs?
EDIT: I should have mentioned, I'm using the ArcREST site package for my upload.
Solved! Go to Solution.
Monica,
How big is your file? Python can upload file over 1 MB, do you mean 1 GB? When using addItem() on ArcREST, have you tried setting the multipart to True? This will break your file into smaller parts and upload the smaller parts, then when it finishes, it will commit the item to AGOL and merge everything back together.
If you have additional ArcREST issues, please log them here: Issues · Esri/ArcREST · GitHub
I would download the 64-bit background geoprocessing install for your version of ArcGIS desktop and run your script against that. Just make sure you use the 64-bit python.exe when calling your scheduled task.
Thank you,
Andrew
Kevin Himba from esri did this blog post a few years ago
Python scripting with 64-bit processing | ArcGIS Blog
and another post from esri
64-bit vs. 32-bit Python explained | Support Services Blog
Python changes in ArcGIS Pro it is now version 3.4.x
Python migration for ArcGIS Pro—ArcPy Get Started | ArcGIS for Desktop
however, the line does point out
ArcGIS Pro uses Python 3.4. This is a significant change from other ArcGIS products including ArcGIS for Desktop, ArcGIS for Server, and ArcGIS Engine that have used (and will continue to use) releases in the Python 2 line
I will leave it to you to decide your future configuration from you current installation.
Hi Dan,
hi Esri staff,
hi fellow users,
I'm facing the same 64bit issue when running a Py script that utilizes Network Analyst CF solver on a 100k-feature GDB. The standalone script crashes when reaching 1.3Gb of RAM; when I run it from within ArcCatalog 10.2.2, it works like a charm... but I can't (interactively or not) think of passing any arguments to it and then scheduling its execution; that's why I'm stuck on wanting to run it in a CMD console.
I first tried to give 32bit Python process a little bit more of RAM setting the LARGEADDRESSAWARE flag to true (GIS Geek). Nothing changed.
I've then installed the 64bit BG Geoprocessing, modified the %PATH% and %PYTHONHOME% values but no way I can't make the script run as I get the following errors below:
D:\FTP_SIG\VECTEUR\IDLIST\Scripts\CalcListDef\Test>C:\Python27\ArcGISx6410.2\python.exe CalcListDef_NO_CMD.py VOIE NO DIFF TEST
Traceback (most recent call last):
File "CalcListDef_NO_CMD.py", line 17, in <module>
import arcpy
File "C:\Program Files (x86)\ArcGIS\Desktop10.2\arcpy\arcpy\__init__.py", line 21, in <module>
from arcpy.geoprocessing import gp
File "C:\Program Files (x86)\ArcGIS\Desktop10.2\arcpy\arcpy\geoprocessing\__init__.py", line 14, in <module>
from _base import *
File "C:\Program Files (x86)\ArcGIS\Desktop10.2\arcpy\arcpy\geoprocessing\_base.py", line 14, in <module>
import arcgisscripting
ImportError: DLL load failed: %1 n'est pas une application Win32 valide
Hence my question: is there any 64bit version of arcpy library out there or a way to rebuild the 32bit version (haha) or any other simplier solution (scheduling the execution of a Python script via ArcCatalog.exe!) ?
Thank you in advance for your replies!
Best regards,
- Yann
Monica,
How big is your file? Python can upload file over 1 MB, do you mean 1 GB? When using addItem() on ArcREST, have you tried setting the multipart to True? This will break your file into smaller parts and upload the smaller parts, then when it finishes, it will commit the item to AGOL and merge everything back together.
If you have additional ArcREST issues, please log them here: Issues · Esri/ArcREST · GitHub
I would download the 64-bit background geoprocessing install for your version of ArcGIS desktop and run your script against that. Just make sure you use the 64-bit python.exe when calling your scheduled task.
Thank you,
Andrew
I apologize... you are correct, it is just over 1 GB. I am using multipart as true, but I was getting an error. After some searching, I found this: addByPart has size limitiation in Windows · Issue #138 · Esri/ArcREST · GitHub which identifies a 1 GB limit on the addItem command using Python 32 bit. I've since switched to the 64 bit distribution and installed Background Geoprocessing, but then I was getting compatibility errors with arcpy. I've reinstalled PythonWin into the folder for the background geoprocessing install of Python, rather than the standard install, and so far it seems to be working, but I am getting some other errors I need to work through that are unrelated to this post. It seems if you want to access 32 bit arcpy with 64 bit Python, you have to run it through Arc's install rather than the general 64 bit Python, just as you said. Thanks for the info!
sir i am getting this error after importing 64 bit geoprocessing and unable to work can you suggest any resolution. i am using arcgis 10.5 on windows 10.