<?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: arcpy.ListFeatureClasses doesn't work when using  os.path.join in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/arcpy-listfeatureclasses-doesn-t-work-when-using/m-p/381489#M30053</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt; &lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; os

gdb_name&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"f.gdb"&lt;/SPAN&gt;
gbd_path&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"C:\ahmad data\data\MyProject5"&lt;/SPAN&gt;

gbd_path
Out&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;3&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'C:\x07hmad data\\data\\MyProject5'&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;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Now&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;gdb_name&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"f.gdb"&lt;/SPAN&gt;
gbd_path&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; r&lt;SPAN class="string token"&gt;"C:\ahmad data\data\MyProject5"&lt;/SPAN&gt;

gbd_path
Out&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;5&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'C:\\ahmad data\\data\\MyProject5'&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;a little "r" on line 2 goes a long way&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 11 Dec 2021 17:35:29 GMT</pubDate>
    <dc:creator>DanPatterson</dc:creator>
    <dc:date>2021-12-11T17:35:29Z</dc:date>
    <item>
      <title>arcpy.ListFeatureClasses doesn't work when using  os.path.join</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-listfeatureclasses-doesn-t-work-when-using/m-p/381488#M30052</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;I couldn't figure out why&amp;nbsp;arcpy.ListFeatureClasses() doesn't work when I set env.workspace = os.path.join (path,gdb)&lt;/P&gt;&lt;P&gt;and works when I set&amp;nbsp;&lt;SPAN&gt;env.workspace =&amp;nbsp;r"path to the gdb"!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;here is an example:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The below script works in my IDE&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; arcpy


&lt;SPAN class="comment token"&gt;#Solution 1&lt;/SPAN&gt;
gdbANDpath&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;r&lt;SPAN class="string token"&gt;"C:\ahmad data\data\MyProject5\f.gdb"&lt;/SPAN&gt;


arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;env&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;workspace&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;gdbANDpath

fclist&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;ListFeatureClasses&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; len&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;fclist&lt;SPAN class="punctuation token"&gt;)&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;/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;P&gt;prints &amp;gt;&amp;gt; 8&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;while the following script doesn't work and gives an error:&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="keyword token"&gt;import&lt;/SPAN&gt; arcpy
&lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; os



&lt;SPAN class="comment token"&gt;#Solution 2&lt;/SPAN&gt;
gdb_name&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"f.gdb"&lt;/SPAN&gt;
gbd_path&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"C:\ahmad data\data\MyProject5"&lt;/SPAN&gt;


gdbANDpath&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;join&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;gdb_name&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;gbd_path&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;env&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;workspace&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;gdbANDpath


fclist&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;ListFeatureClasses&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; len&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;fclist&lt;SPAN class="punctuation token"&gt;)&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;/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;P&gt;Traceback (most recent call last):&lt;BR /&gt; File "&amp;lt;module1&amp;gt;", line 31, in &amp;lt;module&amp;gt;&lt;BR /&gt;TypeError: object of type 'NoneType' has no len()&lt;BR /&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;fclist here returns none and fails to create a list of feature classes in the gdb!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PS: Tested on&amp;nbsp;&amp;nbsp;ArcMap 10.7.1 and 10.6.1, on more than one gdb&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 17:35:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-listfeatureclasses-doesn-t-work-when-using/m-p/381488#M30052</guid>
      <dc:creator>AhmadSALEH1</dc:creator>
      <dc:date>2021-12-11T17:35:26Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy.ListFeatureClasses doesn't work when using  os.path.join</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-listfeatureclasses-doesn-t-work-when-using/m-p/381489#M30053</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt; &lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; os

gdb_name&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"f.gdb"&lt;/SPAN&gt;
gbd_path&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"C:\ahmad data\data\MyProject5"&lt;/SPAN&gt;

gbd_path
Out&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;3&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'C:\x07hmad data\\data\\MyProject5'&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;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Now&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;gdb_name&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"f.gdb"&lt;/SPAN&gt;
gbd_path&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; r&lt;SPAN class="string token"&gt;"C:\ahmad data\data\MyProject5"&lt;/SPAN&gt;

gbd_path
Out&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;5&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'C:\\ahmad data\\data\\MyProject5'&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;a little "r" on line 2 goes a long way&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 17:35:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-listfeatureclasses-doesn-t-work-when-using/m-p/381489#M30053</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2021-12-11T17:35:29Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy.ListFeatureClasses doesn't work when using  os.path.join</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-listfeatureclasses-doesn-t-work-when-using/m-p/381490#M30054</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am under the assumption that&amp;nbsp;os.path.join(gbd_path,gdb_name) does the same job as using the "r" before the path!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;how I can get the same effect of "r" but in a&amp;nbsp; programmable&amp;nbsp;why?&amp;nbsp;&lt;/P&gt;&lt;P&gt;gbd_path is coming from a function that&amp;nbsp;returns&amp;nbsp; the path as the sting&amp;nbsp;&lt;/P&gt;&lt;P&gt;"C:\ahmad data\data\MyProject5"&lt;/P&gt;&lt;P&gt;in python 3.X I was using&lt;/P&gt;&lt;PRE style="color: #333333; background-color: #eeffcc; border: 1px solid #aacc99; font-size: 15.44px; padding: 5px;"&gt;&lt;SPAN class="" style="color: #007020; font-weight: bold;"&gt;from&lt;/SPAN&gt; &lt;SPAN class="" style="color: #0e84b5; font-weight: bold;"&gt;pathlib&lt;/SPAN&gt; &lt;SPAN class="" style="color: #007020; font-weight: bold;"&gt;import&lt;/SPAN&gt; &lt;SPAN class=""&gt;Path&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;p=Path(&lt;SPAN&gt;os.path.join(gbd_path,gdb_name)&lt;/SPAN&gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this used to work, but I am not sure what to use in 2.7&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Aug 2020 21:27:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-listfeatureclasses-doesn-t-work-when-using/m-p/381490#M30054</guid>
      <dc:creator>AhmadSALEH1</dc:creator>
      <dc:date>2020-08-17T21:27:11Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy.ListFeatureClasses doesn't work when using  os.path.join</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-listfeatureclasses-doesn-t-work-when-using/m-p/381491#M30055</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you provide this&lt;/P&gt;&lt;P&gt;n = "f.gdb"&lt;BR /&gt;g = "C:\ahmad data\data\MyProject5"&lt;/P&gt;&lt;P&gt;os.path.join(g, n)&lt;BR /&gt;'C:\x07hmad data\\data\\MyProject5\\f.gdb'&amp;nbsp; # ---- fails&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This works&lt;/P&gt;&lt;P&gt;n = "f.gdb"&lt;BR /&gt;g0 = r"C:\ahmad data\data\MyProject5"&amp;nbsp; # ---- raw format&lt;/P&gt;&lt;P&gt;os.path.join(g0, n)&lt;BR /&gt;&amp;nbsp;'C:\\ahmad data\\data\\MyProject5\\f.gdb'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or check pathlib in 2.7&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://docs.python.org/2.7/" title="https://docs.python.org/2.7/"&gt;Python 2.7.18 documentation&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if you must use arcmap&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;n = "f.gdb"&lt;BR /&gt;g ="C:/ahmad data/data/MyProject5"&lt;/P&gt;&lt;P&gt;p = "{}/{}".format(g, n)&lt;/P&gt;&lt;P&gt;p&lt;BR /&gt;'C:/ahmad data/data/MyProject5/f.gdb'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;which will work fine&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Aug 2020 22:08:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-listfeatureclasses-doesn-t-work-when-using/m-p/381491#M30055</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2020-08-17T22:08:38Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy.ListFeatureClasses doesn't work when using  os.path.join</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-listfeatureclasses-doesn-t-work-when-using/m-p/381492#M30056</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Regarding:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;I am under the assumption that&amp;nbsp;os.path.join(gbd_path,gdb_name) does the same job as using the "r" before the path!&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;You are incorrect.&amp;nbsp; os.path.join won't convert or treat a regular string literal to a raw string literal.&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; os
&lt;SPAN class="operator token"&gt;&amp;gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt;
&lt;SPAN class="operator token"&gt;&amp;gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; path &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"C:\ahmad data\data\MyProject5"&lt;/SPAN&gt;
&lt;SPAN class="operator token"&gt;&amp;gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; raw_path &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; r&lt;SPAN class="string token"&gt;"C:\ahmad data\data\MyProject5"&lt;/SPAN&gt;
&lt;SPAN class="operator token"&gt;&amp;gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; name &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"f.gdb"&lt;/SPAN&gt;
&lt;SPAN class="operator token"&gt;&amp;gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt;
&lt;SPAN class="operator token"&gt;&amp;gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;print&lt;/SPAN&gt;&lt;SPAN class="punctuation 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;join&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;path&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; name&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
C&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;hmad data\data\MyProject5\f&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;gdb
&lt;SPAN class="operator token"&gt;&amp;gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; 
&lt;SPAN class="operator token"&gt;&amp;gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;print&lt;/SPAN&gt;&lt;SPAN class="punctuation 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;join&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;raw_path&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;name&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
C&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;\ahmad data\data\MyProject5\f&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;gdb
&lt;SPAN class="operator token"&gt;&amp;gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&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;/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;P&gt;Your issue is that "\a" is a Python escape sequence for ASCII Bell (BEL) character.&amp;nbsp; If you don't properly escape it, or use raw string notation, that character will make a little chime on your speakers and then be removed from the string.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When you say "this used to work," I am guessing the path was different and didn't involve any Python escape sequences.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 17:35:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-listfeatureclasses-doesn-t-work-when-using/m-p/381492#M30056</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2021-12-11T17:35:32Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy.ListFeatureClasses doesn't work when using  os.path.join</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-listfeatureclasses-doesn-t-work-when-using/m-p/381493#M30057</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Joshua, this explains a lot.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Aug 2020 14:47:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-listfeatureclasses-doesn-t-work-when-using/m-p/381493#M30057</guid>
      <dc:creator>AhmadSALEH1</dc:creator>
      <dc:date>2020-08-19T14:47:37Z</dc:date>
    </item>
  </channel>
</rss>

