<?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: ValueError: Unable to create the manifest (sddraft file). An unspecified error occurred. in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/valueerror-unable-to-create-the-manifest-sddraft/m-p/1576016#M73575</link>
    <description>&lt;P&gt;I was able to solve this using&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;r'C:\\Users\\me\\OneDrive - My Company Consulting Ltd. (Inc)\\Documents\\ArcGIS\\Projects\\MyProject1\\myService.sddraft', &lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;But this one I cannot get to work.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;s = r"C:\Users\me\Downloads\Publish as Web Layer (1).aprx"
'C:\\Users\\me\\Downloads\\Publish as Web Layer (1).aprx'&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;These are not set by me and are the paths of files so cannot be changed. The problems seems to be with the last part of the string (and it's nothing to do with the aprx extension).&lt;/P&gt;</description>
    <pubDate>Wed, 15 Jan 2025 22:07:25 GMT</pubDate>
    <dc:creator>chris_del101</dc:creator>
    <dc:date>2025-01-15T22:07:25Z</dc:date>
    <item>
      <title>ValueError: Unable to create the manifest (sddraft file). An unspecified error occurred.</title>
      <link>https://community.esri.com/t5/python-questions/valueerror-unable-to-create-the-manifest-sddraft/m-p/1150847#M63956</link>
      <description>&lt;P&gt;Hey all, I am trying to create a tool that will allow me to enter my portal username and password, then overwrite an existing map service once it has been updated in ArcGIS Pro.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;import arcpy 
import os

UserName = arcpy.GetParameterAsText(0)
Password = arcpy.GetParameterAsText(1)

arcpy.SignInToPortal("https://giswebmap.isrb.com/portal",UserName,Password)

outdir = r"I:\GIS\GIS_Monthly_Updates\ForDeveloping\PCC_ServeDef"
service_name = "PCC"
sddraft_filename = service_name + ".sddraft"
sddraft_output_filename = os.path.join(outdir,sddraft_filename)
sd_filename = service_name + ".sd"
sddraft_output_filename = os.path.join(outdir,sd_filename)

aprx = arcpy.mp.ArcGISProject(r"I:\GIS\GIS_Monthly_Updates\ForDeveloping\GIS_Monthly_Update.aprx")
m = aprx.listMaps('PCC')[0]

server_type = "FEDERATED_SERVER"
federated_server_url = "https://giswebmap.isrb.com/server"
sddraft = m.getWebLayerSharingDraft(server_type,"MAP_IMAGE",service_name)
sddraft.federatedServerUrl = federated_server_url
sddraft.overwriteExistingService = True

sddraft.exportToSDDraft(sddraft_output_filename)

print("Start Staging")
arcpy.StageService_server(sddraft_output_filename, sddraft_output_filename)

print("Start Uploading")
arcpy.UploadServiceDefinition_server(sddraft_output_filename, federated_server_url)

print("Finish Publishing")&lt;/LI-CODE&gt;&lt;P&gt;This is a sample code that I copied and pasted, then manipulated, from ESRI's website, hoping that it would work.&amp;nbsp; However when I run it I keep getting this error message:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;FONT face="arial,helvetica,sans-serif" size="1 2 3 4 5 6 7" color="#FF0000"&gt;Traceback (most recent call last):&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="arial,helvetica,sans-serif" size="1 2 3 4 5 6 7" color="#FF0000"&gt;File "I:\GIS\GIS_Monthly_Updates\DevelopmentScripts\PublishServiceDefinition.py", line 25, in &amp;lt;module&amp;gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="arial,helvetica,sans-serif" size="1 2 3 4 5 6 7" color="#FF0000"&gt;sddraft.exportToSDDraft(sddraft_output_filename)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="arial,helvetica,sans-serif" size="1 2 3 4 5 6 7" color="#FF0000"&gt;File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\sharing.py", line 68, in exportToSDDraft&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="arial,helvetica,sans-serif" size="1 2 3 4 5 6 7" color="#FF0000"&gt;return _convertArcObjectToPythonObject(self._arc_object.exportToSDDraft(out_sddraft,self))&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="arial,helvetica,sans-serif" size="1 2 3 4 5 6 7" color="#FF0000"&gt;ValueError: Unable to create the manifest (sddraft file). An unspecified error occurred.&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="4" color="#000000"&gt;Any suggestions to what may be causing this and how I can go about fixing it?&amp;nbsp; Thanks in advance for the help.&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 04 Mar 2022 19:45:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/valueerror-unable-to-create-the-manifest-sddraft/m-p/1150847#M63956</guid>
      <dc:creator>ColeNelson</dc:creator>
      <dc:date>2022-03-04T19:45:53Z</dc:date>
    </item>
    <item>
      <title>Re: ValueError: Unable to create the manifest (sddraft file). An unspecified error occurred.</title>
      <link>https://community.esri.com/t5/python-questions/valueerror-unable-to-create-the-manifest-sddraft/m-p/1246135#M66440</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to over-write a feature service in ArcGIS online. I am using the ESRI's code and twigged it depending on my need. However, I am getting&amp;nbsp; the following error:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;File &lt;SPAN class=""&gt;C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\sharing.py&lt;/SPAN&gt;, in &lt;SPAN class=""&gt;exportToSDDraft&lt;/SPAN&gt;:
Line &lt;SPAN class=""&gt;24&lt;/SPAN&gt;:    &lt;SPAN class=""&gt;return&lt;/SPAN&gt; _convertArcObjectToPythonObject(&lt;SPAN class=""&gt;self&lt;/SPAN&gt;._arc_object.exportToSDDraft(out_sddraft, &lt;SPAN class=""&gt;self&lt;/SPAN&gt;))

&lt;SPAN class=""&gt;ValueError&lt;/SPAN&gt;: Service and/or folder name contains unsupported characters: : ,. ,/&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Any suggestions on this issue will be thankfully appreciated.&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Jan 2023 18:50:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/valueerror-unable-to-create-the-manifest-sddraft/m-p/1246135#M66440</guid>
      <dc:creator>SomaChatterjee</dc:creator>
      <dc:date>2023-01-06T18:50:45Z</dc:date>
    </item>
    <item>
      <title>Re: ValueError: Unable to create the manifest (sddraft file). An unspecified error occurred.</title>
      <link>https://community.esri.com/t5/python-questions/valueerror-unable-to-create-the-manifest-sddraft/m-p/1256209#M66815</link>
      <description>&lt;P&gt;I know this is a year late but I was getting the same error when trying to create a gp service from a very similar script. The script would work locally but would crash with this error when trying to run from the gp service. The fix for me would be to add the 'offline' property for sddraft. This would allow my 'arcgis' user to export the sddraft file even if it wasnt signed in. So possibly adding this line would fix your issue:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;sddraft = m.getWebLayerSharingDraft(server_type,"MAP_IMAGE",service_name)
sddraft.federatedServerUrl = federated_server_url
sddraft.overwriteExistingService = True

sddraft.offline = True

sddraft.exportToSDDraft(sddraft_output_filename)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Feb 2023 18:24:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/valueerror-unable-to-create-the-manifest-sddraft/m-p/1256209#M66815</guid>
      <dc:creator>RyanJones6</dc:creator>
      <dc:date>2023-02-08T18:24:28Z</dc:date>
    </item>
    <item>
      <title>Re: ValueError: Unable to create the manifest (sddraft file). An unspecified error occurred.</title>
      <link>https://community.esri.com/t5/python-questions/valueerror-unable-to-create-the-manifest-sddraft/m-p/1287783#M67611</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/408707"&gt;@RyanJones6&lt;/a&gt;&amp;nbsp;that fixed my issues. Thanks!&lt;/P&gt;</description>
      <pubDate>Wed, 10 May 2023 16:19:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/valueerror-unable-to-create-the-manifest-sddraft/m-p/1287783#M67611</guid>
      <dc:creator>René_Ténière</dc:creator>
      <dc:date>2023-05-10T16:19:47Z</dc:date>
    </item>
    <item>
      <title>Re: ValueError: Unable to create the manifest (sddraft file). An unspecified error occurred.</title>
      <link>https://community.esri.com/t5/python-questions/valueerror-unable-to-create-the-manifest-sddraft/m-p/1559086#M73196</link>
      <description>&lt;P&gt;Thanks. That sorted out my issue&lt;/P&gt;</description>
      <pubDate>Fri, 15 Nov 2024 09:25:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/valueerror-unable-to-create-the-manifest-sddraft/m-p/1559086#M73196</guid>
      <dc:creator>MaartendeJong</dc:creator>
      <dc:date>2024-11-15T09:25:17Z</dc:date>
    </item>
    <item>
      <title>Re: ValueError: Unable to create the manifest (sddraft file). An unspecified error occurred.</title>
      <link>https://community.esri.com/t5/python-questions/valueerror-unable-to-create-the-manifest-sddraft/m-p/1575453#M73553</link>
      <description>&lt;P&gt;I still have this issue. My project path had lots of special chars and it cannot be changed&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;'serviceName': 'C:\\Users\\me\\OneDrive - My Company Consulting Ltd. (Inc)\\Documents\\ArcGIS\\Projects\\MyProject1\\myService.sddraft', &lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;What can I do to solve this? I need this path to work&lt;/P&gt;&lt;P&gt;Although even after replacing it with this I still get the error&lt;/P&gt;&lt;PRE&gt;myService.sddraft&lt;/PRE&gt;&lt;P&gt;Source:&amp;nbsp;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/tool-reference/server/stage-service.htm#L_" target="_blank" rel="noopener"&gt;https://pro.arcgis.com/en/pro-app/latest/tool-reference/server/stage-service.htm#L_&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think there must be some other issue and the error message is just leading me down the wrong path.&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jan 2025 17:06:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/valueerror-unable-to-create-the-manifest-sddraft/m-p/1575453#M73553</guid>
      <dc:creator>chris_del101</dc:creator>
      <dc:date>2025-01-14T17:06:25Z</dc:date>
    </item>
    <item>
      <title>Re: ValueError: Unable to create the manifest (sddraft file). An unspecified error occurred.</title>
      <link>https://community.esri.com/t5/python-questions/valueerror-unable-to-create-the-manifest-sddraft/m-p/1575483#M73555</link>
      <description>&lt;P&gt;Paths with spaces should be double quoted...&lt;/P&gt;&lt;P&gt;'serviceName': '"C:\\Users\\me\\OneDrive - My Company Consulting Ltd. (Inc)\\Documents\\ArcGIS\\Projects\\MyProject1\\myService.sddraft"',&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jan 2025 17:45:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/valueerror-unable-to-create-the-manifest-sddraft/m-p/1575483#M73555</guid>
      <dc:creator>René_Ténière</dc:creator>
      <dc:date>2025-01-14T17:45:06Z</dc:date>
    </item>
    <item>
      <title>Re: ValueError: Unable to create the manifest (sddraft file). An unspecified error occurred.</title>
      <link>https://community.esri.com/t5/python-questions/valueerror-unable-to-create-the-manifest-sddraft/m-p/1576016#M73575</link>
      <description>&lt;P&gt;I was able to solve this using&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;r'C:\\Users\\me\\OneDrive - My Company Consulting Ltd. (Inc)\\Documents\\ArcGIS\\Projects\\MyProject1\\myService.sddraft', &lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;But this one I cannot get to work.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;s = r"C:\Users\me\Downloads\Publish as Web Layer (1).aprx"
'C:\\Users\\me\\Downloads\\Publish as Web Layer (1).aprx'&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;These are not set by me and are the paths of files so cannot be changed. The problems seems to be with the last part of the string (and it's nothing to do with the aprx extension).&lt;/P&gt;</description>
      <pubDate>Wed, 15 Jan 2025 22:07:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/valueerror-unable-to-create-the-manifest-sddraft/m-p/1576016#M73575</guid>
      <dc:creator>chris_del101</dc:creator>
      <dc:date>2025-01-15T22:07:25Z</dc:date>
    </item>
  </channel>
</rss>

