core icon indicating copy to clipboard operation
core copied to clipboard

Telegram bot warnings

Open tomlut opened this issue 1 year ago • 6 comments

The problem

Running the core-2024.2.0b0 beta version gives the following warning:

Logger: py.warnings
Source: components/telegram_bot/__init__.py:13
First occurred: 11:45:52 (1 occurrences)
Last logged: 11:45:52

/usr/local/lib/python3.12/site-packages/telegram/utils/request.py:49: UserWarning: python-telegram-bot is using upstream urllib3. This is allowed but not supported by python-telegram-bot maintainers. warnings.warn(

What version of Home Assistant Core has the issue?

core-2024.2.0b0

What was the last working version of Home Assistant Core?

core-2024.1.6

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Telegram bot

Link to integration documentation on our website

https://www.home-assistant.io/integrations/telegram_bot/

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

tomlut avatar Feb 01 '24 01:02 tomlut

Still occurring in 2024.2.0b2

tomlut avatar Feb 02 '24 01:02 tomlut

Still present in 2024.2.0b3

tomlut avatar Feb 02 '24 22:02 tomlut

There is no path forward on this one. The newer upstream libraries are not compatible with Home Assistant.

Home Assistant uses httpx in a newer version than they requires in their latest version of the lib. Although they have bumped it... it hasn't been released yet.

frenck avatar Feb 04 '24 20:02 frenck

Ah, ok. So it should eventually be resolved by an upstream update.

The integration is still working and the warning is not spamming the log.

Close the issue or leave it open until resolved?

tomlut avatar Feb 04 '24 20:02 tomlut

I think it is fine to leave open 👍

frenck avatar Feb 06 '24 20:02 frenck

after the 2024.2.0 Upgare: Configuration warnings Component error: telegram_bot - Exception importing homeassistant.components.telegram_bot Platform error 'notify' from integration 'telegram' - Exception importing homeassistant.components.telegram.notify

Logger: homeassistant.loader Source: loader.py:847 First occurred: 09:42:40 (4 occurrences) Last logged: 09:46:46

Unexpected exception importing platform homeassistant.components.telegram.notify Traceback (most recent call last): File "/usr/local/lib/python3.12/site-packages/pkg_resources/init.py", line 2933, in get_entry_map ep_map = self._ep_map ^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/pkg_resources/init.py", line 2899, in getattr raise AttributeError(attr) AttributeError: _ep_map. Did you mean: '_dep_map'?

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/loader.py", line 847, in get_platform cache[full_name] = self._import_platform(platform_name) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/loader.py", line 864, in _import_platform return importlib.import_module(f"{self.pkg_path}.{platform_name}") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/importlib/init.py", line 90, in import_module return _bootstrap._gcd_import(name[level:], package, level) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "", line 1387, in _gcd_import File "", line 1360, in _find_and_load File "", line 1331, in _find_and_load_unlocked File "", line 935, in _load_unlocked File "", line 994, in exec_module File "", line 488, in _call_with_frames_removed File "/usr/src/homeassistant/homeassistant/components/telegram/notify.py", line 16, in from homeassistant.components.telegram_bot import ( File "/usr/src/homeassistant/homeassistant/components/telegram_bot/init.py", line 25, in from telegram.ext import CallbackContext, Filters File "/usr/local/lib/python3.12/site-packages/telegram/ext/init.py", line 27, in from .jobqueue import JobQueue, Job File "/usr/local/lib/python3.12/site-packages/telegram/ext/jobqueue.py", line 28, in from apscheduler.schedulers.background import BackgroundScheduler File "/usr/local/lib/python3.12/site-packages/apscheduler/schedulers/background.py", line 5, in from apscheduler.schedulers.base import BaseScheduler File "/usr/local/lib/python3.12/site-packages/apscheduler/schedulers/base.py", line 42, in class BaseScheduler(six.with_metaclass(ABCMeta)): File "/usr/local/lib/python3.12/site-packages/apscheduler/schedulers/base.py", line 66, in BaseScheduler _trigger_plugins = dict((ep.name, ep) for ep in iter_entry_points('apscheduler.triggers')) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/apscheduler/schedulers/base.py", line 66, in _trigger_plugins = dict((ep.name, ep) for ep in iter_entry_points('apscheduler.triggers')) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/pkg_resources/init.py", line 712, in for entry in dist.get_entry_map(group).values() ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/pkg_resources/init.py", line 2935, in get_entry_map ep_map = self._ep_map = EntryPoint.parse_map( ^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/pkg_resources/init.py", line 2604, in parse_map raise ValueError("Entry points must be listed in groups") ValueError: Entry points must be listed in groups

simonepittis avatar Feb 08 '24 08:02 simonepittis

HA 2024.2.1.

Logger: py.warnings
Source: components/telegram_bot/__init__.py:13
First occurred: 21:52:26 (1 occurrences)
Last logged: 21:52:26

/usr/local/lib/python3.12/site-packages/telegram/utils/request.py:49: UserWarning: python-telegram-bot is using upstream urllib3. This is allowed but not supported by python-telegram-bot maintainers. warnings.warn(

garry0garry avatar Feb 09 '24 19:02 garry0garry

i'm seeing the exact same message. Following.

networkerict avatar Feb 11 '24 16:02 networkerict

`Logger: py.warnings Source: components/telegram_bot/init.py:13 First occurred: 13:22:51 (1 occurrences) Last logged: 13:22:51

/usr/local/lib/python3.12/site-packages/telegram/utils/request.py:49: UserWarning: python-telegram-bot is using upstream urllib3. This is allowed but not supported by python-telegram-bot maintainers. warnings.warn(`

nikrays avatar Feb 11 '24 17:02 nikrays

Same issue for me... following...

StefanoGiu avatar Feb 13 '24 12:02 StefanoGiu

Same here

andrebnc avatar Feb 14 '24 11:02 andrebnc

It will be solved by https://github.com/home-assistant/core/pull/110297

luca-angemi avatar Feb 14 '24 11:02 luca-angemi

This didn't make it into 2024.3 Did it?

Because I'm still seeing this error.

tomlut avatar Mar 08 '24 10:03 tomlut

HA 2024.3.0

Logger: py.warnings
Source: components/telegram_bot/__init__.py:13
First occurred: 5:34:30 PM (1 occurrences)
Last logged: 5:34:30 PM

/usr/local/lib/python3.12/site-packages/telegram/utils/request.py:49: UserWarning: python-telegram-bot is using upstream urllib3. This is allowed but not supported by python-telegram-bot maintainers. warnings.warn(

garry0garry avatar Mar 08 '24 17:03 garry0garry

The fix will land with 2024.4.0, not 2024.3.x as stated in the PR.

TheJulianJES avatar Mar 08 '24 17:03 TheJulianJES