<?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: Backup.py fails when executed remotely in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/backup-py-fails-when-executed-remotely/m-p/1036613#M60404</link>
    <description>&lt;P&gt;Hi Jeff,&lt;/P&gt;&lt;P&gt;On the remote server Python is not installed. Both environments are Windows Server 2019.&lt;/P&gt;&lt;P&gt;Python 2.7.14 is installed, the version that comes with ArcGIS 10.6.1.&lt;/P&gt;</description>
    <pubDate>Mon, 15 Mar 2021 14:08:52 GMT</pubDate>
    <dc:creator>jorisfrenkel</dc:creator>
    <dc:date>2021-03-15T14:08:52Z</dc:date>
    <item>
      <title>Backup.py fails when executed remotely</title>
      <link>https://community.esri.com/t5/python-questions/backup-py-fails-when-executed-remotely/m-p/1035936#M60367</link>
      <description>&lt;P&gt;I use a task on a remote server to regularly backup our ArcGIS Server site (stand alone). I use PsExec (newest version) to remotely execute it. Since a short time it stopped working with the following error:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Traceback (most recent call last):&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;File "C:\Program Files\ArcGIS\Server\tools\admin\Backup.py", line 202, in &amp;lt;module&amp;gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;sys.exit(backup())&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;File "C:\Program Files\ArcGIS\Server\tools\admin\Backup.py", line 75, in backup&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;token = getToken(serverName, serverPort, protocol, tokenURL, username, password)&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;File "C:\Program Files\ArcGIS\Server\tools\admin\Backup.py", line 166, in getToken&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;params = urllib.urlencode({'username': username.decode(sys.stdin.encoding).encode('utf-8'), 'password': password.decode(sys.stdin.encoding).encode('utf-8'),'client': 'referer','referer':'backuputility','f': 'json'})&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;TypeError: decode() argument 1 must be string, not None&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;So Python does not get the encoding string sys.stdin.encoding anymore.&lt;/P&gt;&lt;P&gt;When I start the script on the ArcGIS machine, it runs fine.&lt;/P&gt;&lt;P&gt;I am not sure when this stopped working, there haven't been changes on the server except Windows updates and updates of mapservices.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 12 Mar 2021 14:57:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/backup-py-fails-when-executed-remotely/m-p/1035936#M60367</guid>
      <dc:creator>jorisfrenkel</dc:creator>
      <dc:date>2021-03-12T14:57:05Z</dc:date>
    </item>
    <item>
      <title>Re: Backup.py fails when executed remotely</title>
      <link>https://community.esri.com/t5/python-questions/backup-py-fails-when-executed-remotely/m-p/1035948#M60368</link>
      <description>&lt;P&gt;Is there any mismatch of python versions/ environments between the two environments?&amp;nbsp; What python version are you using?&lt;/P&gt;</description>
      <pubDate>Fri, 12 Mar 2021 15:31:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/backup-py-fails-when-executed-remotely/m-p/1035948#M60368</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2021-03-12T15:31:21Z</dc:date>
    </item>
    <item>
      <title>Re: Backup.py fails when executed remotely</title>
      <link>https://community.esri.com/t5/python-questions/backup-py-fails-when-executed-remotely/m-p/1036613#M60404</link>
      <description>&lt;P&gt;Hi Jeff,&lt;/P&gt;&lt;P&gt;On the remote server Python is not installed. Both environments are Windows Server 2019.&lt;/P&gt;&lt;P&gt;Python 2.7.14 is installed, the version that comes with ArcGIS 10.6.1.&lt;/P&gt;</description>
      <pubDate>Mon, 15 Mar 2021 14:08:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/backup-py-fails-when-executed-remotely/m-p/1036613#M60404</guid>
      <dc:creator>jorisfrenkel</dc:creator>
      <dc:date>2021-03-15T14:08:52Z</dc:date>
    </item>
    <item>
      <title>Re: Backup.py fails when executed remotely</title>
      <link>https://community.esri.com/t5/python-questions/backup-py-fails-when-executed-remotely/m-p/1221256#M65836</link>
      <description>&lt;P&gt;Did you find a solution to this?&amp;nbsp; I get the same error, but am actually running the script on the ArcGIS machine, not remote&lt;/P&gt;</description>
      <pubDate>Wed, 12 Oct 2022 19:50:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/backup-py-fails-when-executed-remotely/m-p/1221256#M65836</guid>
      <dc:creator>Tim_Shapiro</dc:creator>
      <dc:date>2022-10-12T19:50:53Z</dc:date>
    </item>
    <item>
      <title>Re: Backup.py fails when executed remotely</title>
      <link>https://community.esri.com/t5/python-questions/backup-py-fails-when-executed-remotely/m-p/1236361#M66190</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;As far as I can remember, it just started working again after some time, without me doing anything in particular. I'm sorry I cannot help you with any more info.&lt;/P&gt;</description>
      <pubDate>Wed, 30 Nov 2022 14:14:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/backup-py-fails-when-executed-remotely/m-p/1236361#M66190</guid>
      <dc:creator>jorisfrenkel</dc:creator>
      <dc:date>2022-11-30T14:14:42Z</dc:date>
    </item>
  </channel>
</rss>

