Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

InsecureRequestWarning #2164

Open
FeralCatColonist opened this issue Nov 18, 2024 · 3 comments
Open

InsecureRequestWarning #2164

FeralCatColonist opened this issue Nov 18, 2024 · 3 comments
Labels

Comments

@FeralCatColonist
Copy link

Describe the bug
When using the ArcGIS API from the Esri Anaconda repository, fetching a content search, the urllib3 warning appears when search parameter max_items>200 or max_items=-1; this is not reproducible when using the arcgis library shipped with ArcGIS Pro 3.4.0

To Reproduce
Steps to reproduce the behavior:

# MINIMUM EXAMPLE
import arcgis

gis = arcgis.gis.GIS("pro")
content_list = gis.content.search(query="*", max_items=201)
print(f"\nat ArcGIS API for Python version {arcgis.__version__}\ncontent.search triggers, additional API calls trigger same warning\n")
content_list[0].get_data()

error:

c:\Users\feralcatcolonist\AppData\Local\miniforge3\envs\esri\Lib\site-packages\urllib3\connectionpool.py:1099: InsecureRequestWarning: Unverified HTTPS request is being made to host 'www.arcgis.com'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#tls-warnings
  warnings.warn(

Screenshots
working in ArcGIS Pro
image
not working in standalone environment from Esri's Anaconda channel when search greater than 200
image
working in standalone environment from Esri's Anaconda channel when search is equal to or less than 200
image
same results in Jupyter Notebook
image

Expected behavior
At the previous version 2.3.x this issue did not surface; I would not expect to see insecure requests happening when utilizing the "pro" method of authentication.

Platform (please complete the following information):

  • OS: Windows 11
  • IDE: VS Code
  • Also tested in Jupyter Notebook that ships with the Esri Anaconda distribution
  • Python API Version 2.4.0
@nanaeaubry
Copy link
Contributor

@FeralCatColonist Thank we are working on this. It has to do with us making the API a bit more robust.

@FeralCatColonist
Copy link
Author

Cool cool, so there should not be any impact- -just a warning to ignore?

@nanaeaubry
Copy link
Contributor

@FeralCatColonist As far as we know yes. The tests we have still give expected results but just warnings before

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants