<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Scheduled Python task failing on 'import arcgisscripting' in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/scheduled-python-task-failing-on-import/m-p/714232#M55397</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;The only reason I can see for that to happen is if it can't access the license manager, or doesn't think you have rights to access it. Are you using 9.3.1?&lt;/BLOCKQUOTE&gt;&lt;SPAN&gt; Yes we're using 9.3.1.&amp;nbsp; Could be the license manager, I'll look into that possibiltiy, however it does seem odd that my other scripts work fine.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The license manger is on a separate server, so there might be a connection issue happening somehow.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is a license used when importing arcgisscripting?&amp;nbsp; Or only when you use it to run a geoprocessing tool?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Cheers,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Mike.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 18 Aug 2011 21:02:49 GMT</pubDate>
    <dc:creator>MikeLouwrens</dc:creator>
    <dc:date>2011-08-18T21:02:49Z</dc:date>
    <item>
      <title>Scheduled Python task failing on 'import arcgisscripting'</title>
      <link>https://community.esri.com/t5/python-questions/scheduled-python-task-failing-on-import/m-p/714228#M55393</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have a scheduled task that runs a batch file running a python script to add fields into my SDE database (runs at about 2am).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If I run the batch file manually, the python script runs and completes fine.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;However when the scheduled task runs the batch file, the python script starts, but it fails when it tries to import the arcgisscripting module.&amp;nbsp; I don't understand why it's failing here, as it works fine when the batch is manually run, but fails when it is scheduled.&amp;nbsp; I have other scripts scheduled overnight that run python scripts (which include arcgisscripting) and these run fine, so I'm a little confused as to why this one is failing every morning.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any suggestions?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Mike.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Aug 2011 19:05:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/scheduled-python-task-failing-on-import/m-p/714228#M55393</guid>
      <dc:creator>MikeLouwrens</dc:creator>
      <dc:date>2011-08-18T19:05:03Z</dc:date>
    </item>
    <item>
      <title>Re: Scheduled Python task failing on 'import arcgisscripting'</title>
      <link>https://community.esri.com/t5/python-questions/scheduled-python-task-failing-on-import/m-p/714229#M55394</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Is your database doing something at that time? Backup, compacting etc? Other server/network things going on? Have you tried scheduling it for a different time? Have you tried scheduling your other scripts that do run to run at 2am to see if they fail then?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Aug 2011 20:32:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/scheduled-python-task-failing-on-import/m-p/714229#M55394</guid>
      <dc:creator>MathewCoyle</dc:creator>
      <dc:date>2011-08-18T20:32:01Z</dc:date>
    </item>
    <item>
      <title>Re: Scheduled Python task failing on 'import arcgisscripting'</title>
      <link>https://community.esri.com/t5/python-questions/scheduled-python-task-failing-on-import/m-p/714230#M55395</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;thanks for your reply.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The time is set aside for some scheduled tasks to happen on the server/database (12:30am-6am), no other tasks have any issues between this time, no matter what time they are run.&amp;nbsp; Nothing else is being done on the database or server at the same time.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;That said, the script starts normally, but it doesn't even get to look at the database.&amp;nbsp; It is failing specifically at the "import arcgisscripting" right at the start of the script, it doesn't get far enough to connect to the database.&amp;nbsp; No error message is returned though.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Cheers,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Mike.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Aug 2011 20:46:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/scheduled-python-task-failing-on-import/m-p/714230#M55395</guid>
      <dc:creator>MikeLouwrens</dc:creator>
      <dc:date>2011-08-18T20:46:53Z</dc:date>
    </item>
    <item>
      <title>Re: Scheduled Python task failing on 'import arcgisscripting'</title>
      <link>https://community.esri.com/t5/python-questions/scheduled-python-task-failing-on-import/m-p/714231#M55396</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The only reason I can see for that to happen is if it can't access the license manager, or doesn't think you have rights to access it. Are you using 9.3.1?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Aug 2011 20:53:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/scheduled-python-task-failing-on-import/m-p/714231#M55396</guid>
      <dc:creator>MathewCoyle</dc:creator>
      <dc:date>2011-08-18T20:53:49Z</dc:date>
    </item>
    <item>
      <title>Re: Scheduled Python task failing on 'import arcgisscripting'</title>
      <link>https://community.esri.com/t5/python-questions/scheduled-python-task-failing-on-import/m-p/714232#M55397</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;The only reason I can see for that to happen is if it can't access the license manager, or doesn't think you have rights to access it. Are you using 9.3.1?&lt;/BLOCKQUOTE&gt;&lt;SPAN&gt; Yes we're using 9.3.1.&amp;nbsp; Could be the license manager, I'll look into that possibiltiy, however it does seem odd that my other scripts work fine.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The license manger is on a separate server, so there might be a connection issue happening somehow.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is a license used when importing arcgisscripting?&amp;nbsp; Or only when you use it to run a geoprocessing tool?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Cheers,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Mike.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Aug 2011 21:02:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/scheduled-python-task-failing-on-import/m-p/714232#M55397</guid>
      <dc:creator>MikeLouwrens</dc:creator>
      <dc:date>2011-08-18T21:02:49Z</dc:date>
    </item>
    <item>
      <title>Re: Scheduled Python task failing on 'import arcgisscripting'</title>
      <link>https://community.esri.com/t5/python-questions/scheduled-python-task-failing-on-import/m-p/714233#M55398</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;As soon as you import arcgisscripting it checks out a license. How many licenses do you have available? What may be happening is each script you are running that imports arcgisscripting is consuming a license and not releasing them when they are done.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Aug 2011 21:13:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/scheduled-python-task-failing-on-import/m-p/714233#M55398</guid>
      <dc:creator>MathewCoyle</dc:creator>
      <dc:date>2011-08-18T21:13:04Z</dc:date>
    </item>
    <item>
      <title>Re: Scheduled Python task failing on 'import arcgisscripting'</title>
      <link>https://community.esri.com/t5/python-questions/scheduled-python-task-failing-on-import/m-p/714234#M55399</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;We should have more than enough licenses, even if the previous scripts don't release them.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have changed the scheduled tasks so that this one now runs earlier, and another runs later, to see if it is scheduled time related.&amp;nbsp; This might also highlight whether there are license availability issues etc.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Cheers,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Mike.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Aug 2011 21:18:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/scheduled-python-task-failing-on-import/m-p/714234#M55399</guid>
      <dc:creator>MikeLouwrens</dc:creator>
      <dc:date>2011-08-18T21:18:44Z</dc:date>
    </item>
    <item>
      <title>Re: Scheduled Python task failing on 'import arcgisscripting'</title>
      <link>https://community.esri.com/t5/python-questions/scheduled-python-task-failing-on-import/m-p/714235#M55400</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Good luck, let us know what you find.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Aug 2011 21:21:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/scheduled-python-task-failing-on-import/m-p/714235#M55400</guid>
      <dc:creator>MathewCoyle</dc:creator>
      <dc:date>2011-08-18T21:21:21Z</dc:date>
    </item>
    <item>
      <title>Re: Scheduled Python task failing on 'import arcgisscripting'</title>
      <link>https://community.esri.com/t5/python-questions/scheduled-python-task-failing-on-import/m-p/714236#M55401</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Is the scheduled job running under a different user?&amp;nbsp; If so try logging in as that user and running it manually.&amp;nbsp; The scheduled user may not have rights to a license.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Aug 2011 21:38:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/scheduled-python-task-failing-on-import/m-p/714236#M55401</guid>
      <dc:creator>RandyKreuziger</dc:creator>
      <dc:date>2011-08-18T21:38:12Z</dc:date>
    </item>
    <item>
      <title>Re: Scheduled Python task failing on 'import arcgisscripting'</title>
      <link>https://community.esri.com/t5/python-questions/scheduled-python-task-failing-on-import/m-p/714237#M55402</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Is the scheduled job running under a different user?&amp;nbsp; If so try logging in as that user and running it manually.&amp;nbsp; The scheduled user may not have rights to a license.&lt;/BLOCKQUOTE&gt;&lt;SPAN&gt;I had wondered that, so I've checked - all the scheduled tasks are running as the same user (and is the same user I log into the server as when I test it manually).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for your suggestion.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Cheers,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Mike.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Aug 2011 21:41:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/scheduled-python-task-failing-on-import/m-p/714237#M55402</guid>
      <dc:creator>MikeLouwrens</dc:creator>
      <dc:date>2011-08-18T21:41:07Z</dc:date>
    </item>
    <item>
      <title>Re: Scheduled Python task failing on 'import arcgisscripting'</title>
      <link>https://community.esri.com/t5/python-questions/scheduled-python-task-failing-on-import/m-p/714238#M55403</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;How are you kicking off the script manually?&amp;nbsp; Through Idle, doubleclicking or in CLI via python xxxx.py ?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you have multiple versions of python installed the arcgisscripting library might not be in the one that the scheduled task is hitting.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Probably a shot in the dark, but worth checking out.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Aug 2011 11:43:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/scheduled-python-task-failing-on-import/m-p/714238#M55403</guid>
      <dc:creator>ChristopherFricke1</dc:creator>
      <dc:date>2011-08-19T11:43:30Z</dc:date>
    </item>
    <item>
      <title>Re: Scheduled Python task failing on 'import arcgisscripting'</title>
      <link>https://community.esri.com/t5/python-questions/scheduled-python-task-failing-on-import/m-p/714239#M55404</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You may be defaulting to the wrong version of python in your script. For example, I have multiple installations of Python on my machine. If I just call "python" in my command line, it opens the version at C:\Python27 which doesn't have the ArcGIS Python modules. I have to call the full path name to the ArcGIS Python installation in my command prompt (C:\Python26\ArcGIS10.0\python.exe). Of course, at 9.3.1 yours will be a different path than mine.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Aug 2011 15:01:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/scheduled-python-task-failing-on-import/m-p/714239#M55404</guid>
      <dc:creator>deleted-user-1T_bOHag6M8d</dc:creator>
      <dc:date>2011-08-19T15:01:04Z</dc:date>
    </item>
  </channel>
</rss>

