<?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: error loading WFS url in Developers Questions</title>
    <link>https://community.esri.com/t5/developers-questions/error-loading-wfs-url/m-p/249612#M1559</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for your reaction Egge-Jan! I'm totally aware of the&amp;nbsp; ontent Esri Nederland offers and I recently received the same part of code by a colleague of yours.&amp;nbsp;In&amp;nbsp;that way my question was a bit unlucky, I guess: in this case Esri Nederland serves the same content as a non ESRI-WFS.&lt;/P&gt;&lt;P&gt;But I was testing WFS in generally, tested the BAG WFS and I thought the problem which occured was a common issue. But if I understand correct, this is a issue due to mismatch in outputFormat? So in this case I won't be able to get the WFS in ArcGIS by any other offered outputformat (gml,&amp;nbsp;json, application/json, gml+xml, etc.)?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 16 Jun 2019 18:41:47 GMT</pubDate>
    <dc:creator>HermanGroeneveld</dc:creator>
    <dc:date>2019-06-16T18:41:47Z</dc:date>
    <item>
      <title>error loading WFS url</title>
      <link>https://community.esri.com/t5/developers-questions/error-loading-wfs-url/m-p/249610#M1557</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I'm still struggling with WFS by using ArcPy. Beneath I have a link to some GIS data. When I click the link, the links shows me the coorect result in the browser, but if I use this link in Arcpy it stumbles on the fs.load(url) and raises an error saying:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;RuntimeError: RecordSetObject: Cannot open table for Load&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;I can't find what's wrong. is it the url? Is it the outputformat? The request? Or is it something else?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the link:&lt;/P&gt;&lt;P&gt;&lt;A href="http://geodata.nationaalgeoregister.nl/bag/wfs?service=wfs&amp;amp;version=2.0.0&amp;amp;request=GetFeature&amp;amp;typeName=bag:verblijfsobject&amp;amp;count=5&amp;amp;outputFormat=json" rel="nofollow noopener noreferrer" target="_blank"&gt;http://geodata.nationaalgeoregister.nl/bag/wfs?service=wfs&amp;amp;version=2.0.0&amp;amp;request=GetFeature&amp;amp;typeName=bag:verblijfsobject&amp;amp;count=5&amp;amp;outputFormat=json&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the code in Python I use:&amp;nbsp;&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

url &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'http://geodata.nationaalgeoregister.nl/bag/wfs?service=wfs&amp;amp;version=2.0.0&amp;amp;request=GetFeature&amp;amp;typeName=bag:verblijfsobject&amp;amp;count=5&amp;amp;outputFormat=json'&lt;/SPAN&gt;
fs &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;FeatureSet&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
fs&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;load&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;url&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
fs&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;save&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;r&lt;SPAN class="string token"&gt;'D:\GIS data\FGDB_datatest.gdb\test_001'&lt;/SPAN&gt;&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;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Please, any help is welcome!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 12:24:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/error-loading-wfs-url/m-p/249610#M1557</guid>
      <dc:creator>HermanGroeneveld</dc:creator>
      <dc:date>2021-12-11T12:24:15Z</dc:date>
    </item>
    <item>
      <title>Re: error loading WFS url</title>
      <link>https://community.esri.com/t5/developers-questions/error-loading-wfs-url/m-p/249611#M1558</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A href="https://community.esri.com/migrated-users/8859" target="_blank"&gt;Herman Groeneveld&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think it is the output format that is wrong; I suppose this &lt;SPAN style="font-family: courier new, courier, monospace;"&gt;FeatureSet&lt;/SPAN&gt; expects input in Esri JSON format, not in the GeoJSON format from the BAG WFS service from nationaalgeoregister.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But did you know that Esri Nederland also serves the official Dutch BAG data via ArcGIS Online? See this page: &lt;SPAN&gt;&lt;A class="link-titled" href="https://www.arcgis.com/home/item.html?id=ec2f977b4d3c41d8967c36f9b99fd725" title="https://www.arcgis.com/home/item.html?id=ec2f977b4d3c41d8967c36f9b99fd725" rel="nofollow noopener noreferrer" target="_blank"&gt;BAG - Basisregistratie Adressen en Gebouwen&lt;/A&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;You can query the Adres layer from this service via this page:&amp;nbsp;&lt;A class="link-titled" href="https://basisregistraties.arcgisonline.nl/arcgis/rest/services/BAG/BAGv2/MapServer/0/query" title="https://basisregistraties.arcgisonline.nl/arcgis/rest/services/BAG/BAGv2/MapServer/0/query" rel="nofollow noopener noreferrer" target="_blank"&gt;Query: Adres (ID: 0)&lt;/A&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;So following the same pattern as the answer you got from Esri Nederland in another thread (&lt;A href="https://community.esri.com/thread/234605" target="_blank"&gt;Make Arcpy use Esri Feature Service&lt;/A&gt;) you can retrieve address points for a Dutch postal code (e.g. 3524WL) like this:&lt;/SPAN&gt;&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="comment token"&gt;# Query URL opbouwen op basis van bepaalde postcode&lt;/SPAN&gt;
ppc &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'3524WL'&lt;/SPAN&gt;
url &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'https://basisregistraties.arcgisonline.nl/arcgis/rest/services/BAG/BAGv2/MapServer/0/query?where=postcode+%3D+%27{}%27&amp;amp;outFields=*&amp;amp;returnGeometry=true&amp;amp;f=pjson'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;format&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;ppc&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;

&lt;SPAN class="comment token"&gt;# Omzetten van query naar feature class&lt;/SPAN&gt;
fs &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;FeatureSet&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
fs&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;load&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;url&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
fs&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;save&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;r&lt;SPAN class="string token"&gt;'C:\Data\output.gdb\PPC6_{}'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;format&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;ppc&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; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"Klaar"&lt;/SPAN&gt;&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;&lt;/P&gt;&lt;P&gt;Hope this helps,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Egge-Jan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 12:24:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/error-loading-wfs-url/m-p/249611#M1558</guid>
      <dc:creator>Egge-Jan_Pollé</dc:creator>
      <dc:date>2021-12-11T12:24:18Z</dc:date>
    </item>
    <item>
      <title>Re: error loading WFS url</title>
      <link>https://community.esri.com/t5/developers-questions/error-loading-wfs-url/m-p/249612#M1559</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for your reaction Egge-Jan! I'm totally aware of the&amp;nbsp; ontent Esri Nederland offers and I recently received the same part of code by a colleague of yours.&amp;nbsp;In&amp;nbsp;that way my question was a bit unlucky, I guess: in this case Esri Nederland serves the same content as a non ESRI-WFS.&lt;/P&gt;&lt;P&gt;But I was testing WFS in generally, tested the BAG WFS and I thought the problem which occured was a common issue. But if I understand correct, this is a issue due to mismatch in outputFormat? So in this case I won't be able to get the WFS in ArcGIS by any other offered outputformat (gml,&amp;nbsp;json, application/json, gml+xml, etc.)?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 16 Jun 2019 18:41:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/error-loading-wfs-url/m-p/249612#M1559</guid>
      <dc:creator>HermanGroeneveld</dc:creator>
      <dc:date>2019-06-16T18:41:47Z</dc:date>
    </item>
    <item>
      <title>Re: error loading WFS url</title>
      <link>https://community.esri.com/t5/developers-questions/error-loading-wfs-url/m-p/249613#M1560</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A href="https://community.esri.com/migrated-users/8859" target="_blank"&gt;Herman Groeneveld&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Did you have a look at this one: &lt;A class="link-titled" href="https://pro.arcgis.com/en/pro-app/tool-reference/conversion/wfs-to-feature-class.htm" title="https://pro.arcgis.com/en/pro-app/tool-reference/conversion/wfs-to-feature-class.htm" rel="nofollow noopener noreferrer" target="_blank"&gt;WFS To Feature Class—Conversion toolbox | ArcGIS Desktop&lt;/A&gt; ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(I am not working for Esri Nederland though &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If we translate the Code Sample from that page to a Dutch example - let's take the Dutch National Parks, my favorite dataset from PDOK - we get something like this:&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;# Name: WFSToFeatureClass_example1.py&lt;/SPAN&gt;
&lt;SPAN class="comment token"&gt;# Description: Create a feature class from a WFS service&lt;/SPAN&gt;

&lt;SPAN class="comment token"&gt;# Import arcpy module&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; arcpy

&lt;SPAN class="comment token"&gt;# Set local variables&lt;/SPAN&gt;
WFS_Service &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"https://geodata.nationaalgeoregister.nl/nationaleparken/wfs?request=GetCapabilities&amp;amp;service=wfs"&lt;/SPAN&gt;
WFS_FeatureType &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"nationaleparken"&lt;/SPAN&gt;
Out_Location &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"C:/Data/output.gdb"&lt;/SPAN&gt;
Out_Name &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"Nationale_Parken"&lt;/SPAN&gt;

&lt;SPAN class="comment token"&gt;# Execute the WFSToFeatureClass tool&lt;/SPAN&gt;
arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;WFSToFeatureClass_conversion&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;WFS_Service&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; WFS_FeatureType&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; Out_Location&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; Out_Name&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;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This will get you all the National Parks in the Netherlands, including the newly created park Nieuw Land - see screen capture below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HTH,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Egge-Jan&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/450483_pastedImage_2.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 12:24:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/error-loading-wfs-url/m-p/249613#M1560</guid>
      <dc:creator>Egge-Jan_Pollé</dc:creator>
      <dc:date>2021-12-11T12:24:21Z</dc:date>
    </item>
    <item>
      <title>Re: error loading WFS url</title>
      <link>https://community.esri.com/t5/developers-questions/error-loading-wfs-url/m-p/249614#M1561</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Egge-Jan, sorry for mistaken you worked for ESRI, I don't know why I had that idea. Maybe because your detailed answer. Anyhow, thanks again for your reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I copied your code and it works like a charm. However, some other datasets provided by PDOK I can't get to work, like this one:&lt;/P&gt;&lt;P&gt;&lt;A href="https://geodata.nationaalgeoregister.nl/ecotopen/wfs?request=GetCapabilities&amp;amp;service=wfs"&gt;https://geodata.nationaalgeoregister.nl/ecotopen/wfs?request=GetCapabilities&amp;amp;service=wfs&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://geodata.nationaalgeoregister.nl/cbspostcode4/wfs?&amp;amp;request=GetCapabilities&amp;amp;service=wfs"&gt;https://geodata.nationaalgeoregister.nl/cbspostcode4/wfs?&amp;amp;request=GetCapabilities&amp;amp;service=wfs&lt;/A&gt;&lt;/P&gt;&lt;P&gt;It raises an error saying 'ERROR 000366: Invalid geometry type'. Any idea why this one doesn't seem to work?&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Jun 2019 10:05:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/error-loading-wfs-url/m-p/249614#M1561</guid>
      <dc:creator>HermanGroeneveld</dc:creator>
      <dc:date>2019-06-17T10:05:01Z</dc:date>
    </item>
    <item>
      <title>Re: error loading WFS url</title>
      <link>https://community.esri.com/t5/developers-questions/error-loading-wfs-url/m-p/249615#M1562</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A href="https://community.esri.com/migrated-users/8859" target="_blank"&gt;Herman Groeneveld&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please have a look at the &lt;STRONG&gt;local variables to set&lt;/STRONG&gt;. If you want to retrieve - say - the postal code polygons for the year 2017, you should not only change the variable &lt;SPAN style="font-family: courier new, courier, monospace;"&gt;WFS_Service&lt;/SPAN&gt;, but also &lt;SPAN style="font-family: courier new, courier, monospace;"&gt;WFS_FeatureType&lt;/SPAN&gt; (and of course &lt;SPAN style="font-family: courier new, courier, monospace;"&gt;Out_Name&lt;/SPAN&gt;, to avoid overwriting previous output...)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When you have a look at the XML returned by the &lt;A class="link-titled" href="https://geodata.nationaalgeoregister.nl/cbspostcode4/wfs?&amp;amp;request=GetCapabilities&amp;amp;service=wfs" title="https://geodata.nationaalgeoregister.nl/cbspostcode4/wfs?&amp;amp;request=GetCapabilities&amp;amp;service=wfs" rel="nofollow noopener noreferrer" target="_blank"&gt;GetCapabilities request for the postal code polygons&lt;/A&gt;, you will see a &lt;SPAN style="font-family: courier new, courier, monospace;"&gt;FeatureTypeList&lt;/SPAN&gt; with 3 FeatureTypes: polygons for the years 2015 (&lt;SPAN style="font-family: courier new, courier, monospace;"&gt;postcode42015&lt;/SPAN&gt;), 2016 (&lt;SPAN style="font-family: courier new, courier, monospace;"&gt;postcode42016&lt;/SPAN&gt;) and 2017 (&lt;SPAN style="font-family: courier new, courier, monospace;"&gt;postcode42017&lt;/SPAN&gt;).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Below you will find the Python script to retrieve all postal code polygons for the year 2017 (4,066 of them) - and yes, like you say, it works like a charm &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;BTW - if you consider one or more of the sub answers useful ("Nuttig"), please do not hesitate to mark them as such. GeoNet likes this kind of feedback.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;And GeoNet would also like to know whether your initial question has been answered - in this way we can help the Esri Community to find useful and correct answers.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;And of course, you are always welcome to post new questions on this great learning resource. Or, equally useful: to post answers to questions posted by others...!&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HTH,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Egge-Jan&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="token tag"&gt;&lt;SPAN class="token tag"&gt;&lt;SPAN class="punctuation token"&gt;&amp;lt;&lt;/SPAN&gt;FeatureTypeList&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;&amp;gt;&lt;/SPAN&gt;&lt;/SPAN&gt;
...
&lt;SPAN class="token tag"&gt;&lt;SPAN class="token tag"&gt;&lt;SPAN class="punctuation token"&gt;&amp;lt;&lt;/SPAN&gt;FeatureType&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;&amp;gt;&lt;/SPAN&gt;&lt;/SPAN&gt;
  &lt;SPAN class="token tag"&gt;&lt;SPAN class="token tag"&gt;&lt;SPAN class="punctuation token"&gt;&amp;lt;&lt;/SPAN&gt;Name&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;&amp;gt;&lt;/SPAN&gt;&lt;/SPAN&gt;cbspostcode4:postcode42017&lt;SPAN class="token tag"&gt;&lt;SPAN class="token tag"&gt;&lt;SPAN class="punctuation token"&gt;&amp;lt;/&lt;/SPAN&gt;Name&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;&amp;gt;&lt;/SPAN&gt;&lt;/SPAN&gt;
  &lt;SPAN class="token tag"&gt;&lt;SPAN class="token tag"&gt;&lt;SPAN class="punctuation token"&gt;&amp;lt;&lt;/SPAN&gt;Title&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;&amp;gt;&lt;/SPAN&gt;&lt;/SPAN&gt;Postcode 2017, numeriek deel&lt;SPAN class="token tag"&gt;&lt;SPAN class="token tag"&gt;&lt;SPAN class="punctuation token"&gt;&amp;lt;/&lt;/SPAN&gt;Title&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;&amp;gt;&lt;/SPAN&gt;&lt;/SPAN&gt;
  &lt;SPAN class="token tag"&gt;&lt;SPAN class="token tag"&gt;&lt;SPAN class="punctuation token"&gt;&amp;lt;&lt;/SPAN&gt;Abstract&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;&amp;gt;&lt;/SPAN&gt;&lt;/SPAN&gt;
    Gegevens per numeriek deel van de postcode voor het jaar 2017
  &lt;SPAN class="token tag"&gt;&lt;SPAN class="token tag"&gt;&lt;SPAN class="punctuation token"&gt;&amp;lt;/&lt;/SPAN&gt;Abstract&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;&amp;gt;&lt;/SPAN&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;/CODE&gt;&lt;/PRE&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;# Name: WFSToFeatureClass_example1.py&lt;/SPAN&gt;
&lt;SPAN class="comment token"&gt;# Description: Create a feature class from a WFS service&lt;/SPAN&gt;

&lt;SPAN class="comment token"&gt;# Import arcpy module&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; arcpy

&lt;SPAN class="comment token"&gt;# Set local variables&lt;/SPAN&gt;
WFS_Service &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"https://geodata.nationaalgeoregister.nl/cbspostcode4/wfs?&amp;amp;request=GetCapabilities&amp;amp;service=wfs"&lt;/SPAN&gt;
WFS_FeatureType &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"postcode42017"&lt;/SPAN&gt;
Out_Location &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"C:/Data/output.gdb"&lt;/SPAN&gt;
Out_Name &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"postcode42017"&lt;/SPAN&gt;

&lt;SPAN class="comment token"&gt;# Execute the WFSToFeatureClass tool&lt;/SPAN&gt;
arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;WFSToFeatureClass_conversion&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;WFS_Service&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; WFS_FeatureType&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; Out_Location&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; Out_Name&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;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 12:24:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/error-loading-wfs-url/m-p/249615#M1562</guid>
      <dc:creator>Egge-Jan_Pollé</dc:creator>
      <dc:date>2021-12-11T12:24:23Z</dc:date>
    </item>
    <item>
      <title>Re: error loading WFS url</title>
      <link>https://community.esri.com/t5/developers-questions/error-loading-wfs-url/m-p/249616#M1563</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I tested your code with the postcode42017, which indeed works like a charm. But I'm not able to use the environment Extent setting. The &lt;A href="https://desktop.arcgis.com/en/arcmap/latest/tools/conversion-toolbox/wfs-to-feature-class.htm" rel="nofollow noopener noreferrer" target="_blank"&gt;documentation&lt;/A&gt; tells me the WFS To Feature Class conversion should work with the extent of a feature class, display or whatever:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;&lt;SPAN style="color: #4c4c4c; background-color: #ffffff;"&gt;By default all features from the WFS source are added to the feature class. The extent environment setting can be used to limit the features to just those that intersect a user-defined extent...&lt;/SPAN&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;So I copied your code, added lines 3,4 en 5. (Those lines worked well on a regelar featureclass in combimnation with Select_analysis)&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

fc_ext &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; r&lt;SPAN class="string token"&gt;"C:\Users\Herman\OneDrive\Algemeen\ArcGIS\GIS data\FGDB_datatest.gdb\DS_datatest\test_01"&lt;/SPAN&gt;
desc &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Describe&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;fc_ext&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;extent &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; desc&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;extent

WFS_Service &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"https://geodata.nationaalgeoregister.nl/cbspostcode4/wfs?&amp;amp;request=GetCapabilities&amp;amp;service=wfs"&lt;/SPAN&gt;
WFS_FeatureType &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"postcode42017"&lt;/SPAN&gt;
Out_Location &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; r&lt;SPAN class="string token"&gt;"C:\Users\Herman\OneDrive\Algemeen\ArcGIS\GIS data\FGDB_datatest.gdb"&lt;/SPAN&gt;
Out_Name &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"tmp2"&lt;/SPAN&gt;

&lt;SPAN class="comment token"&gt;# Execute the WFSToFeatureClass tool&lt;/SPAN&gt;
arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;WFSToFeatureClass_conversion&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;WFS_Service&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; WFS_FeatureType&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; Out_Location&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; Out_Name&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;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The code above raises an error saying:&lt;/P&gt;&lt;P&gt;ERROR 999999: Error executing function&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I make the extent setting get to work for me???&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 12:24:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/error-loading-wfs-url/m-p/249616#M1563</guid>
      <dc:creator>HermanGroeneveld</dc:creator>
      <dc:date>2021-12-11T12:24:26Z</dc:date>
    </item>
    <item>
      <title>Re: error loading WFS url</title>
      <link>https://community.esri.com/t5/developers-questions/error-loading-wfs-url/m-p/249617#M1564</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A href="https://community.esri.com/migrated-users/8859" target="_blank"&gt;Herman Groeneveld&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yeah, you cannot query a WFS service when you use the &lt;SPAN style="font-family: courier new, courier, monospace;"&gt;GetCapabilities&lt;/SPAN&gt; request. By default all features from the WFS source are added to the feature class. It is cool that you can use the extent environment setting to set a bounding box. I didn't know that....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But no, I do not get it running either. I tried to set the &lt;A class="link-titled" href="https://pro.arcgis.com/en/pro-app/tool-reference/environment-settings/output-extent.htm" title="https://pro.arcgis.com/en/pro-app/tool-reference/environment-settings/output-extent.htm" rel="nofollow noopener noreferrer" target="_blank"&gt;Extent (Environment setting)&lt;/A&gt; in both RD_New and WGS84, but in both cases I run into the same ERROR 999999 like you...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Below you will find the code I used to test this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tip: maybe you should ask this in a new question on GeoNet, to see whether someone from the wider community can help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Egge-Jan&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;# Name: WFSToFeatureClass_example1.py&lt;/SPAN&gt;
&lt;SPAN class="comment token"&gt;# Description: Create a feature class from a WFS service&lt;/SPAN&gt;

&lt;SPAN class="comment token"&gt;# Import arcpy module&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; arcpy

&lt;SPAN class="comment token"&gt;# Set the extent environment using the Extent class.&lt;/SPAN&gt;
&lt;SPAN class="comment token"&gt;# arcpy.env.extent = arcpy.Extent(140000, 448000, 170000, 478000) # Coordinates in RD_New (28992)&lt;/SPAN&gt;
arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;env&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;extent &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Extent&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;5.1686749&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;52.0201494&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;5.6070564&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;52.2897848&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="comment token"&gt;# Coordinates in WGS84 (4326)&lt;/SPAN&gt;

&lt;SPAN class="comment token"&gt;# Set local variables&lt;/SPAN&gt;
WFS_Service &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"https://geodata.nationaalgeoregister.nl/cbspostcode4/wfs?&amp;amp;request=GetCapabilities&amp;amp;service=wfs"&lt;/SPAN&gt;
WFS_FeatureType &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"postcode42017"&lt;/SPAN&gt;
Out_Location &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"C:/Data/output.gdb"&lt;/SPAN&gt;
Out_Name &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"postcode42017_new"&lt;/SPAN&gt;

&lt;SPAN class="comment token"&gt;# Execute the WFSToFeatureClass tool&lt;/SPAN&gt;
arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;WFSToFeatureClass_conversion&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;WFS_Service&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; WFS_FeatureType&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; Out_Location&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; Out_Name&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;/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;.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 12:24:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/error-loading-wfs-url/m-p/249617#M1564</guid>
      <dc:creator>Egge-Jan_Pollé</dc:creator>
      <dc:date>2021-12-11T12:24:29Z</dc:date>
    </item>
    <item>
      <title>Re: error loading WFS url</title>
      <link>https://community.esri.com/t5/developers-questions/error-loading-wfs-url/m-p/1209721#M6342</link>
      <description>&lt;P&gt;Same issue 3 years later. Doesnt work.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Owslib doesnt work. Regular python libs wont work. Qgis wont work. Seems wfs services are dead...&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 05 Sep 2022 20:59:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/error-loading-wfs-url/m-p/1209721#M6342</guid>
      <dc:creator>diaconori</dc:creator>
      <dc:date>2022-09-05T20:59:19Z</dc:date>
    </item>
  </channel>
</rss>

