# Different log messages with python requests cert validation, between EF1 and EF2?

**URL:** <https://community.dynatrace.com/t/different-log-messages-with-python-requests-cert-validation-between-ef1-and-ef2/48241>\
**Category:** Extensions\
**Tags:** extensions\
**Created:** [October 9, 2024, 7:00pm UTC](https://community.dynatrace.com/t/different-log-messages-with-python-requests-cert-validation-between-ef1-and-ef2/48241 "2024-10-09T19:00:22Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![AntonioSousa](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/antoniosousa/32/50_2.png) [@AntonioSousa](https://community.dynatrace.com/u/AntonioSousa)\
**Post date:** [October 9, 2024, 7:00pm UTC](https://community.dynatrace.com/t/different-log-messages-with-python-requests-cert-validation-between-ef1-and-ef2/48241/1 "2024-10-09T19:00:22Z")

</div>

In most of my extensions, I use requests to the AG localhost, using the API for several use-cases.

Because AG’s don’t typically have valid certs, I use the verify=False parameter to force not checking cert validity when communicating with AG.

In EF1, I had the following entries in the log files:

```markup
2024-10-09 18:28:01.190 UTC WARNING [Python][14120372674404520656][XXXXXX][140651756611328][ThreadPoolExecutor-0_1] - [write] /var/lib/dynatrace/remotepluginmodule/agent/runtime/engine_unzipped/site-packages/urllib3/connectionpool.py:1061: InsecureRequestWarning: Unverified HTTPS request is being made to host 'localhost'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings
warnings.warn(

```

In EF2, I now have:

```markup
[9d149e58-ac16-3f82-afa1-3e262574cdd5][-1571001820422410953][3642652][err]/var/lib/dynatrace/remotepluginmodule/agent/runtime/extensions/python_venvs/XXXXXX/lib/python3.10/site-packages/urllib3/connectionpool.py:1099: InsecureRequestWarning: Unverified HTTPS request is being made to host 'localhost'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#tls-warnings
[9d149e58-ac16-3f82-afa1-3e262574cdd5][-1571001820422410953][3642652][err] warnings.warn(

```

What was a WARNING before turns out to be an ERROR now. And it messes up log analysis.

I would say that this is a consequence of moving from python 3.8 to 3.10, but can someone confirm?

---

<div class="post-metadata">

**Author:** ![david\_lopes](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/david_lopes/32/27273_2.png) [@david\_lopes](https://community.dynatrace.com/u/david_lopes)\
**Post date:** [October 9, 2024, 10:33pm UTC](https://community.dynatrace.com/t/different-log-messages-with-python-requests-cert-validation-between-ef1-and-ef2/48241/2 "2024-10-09T22:33:18Z")

</div>

That is because the message is printed to the standard error output (stderr) You should disable that warning if you want to get rid of the message, a quick google should show how

---

<div class="post-metadata">

**Author:** ![AntonioSousa](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/antoniosousa/32/50_2.png) [@AntonioSousa](https://community.dynatrace.com/u/AntonioSousa)\
**Post date:** [October 10, 2024, 2:16pm UTC](https://community.dynatrace.com/t/different-log-messages-with-python-requests-cert-validation-between-ef1-and-ef2/48241/3 "2024-10-10T14:16:57Z")

</div>

[@david\_lopes](https://community.dynatrace.com/user/4044),

Yes, best to do, get rid of it, as it was polluting the logs. For all other reading this, please understand the risks, as verify=False should only be used in certain circumstances 😃
