<?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: arcgis.mapping.ogc.WMSLayer problem with proxy or ssl? in ArcGIS API for Python Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-python-questions/arcgis-mapping-ogc-wmslayer-problem-with-proxy-or/m-p/1325927#M8978</link>
    <description>&lt;P&gt;Hi did you ever resolve this issue?&amp;nbsp; Im running into the same error when adding a WMS Layer - AttributeError: 'str' object has no attribute 'Name'&lt;/P&gt;</description>
    <pubDate>Wed, 06 Sep 2023 15:03:30 GMT</pubDate>
    <dc:creator>yeager3286</dc:creator>
    <dc:date>2023-09-06T15:03:30Z</dc:date>
    <item>
      <title>arcgis.mapping.ogc.WMSLayer problem with proxy or ssl?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/arcgis-mapping-ogc-wmslayer-problem-with-proxy-or/m-p/1110802#M6759</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;I'm connecting to our on premise Portal, only available in our network, so I don't use proxy.&lt;/P&gt;&lt;LI-CODE lang="python"&gt;gis = GIS(portal_url, username, portal_user_password, verify_cert=False)&lt;/LI-CODE&gt;&lt;P&gt;connection &lt;STRONG&gt;works&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;After that I'm creating a new web map&lt;/P&gt;&lt;LI-CODE lang="python"&gt;new_map = WebMap()&lt;/LI-CODE&gt;&lt;P&gt;&lt;STRONG&gt;works&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Now I'm querying an item from our portal which is of type "WMS". This &lt;STRONG&gt;works&lt;/STRONG&gt; as well but the WMS has an Internet URL.&lt;BR /&gt;&lt;BR /&gt;Now I want to add this Internet WMS to my webmap:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;wms_layer = WMSLayer(wmslayer[0].url)&lt;/LI-CODE&gt;&lt;P&gt;&lt;STRONG&gt;works&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;But when I do&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;new_map .add_layer(wms_layer.layers[0])&lt;/LI-CODE&gt;&lt;P&gt;I get an &lt;STRONG&gt;error&lt;/STRONG&gt;:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;A connection error has occurred: HTTPSConnectionPool(host='our.internet.domain', port=443): Max retries exceeded with url: /arcgis/services/wms/some_service/MapServer/WMSServer?service=WMS&amp;amp;request=GetCapabilities&amp;amp;version=1.3.0&amp;amp;token=short-live-token (Caused by NewConnectionError('&amp;lt;urllib3.connection.HTTPSConnection object at 0x000001A3853E41C8&amp;gt;: Failed to establish a new connection: [Errno 11001] getaddrinfo failed'))&lt;/P&gt;&lt;P&gt;How can I tell urlllib3 or the arcgis API to use proxy on specific requests but not for my portal itself?&lt;/P&gt;</description>
      <pubDate>Mon, 25 Oct 2021 13:11:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/arcgis-mapping-ogc-wmslayer-problem-with-proxy-or/m-p/1110802#M6759</guid>
      <dc:creator>RichardReinicke</dc:creator>
      <dc:date>2021-10-25T13:11:28Z</dc:date>
    </item>
    <item>
      <title>Re: arcgis.mapping.ogc.WMSLayer problem with proxy or ssl?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/arcgis-mapping-ogc-wmslayer-problem-with-proxy-or/m-p/1111186#M6761</link>
      <description>&lt;P&gt;I've been able to resolve the public URL for our internal tests so the name resolution error is gone.&lt;BR /&gt;&lt;BR /&gt;But now there seems to be another issue with the WMSLayer().&lt;/P&gt;&lt;P&gt;I'm passing the whole WMSLayer to map.add_layer() at the moment.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;ipython-input-67-6b3ee09406c0&amp;gt; in map_add_layer(map, layer, options)
      1 def map_add_layer(map, layer, options):
----&amp;gt; 2     map.add_layer(layer, options=options)
      3 
      4 if map_layers[0].isWebLayer and "wms" in map_layers[0].dataSource.lower():
      5     # Try to find WMS in portal sources

~\AppData\Local\ESRI\conda\envs\arcgispro-py3-clone1\lib\site-packages\arcgis\mapping\_types.py in add_layer(self, layer, options)
    426             return True
    427         elif isinstance(layer, BaseOGC):
--&amp;gt; 428             lyr = layer._lyr_json
    429             title = lyr["title"]
    430             opacity = lyr["opacity"]

~\AppData\Local\ESRI\conda\envs\arcgispro-py3-clone1\lib\site-packages\arcgis\mapping\ogc\_wms.py in _lyr_json(self)
    198             "url" : self._url,
    199             "version" : self._version,
--&amp;gt; 200             "sublayers" : [{'name' : lyr.Name} for lyr in self.layers],
    201             "minScale" : self.scale[0],
    202             "maxScale" : self.scale[1],

~\AppData\Local\ESRI\conda\envs\arcgispro-py3-clone1\lib\site-packages\arcgis\mapping\ogc\_wms.py in &amp;lt;listcomp&amp;gt;(.0)
    198             "url" : self._url,
    199             "version" : self._version,
--&amp;gt; 200             "sublayers" : [{'name' : lyr.Name} for lyr in self.layers],
    201             "minScale" : self.scale[0],
    202             "maxScale" : self.scale[1],

AttributeError: 'str' object has no attribute 'Name'&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Am I doing anything wrong? Why are there internal type conflicts in WMSLayer object? It's an ArcGIS Server WMS with Esri Python API.&lt;/P&gt;</description>
      <pubDate>Tue, 26 Oct 2021 09:39:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/arcgis-mapping-ogc-wmslayer-problem-with-proxy-or/m-p/1111186#M6761</guid>
      <dc:creator>RichardReinicke</dc:creator>
      <dc:date>2021-10-26T09:39:58Z</dc:date>
    </item>
    <item>
      <title>Re: arcgis.mapping.ogc.WMSLayer problem with proxy or ssl?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/arcgis-mapping-ogc-wmslayer-problem-with-proxy-or/m-p/1325927#M8978</link>
      <description>&lt;P&gt;Hi did you ever resolve this issue?&amp;nbsp; Im running into the same error when adding a WMS Layer - AttributeError: 'str' object has no attribute 'Name'&lt;/P&gt;</description>
      <pubDate>Wed, 06 Sep 2023 15:03:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/arcgis-mapping-ogc-wmslayer-problem-with-proxy-or/m-p/1325927#M8978</guid>
      <dc:creator>yeager3286</dc:creator>
      <dc:date>2023-09-06T15:03:30Z</dc:date>
    </item>
  </channel>
</rss>

