<?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: Map document has no len() in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/map-document-has-no-len/m-p/105039#M8088</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You appear to want to work with the MXD path, so why not just use the mxdPath variable that you have already defined and set?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 26 Mar 2020 15:29:08 GMT</pubDate>
    <dc:creator>JoshuaBixby</dc:creator>
    <dc:date>2020-03-26T15:29:08Z</dc:date>
    <item>
      <title>Map document has no len()</title>
      <link>https://community.esri.com/t5/python-questions/map-document-has-no-len/m-p/105036#M8085</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;well... I have been trying to use add-in to make simple button that had a date and current mxd name to features in the fcs in the gdb in use. still not working. I really don't understand how to use making addin.&lt;/P&gt;&lt;P&gt;I decided to give it a go using Arctoolbox&amp;nbsp; as it looks simpler.&amp;nbsp;&lt;/P&gt;&lt;P&gt;In first place with three input variables: date; file location (folder path); and file.&lt;/P&gt;&lt;P&gt;It works.&lt;/P&gt;&lt;P&gt;But I want to reduce the number of input variables. I was thinking to use 'current' and skip the file location and file manual input. The help on this says is that is not possible to use it in the background, therefore I made it run on foreground... however when I tried gave the following error.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need some guidance on this because maybe it is impossible to use toolbox for this or maybe there is a workaround... anything.&lt;/P&gt;&lt;P&gt;cheers&lt;/P&gt;&lt;P&gt;P&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Python errors: &lt;BR /&gt;Traceback Info: &lt;BR /&gt; File "\\eusc.europa.eu\ATLAS\Home\psoares\Documents\python\filesupporttools\uploadcurrentMXD_vectors_TOOLBOX_version.py", line 93, in &amp;lt;module&amp;gt;&lt;BR /&gt; issue_code = os.path.basename(mxdInicio)&lt;BR /&gt; &lt;BR /&gt;Error Info: &lt;BR /&gt; &amp;lt;type 'exceptions.TypeError'&amp;gt;: object of type 'MapDocument' has no len()&lt;/P&gt;&lt;P&gt;GP errors:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;line 93 code is the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;    &lt;SPAN class="comment token"&gt;# mxd and environment; and gdb sources and targets&lt;/SPAN&gt;
    mxdInicio &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;mapping&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;MapDocument&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'current'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
    mxdPath &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; mxdInicio&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;filePath


    issue_code &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; os&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;path&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;basename&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;mxdInicio&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="comment token"&gt;## line 93&lt;/SPAN&gt;
    issue_code &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; issue_code&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;19&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
    issue_code &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; issue_code&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;replace&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"_"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;" "&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
    mxdPathList &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; mxdPath&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;split&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;os&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;sep&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;

    IssueGDB &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;  &lt;SPAN class="string token"&gt;"\\"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;join&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;mxdPathList&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;1&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
    &lt;SPAN class="keyword token"&gt;print&lt;/SPAN&gt; IssueGDB&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 06:24:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/map-document-has-no-len/m-p/105036#M8085</guid>
      <dc:creator>PSGeo</dc:creator>
      <dc:date>2021-12-11T06:24:49Z</dc:date>
    </item>
    <item>
      <title>Re: Map document has no len()</title>
      <link>https://community.esri.com/t5/python-questions/map-document-has-no-len/m-p/105037#M8086</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE class="" style="color: #000000; background: #f5f2f0; border: 0px; margin: 0.5em 0px; padding: 1em 1em 1em 3.8em;"&gt;&lt;CODE style="border: 0px; font-weight: inherit;"&gt;issue_code &lt;SPAN class="" style="color: #a67f59; background: rgba(255, 255, 255, 0.5); border: 0px; font-weight: inherit;"&gt;=&lt;/SPAN&gt; os&lt;SPAN class="" style="color: #999999; border: 0px; font-weight: inherit;"&gt;.&lt;/SPAN&gt;path&lt;SPAN class="" style="color: #999999; border: 0px; font-weight: inherit;"&gt;.&lt;/SPAN&gt;basename&lt;SPAN class="" style="color: #999999; border: 0px; font-weight: inherit;"&gt;(&lt;/SPAN&gt;mxdInicio&lt;SPAN class="" style="color: #999999; border: 0px; font-weight: inherit;"&gt;)&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Did you try to print&amp;nbsp; issue_code?&amp;nbsp; If it doesn't print anything, it can't be sliced on the next line since it has no length and you can only slice things that have a __len__ property&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Mar 2020 13:30:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/map-document-has-no-len/m-p/105037#M8086</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2020-03-26T13:30:34Z</dc:date>
    </item>
    <item>
      <title>Re: Map document has no len()</title>
      <link>https://community.esri.com/t5/python-questions/map-document-has-no-len/m-p/105038#M8087</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;indeed... the print (arcpy.AddMessage (mxdInicio)) gives me this:&lt;/P&gt;&lt;P&gt;&amp;lt;geoprocessing Map object object at 0x239FB400&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I assume that 'current' doesn't work even if make the tool to run in foreground.&lt;/P&gt;&lt;P&gt;do u agree?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Mar 2020 13:44:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/map-document-has-no-len/m-p/105038#M8087</guid>
      <dc:creator>PSGeo</dc:creator>
      <dc:date>2020-03-26T13:44:52Z</dc:date>
    </item>
    <item>
      <title>Re: Map document has no len()</title>
      <link>https://community.esri.com/t5/python-questions/map-document-has-no-len/m-p/105039#M8088</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You appear to want to work with the MXD path, so why not just use the mxdPath variable that you have already defined and set?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Mar 2020 15:29:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/map-document-has-no-len/m-p/105039#M8088</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2020-03-26T15:29:08Z</dc:date>
    </item>
    <item>
      <title>Re: Map document has no len()</title>
      <link>https://community.esri.com/t5/python-questions/map-document-has-no-len/m-p/105040#M8089</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;the mxd path is from the current mxd... how do I get it? if the :&lt;/P&gt;&lt;PRE class="" style="color: #000000; background: #f5f2f0; border: 0px; margin: 0.5em 0px; padding: 1em 1em 1em 3.8em;"&gt;&lt;CODE style="border: 0px; font-weight: inherit;"&gt;arcpy&lt;SPAN class="" style="color: #999999; border: 0px; font-weight: inherit;"&gt;.&lt;/SPAN&gt;mapping&lt;SPAN class="" style="color: #999999; border: 0px; font-weight: inherit;"&gt;.&lt;/SPAN&gt;MapDocument&lt;SPAN class="" style="color: #999999; border: 0px; font-weight: inherit;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="" style="color: #669900; border: 0px; font-weight: inherit;"&gt;'current'&lt;/SPAN&gt;&lt;SPAN class="" style="color: #999999; border: 0px; font-weight: inherit;"&gt;)&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;apparently doesn't work for toolboxes.&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;I don't set it anywhere else in the script&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Mar 2020 16:11:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/map-document-has-no-len/m-p/105040#M8089</guid>
      <dc:creator>PSGeo</dc:creator>
      <dc:date>2020-03-26T16:11:00Z</dc:date>
    </item>
    <item>
      <title>Re: Map document has no len()</title>
      <link>https://community.esri.com/t5/python-questions/map-document-has-no-len/m-p/105041#M8090</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have regularly used &lt;SPAN style="font-family: courier new, courier, monospace;"&gt;arcpy.mapping.MapDocument("CURRENT")&lt;/SPAN&gt; in scripts for toolboxes.&amp;nbsp; The only issue I have had to watch for is when someone has opened a new MXD and not saved it yet because in that case &lt;SPAN style="font-family: courier new, courier, monospace;"&gt;MapDocument.filePath&lt;/SPAN&gt; returns an empty string.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Mar 2020 16:14:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/map-document-has-no-len/m-p/105041#M8090</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2020-03-26T16:14:32Z</dc:date>
    </item>
    <item>
      <title>Re: Map document has no len()</title>
      <link>https://community.esri.com/t5/python-questions/map-document-has-no-len/m-p/105042#M8091</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;ArcGIS Pro has it... you can even open a Jupyter Notebook in your project for quick testing and 'dir' away on objects to find out what they have.&lt;/P&gt;&lt;P&gt;Pro has some nifty features... don't know if they are available in arcmap&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="486329" alt="" class="jive-emoji j-img-floatstart image-1 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/486329_notebook02.png" style="float: left;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Mar 2020 16:19:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/map-document-has-no-len/m-p/105042#M8091</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2020-03-26T16:19:05Z</dc:date>
    </item>
    <item>
      <title>Re: Map document has no len()</title>
      <link>https://community.esri.com/t5/python-questions/map-document-has-no-len/m-p/105043#M8092</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So what is wrong there in what i am doing?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Mar 2020 16:27:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/map-document-has-no-len/m-p/105043#M8092</guid>
      <dc:creator>PSGeo</dc:creator>
      <dc:date>2020-03-26T16:27:46Z</dc:date>
    </item>
    <item>
      <title>Re: Map document has no len()</title>
      <link>https://community.esri.com/t5/python-questions/map-document-has-no-len/m-p/105044#M8093</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i have no arcgis pro &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/sad.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Mar 2020 16:32:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/map-document-has-no-len/m-p/105044#M8093</guid>
      <dc:creator>PSGeo</dc:creator>
      <dc:date>2020-03-26T16:32:09Z</dc:date>
    </item>
    <item>
      <title>Re: Map document has no len()</title>
      <link>https://community.esri.com/t5/python-questions/map-document-has-no-len/m-p/105045#M8094</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Then add these lines to your script and devolve the project path relative to the running script in the toolbox.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;import sys&lt;/P&gt;&lt;P&gt;script = sys.argv[0]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then you can find the location of the script and if your project is located 'relative' to it, you should be able to construct the project name and location.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;script

&lt;SPAN class="string token"&gt;'C:\\Git_Dan\\npgeom\\_load_sample_.py'&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 06:24:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/map-document-has-no-len/m-p/105045#M8094</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2021-12-11T06:24:52Z</dc:date>
    </item>
    <item>
      <title>Re: Map document has no len()</title>
      <link>https://community.esri.com/t5/python-questions/map-document-has-no-len/m-p/105046#M8095</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What do you get with&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;print (arcpy.AddMessage(mxdInicio.filePath))&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Mar 2020 17:15:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/map-document-has-no-len/m-p/105046#M8095</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2020-03-26T17:15:08Z</dc:date>
    </item>
    <item>
      <title>Re: Map document has no len()</title>
      <link>https://community.esri.com/t5/python-questions/map-document-has-no-len/m-p/105047#M8096</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;apparently he didn't try... I highlighted those in my previous post&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Mar 2020 18:02:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/map-document-has-no-len/m-p/105047#M8096</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2020-03-26T18:02:47Z</dc:date>
    </item>
    <item>
      <title>Re: Map document has no len()</title>
      <link>https://community.esri.com/t5/python-questions/map-document-has-no-len/m-p/105048#M8097</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sometime the second time is the charm, or is it the third....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Mar 2020 19:30:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/map-document-has-no-len/m-p/105048#M8097</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2020-03-26T19:30:03Z</dc:date>
    </item>
    <item>
      <title>Re: Map document has no len()</title>
      <link>https://community.esri.com/t5/python-questions/map-document-has-no-len/m-p/105049#M8098</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi guys,&lt;/P&gt;&lt;P&gt;thanks for the:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #f6f6f6;"&gt;print (arcpy.AddMessage(mxdInicio.filePath))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #f6f6f6;"&gt;with that i&amp;nbsp;figure it out the problem:&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;    mxdInicio &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;mapping&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;MapDocument&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'current'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
    arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;AddMessage&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;mxdInicio&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;filePath&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
    mxdPath &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; mxdInicio&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;filePath

    issue_code &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; os&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;path&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;basename&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;mxdPath&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;‍‍‍‍‍‍‍‍ &lt;SPAN class="comment token"&gt;# i figure it out that I was calling the wrong variable...&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;by the way, I took this time because the question came from the other side of the Atlantic&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks guys, tool&amp;nbsp;is finished.&lt;/P&gt;&lt;P&gt;cheers&lt;/P&gt;&lt;P&gt;Pedro&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 06:24:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/map-document-has-no-len/m-p/105049#M8098</guid>
      <dc:creator>PSGeo</dc:creator>
      <dc:date>2021-12-11T06:24:54Z</dc:date>
    </item>
    <item>
      <title>Re: Map document has no len()</title>
      <link>https://community.esri.com/t5/python-questions/map-document-has-no-len/m-p/105050#M8099</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It is common practice/courtesy to mark comments "Helpful" if people's comments are, well, helpful.&amp;nbsp; Looking over the discussion now, not a single comment has been marked Helpful.&amp;nbsp; Also, if one comment was particularly helpful, that one can be marked Correct to close out the discussion.&amp;nbsp; Or, the question can be marked "Assumed Answered".&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Mar 2020 15:01:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/map-document-has-no-len/m-p/105050#M8099</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2020-03-27T15:01:47Z</dc:date>
    </item>
    <item>
      <title>Re: Map document has no len()</title>
      <link>https://community.esri.com/t5/python-questions/map-document-has-no-len/m-p/105051#M8100</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You are right and I apologize&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Mar 2020 15:31:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/map-document-has-no-len/m-p/105051#M8100</guid>
      <dc:creator>PSGeo</dc:creator>
      <dc:date>2020-03-27T15:31:48Z</dc:date>
    </item>
    <item>
      <title>Re: Map document has no len()</title>
      <link>https://community.esri.com/t5/python-questions/map-document-has-no-len/m-p/105052#M8101</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A _jive_internal="true" class="link-titled" href="https://community.esri.com/message/918013-re-map-document-has-no-len?commentID=918013#comment-918013" title="https://community.esri.com/message/918013-re-map-document-has-no-len?commentID=918013#comment-918013"&gt;https://community.esri.com/message/918013-re-map-document-has-no-len?commentID=918013#comment-918013&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and next time please read the code samples, with the highlights... you could have been done much sooner&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Mar 2020 16:30:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/map-document-has-no-len/m-p/105052#M8101</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2020-03-27T16:30:54Z</dc:date>
    </item>
  </channel>
</rss>

