Select to view content in your preferred language

arcpy.CreateMobileCache_mobile at 10.3

4505
2
01-05-2015 08:55 PM
DavidColey
Honored Contributor

Hi all-

Does anyone have a workaround for creating a mobile cache in the python 32-bit idle at 10.3 (i.e. at 2.7.8)?  After updating to 10.3, the idle can no longer find the _mobile module installed with ArcGIS for Windows Mobile at 10.2, although the desktop tool Create Mobile Cache in 10.3 does run, suggesting that a registry key was deleted/modified? at install.  Code below (running at info lic level) returns 'module not found for line 12':

# Import system modules
import sys, string, os, arcpy, time, smtplib
from arcpy import env
# Local variables...
message = ""
current_time = time.asctime()
try:
    mapDoc = r"\\servername\arcgisserver\data-store\MobileMaps\ARM360_QueryMap.mxd"
    outFolder = r"\\machinename\MobileCacheTests\Arm360\Query Data Cache"
    print mapDoc
    print outFolder
    arcpy.CreateMobileCache_mobile(mapDoc,outFolder,"","NO_ATTACHMENTS","")
    
except Exception, e:
    # If an error occurred, print line number and error message
    import traceback, sys
    tb = sys.exc_info()[2]
    message = message + "Line %i" % tb.tb_lineno
    message = message + e.message

# Below is to send email message.
fromAddr = ""
#fromAddr = ""
toAddr = ["",""]
subject = "SCRIPT: Arm360QueryCache"
finish_time = time.asctime()
msgBody = current_time + "\n\n" + message + "\n" + "Thank you." + "\n\n" + finish_time
msg = string.join(("From: %s" %fromAddr, "To: %s" %toAddr, "Subject: %s" %subject, "", msgBody),"\r\n")
server = smtplib.SMTP("10.140.65.27")
server.set_debuglevel(1)
server.sendmail(fromAddr,toAddr,msg)
server.quit()

Any ideas are appreciated...

Thanks

David

David Coley

Sarasota County GIS

0 Kudos
2 Replies
AlexanderNohe1
Honored Contributor

Hi David,

Try repairing your ArcGIS for Windows Mobile install and running the script again.  Sometimes, it will grab the last python library installed.

Did this help?

Thanks!

Alexander N.

DavidColey
Honored Contributor

Hi Alexander-

Yeah that's what I thought too, but alas no help.  After repair, the script as run in the python 32-bit idle crashes python exe.  I then performed a re-install of mobile 10.2.  Upon load of the mobile toolbox, both the cache and sync tools are then unavailable.  Customer service indicated that mobile at 10.2 just does not work well with desktop 10.3, and that mobile for 10.3 will be available late January.  So until then I am going to consider this answered. 

For other users (and this would be better posted in the mobile place, which I will do) I would suggest that if you have mobile at 10.2 installed and you must move your desktop to 10.3, do not uninstall mobile.  The install can be left in place, and that way users at least have access to the desktop tool, which does seem to continue to work.

Thanks-

David

0 Kudos