<?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: arcgispro_py39 gdal version 3.7.0e is recognized as invalid version in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/arcgispro-py39-gdal-version-3-7-0e-is-recognized/m-p/1404614#M81265</link>
    <description>&lt;P&gt;Resolved with latest version of geopandas &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 02 Apr 2024 14:30:49 GMT</pubDate>
    <dc:creator>RémiBRAUN</dc:creator>
    <dc:date>2024-04-02T14:30:49Z</dc:date>
    <item>
      <title>arcgispro_py39 gdal version 3.7.0e is recognized as invalid version</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/arcgispro-py39-gdal-version-3-7-0e-is-recognized/m-p/1364021#M76690</link>
      <description>&lt;P&gt;I recently cloned arcgispro-py3 env so that that i can use geopandas and arcpy together to output geodataframe to featureclass. To do that, I first export GPKG and then copy over the layer to GDB. It seems that I cannot export to GPKG because geopandas.to_file() depends on fiona, and fiona checks for gdal version. gdal that comes with the cloned env is version "3.7.0e" which throws an error exception because that version cannot be parsed using the regex pattern set in version.py. I believe the string has to be gdal.__version__ == '3.7.0'.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;these are the libs and versions that i am working with:&lt;/P&gt;&lt;P&gt;geopandas = '0.12.2'&lt;/P&gt;&lt;P&gt;fiona = '1.8.21'&lt;/P&gt;&lt;P&gt;gdal = '3.7.0e'&lt;/P&gt;&lt;P&gt;arcpy = '3.2'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the error output:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;Cell In[11], line 32
     27 from arcpy import conversion
     28 """Converts a geopandas dataframe to a geopackge layer, converts
     29 the geopackage layer to a new feature class in a gdb using arcpy.
     30 Returns path to new feature class."""
---&amp;gt; 32 in_gdf.to_file("temp_package.gpkg", layer="temp_package_layer", driver="GPKG")
     33 gpkg_layerpath = os.path.join(os.getcwd(), 'temp_package.gpkg\main.temp_geopackage_layer')
     34 conversion.FeatureClassToFeatureClass(gpkg_layerpath, out_gdb, out_layer)

File c:\Program Files\ArcGIS\Pro\bin\Python\envs\OpenArcpy\lib\site-packages\geopandas\geodataframe.py:1203, in GeoDataFrame.to_file(self, filename, driver, schema, index, **kwargs)
   1120 """Write the ``GeoDataFrame`` to a file.
   1121 
   1122 By default, an ESRI shapefile is written, but any OGR data source
   (...)
   1199 &amp;gt;&amp;gt;&amp;gt; gdf.to_file('dataframe.shp', mode="a")  # doctest: +SKIP
   1200 """
   1201 from geopandas.io.file import _to_file
-&amp;gt; 1203 _to_file(self, filename, driver, schema, index, **kwargs)

File c:\Program Files\ArcGIS\Pro\bin\Python\envs\OpenArcpy\lib\site-packages\geopandas\io\file.py:545, in _to_file(df, filename, driver, schema, index, mode, crs, engine, **kwargs)
    538     warnings.warn(
    539         "Column names longer than 10 characters will be truncated when saved to "
    540         "ESRI Shapefile.",
    541         stacklevel=3,
    542     )
    544 if engine == "fiona":
--&amp;gt; 545     _to_file_fiona(df, filename, driver, schema, crs, mode, **kwargs)
    546 elif engine == "pyogrio":
    547     _to_file_pyogrio(df, filename, driver, schema, crs, mode, **kwargs)

File c:\Program Files\ArcGIS\Pro\bin\Python\envs\OpenArcpy\lib\site-packages\geopandas\io\file.py:568, in _to_file_fiona(df, filename, driver, schema, crs, mode, **kwargs)
    566 except AttributeError:
    567     gdal_version = "2.0.0"  # just assume it is not the latest
--&amp;gt; 568 if Version(gdal_version) &amp;gt;= Version("3.0.0") and crs:
    569     crs_wkt = crs.to_wkt()
    570 elif crs:

File c:\Program Files\ArcGIS\Pro\bin\Python\envs\OpenArcpy\lib\site-packages\packaging\version.py:200, in Version.__init__(self, version)
    198 match = self._regex.search(version)
    199 if not match:
--&amp;gt; 200     raise InvalidVersion(f"Invalid version: '{version}'")
    202 # Store the parsed out pieces of the version
    203 self._version = _Version(
    204     epoch=int(match.group("epoch")) if match.group("epoch") else 0,
    205     release=tuple(int(i) for i in match.group("release").split(".")),
   (...)
    211     local=_parse_local_version(match.group("local")),
    212 )

InvalidVersion: Invalid version: '3.7.0e'&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 22 Dec 2023 16:44:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/arcgispro-py39-gdal-version-3-7-0e-is-recognized/m-p/1364021#M76690</guid>
      <dc:creator>MurtazaNasafi</dc:creator>
      <dc:date>2023-12-22T16:44:49Z</dc:date>
    </item>
    <item>
      <title>Re: arcgispro_py39 gdal version 3.7.0e is recognized as invalid version</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/arcgispro-py39-gdal-version-3-7-0e-is-recognized/m-p/1365573#M76869</link>
      <description>&lt;P&gt;I'm experiencing a similar error when writing to shp. Pseudo code example:&lt;/P&gt;&lt;PRE&gt;&lt;SPAN class=""&gt;url = 'https://www2.census.gov/geo/tiger/TIGER2022/ROADS/tl_2022_01003_roads.zip'&lt;BR /&gt;gdf&lt;/SPAN&gt; &lt;SPAN class=""&gt;=&lt;/SPAN&gt; &lt;SPAN class=""&gt;geopandas&lt;/SPAN&gt;.&lt;SPAN class=""&gt;read_file&lt;/SPAN&gt;(url)
&lt;SPAN class=""&gt;gdf&lt;/SPAN&gt;.&lt;SPAN class=""&gt;to_file&lt;/SPAN&gt;(&lt;SPAN class=""&gt;'~&lt;SPAN class=""&gt;\&lt;/SPAN&gt;tl_2022_01003_roads.shp'&lt;/SPAN&gt;)&lt;/PRE&gt;&lt;P&gt;Relevant env versions:&amp;nbsp;&lt;/P&gt;&lt;P&gt;pkgs/main/win-64::geopandas-0.12.2-py39haa95532_0&lt;/P&gt;&lt;P&gt;esri::gdal-3.7.0-arcgispro_py39_17195 (pinned in clone)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Appears this has been an issue in some prior versions as well:&amp;nbsp;&lt;A href="https://stackoverflow.com/questions/75994612/invalidversion-error-returned-when-writting-an-esri-shp-file-geopandas-geodata" target="_blank"&gt;https://stackoverflow.com/questions/75994612/invalidversion-error-returned-when-writting-an-esri-shp-file-geopandas-geodata&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 02 Jan 2024 20:51:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/arcgispro-py39-gdal-version-3-7-0e-is-recognized/m-p/1365573#M76869</guid>
      <dc:creator>JBousquin</dc:creator>
      <dc:date>2024-01-02T20:51:29Z</dc:date>
    </item>
    <item>
      <title>Re: arcgispro_py39 gdal version 3.7.0e is recognized as invalid version</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/arcgispro-py39-gdal-version-3-7-0e-is-recognized/m-p/1369448#M77332</link>
      <description>&lt;P&gt;I'm experiencing identical issue, have you had any luck resolving?&lt;/P&gt;&lt;P&gt;My workaround has been to use &lt;SPAN&gt;geopandas = '0.9.0', which seems to be less stringent in its version check. Ideally I'd like to get onto a higher version of gpd though; there are various 0.9.0 conflicts ArcGIS Pro 3.2 standard environment, for example the higher version of pandas (e.g. pandas.Int64Index deprecation).&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 12 Jan 2024 11:33:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/arcgispro-py39-gdal-version-3-7-0e-is-recognized/m-p/1369448#M77332</guid>
      <dc:creator>JamesMonnington1</dc:creator>
      <dc:date>2024-01-12T11:33:44Z</dc:date>
    </item>
    <item>
      <title>Re: arcgispro_py39 gdal version 3.7.0e is recognized as invalid version</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/arcgispro-py39-gdal-version-3-7-0e-is-recognized/m-p/1370858#M77486</link>
      <description>&lt;P&gt;I would be very grateful to see this resolved &lt;span class="lia-unicode-emoji" title=":folded_hands:"&gt;🙏&lt;/span&gt;&lt;/P&gt;&lt;P&gt;The workaround I found is to write the file using pyogrio as stated &lt;A href="https://geopandas.org/en/stable/docs/user_guide/io.html#reading-spatial-data" target="_self"&gt;here&lt;/A&gt;:&lt;/P&gt;&lt;PRE&gt;&lt;SPAN class=""&gt;geopandas&lt;/SPAN&gt;&lt;SPAN class=""&gt;.&lt;/SPAN&gt;&lt;SPAN class=""&gt;options&lt;/SPAN&gt;&lt;SPAN class=""&gt;.&lt;/SPAN&gt;&lt;SPAN class=""&gt;io_engine&lt;/SPAN&gt; &lt;SPAN class=""&gt;=&lt;/SPAN&gt; &lt;SPAN class=""&gt;"pyogrio"&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jan 2024 07:55:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/arcgispro-py39-gdal-version-3-7-0e-is-recognized/m-p/1370858#M77486</guid>
      <dc:creator>RémiBRAUN</dc:creator>
      <dc:date>2024-01-17T07:55:02Z</dc:date>
    </item>
    <item>
      <title>Re: arcgispro_py39 gdal version 3.7.0e is recognized as invalid version</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/arcgispro-py39-gdal-version-3-7-0e-is-recognized/m-p/1371506#M77563</link>
      <description>&lt;P&gt;I created an &lt;A href="https://github.com/geopandas/geopandas/issues/3147" target="_self"&gt;issue&lt;/A&gt; on geopandas' GitHub, even if this is clearly an Esri problem, creating weird versions of packages...&lt;/P&gt;&lt;P&gt;@Esri, please stick to usual versionning &lt;span class="lia-unicode-emoji" title=":folded_hands:"&gt;🙏&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jan 2024 08:04:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/arcgispro-py39-gdal-version-3-7-0e-is-recognized/m-p/1371506#M77563</guid>
      <dc:creator>RémiBRAUN</dc:creator>
      <dc:date>2024-01-18T08:04:01Z</dc:date>
    </item>
    <item>
      <title>Re: arcgispro_py39 gdal version 3.7.0e is recognized as invalid version</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/arcgispro-py39-gdal-version-3-7-0e-is-recognized/m-p/1371597#M77580</link>
      <description>&lt;DIV&gt;&lt;SPAN&gt;it seems that we have arrived to the same workaround of avoiding Fiona to write to GPKG, but yours looks more elegant. &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;def geopandas_to_featureclass(in_gdf, out_gdb, out_layer):
    from arcpy import conversion
    from pyogrio import write_dataframe
   
    write_dataframe(in_gdf, "temp_package.gpkg", layer="temp_package_layer")
    gpkg_layerpath = os.path.join(os.getcwd(), r'temp_package.gpkg', 'main.temp_package_layer')
    conversion.FeatureClassToFeatureClass(gpkg_layerpath, out_gdb, out_layer)


    os.remove('temp_package.gpkg')
    return os.path.join(out_gdb, out_layer)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jan 2024 14:27:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/arcgispro-py39-gdal-version-3-7-0e-is-recognized/m-p/1371597#M77580</guid>
      <dc:creator>MurtazaNasafi</dc:creator>
      <dc:date>2024-01-18T14:27:21Z</dc:date>
    </item>
    <item>
      <title>Re: arcgispro_py39 gdal version 3.7.0e is recognized as invalid version</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/arcgispro-py39-gdal-version-3-7-0e-is-recognized/m-p/1376258#M78098</link>
      <description>&lt;P&gt;I have also the same issue - is there an update from @ESRI?&lt;/P&gt;</description>
      <pubDate>Wed, 31 Jan 2024 01:47:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/arcgispro-py39-gdal-version-3-7-0e-is-recognized/m-p/1376258#M78098</guid>
      <dc:creator>alexislitvine2</dc:creator>
      <dc:date>2024-01-31T01:47:34Z</dc:date>
    </item>
    <item>
      <title>Re: arcgispro_py39 gdal version 3.7.0e is recognized as invalid version</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/arcgispro-py39-gdal-version-3-7-0e-is-recognized/m-p/1404614#M81265</link>
      <description>&lt;P&gt;Resolved with latest version of geopandas &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 02 Apr 2024 14:30:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/arcgispro-py39-gdal-version-3-7-0e-is-recognized/m-p/1404614#M81265</guid>
      <dc:creator>RémiBRAUN</dc:creator>
      <dc:date>2024-04-02T14:30:49Z</dc:date>
    </item>
  </channel>
</rss>

