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

Unable to run it: dependency errors #464

Open
tmedicci opened this issue Dec 16, 2024 · 2 comments
Open

Unable to run it: dependency errors #464

tmedicci opened this issue Dec 16, 2024 · 2 comments
Assignees

Comments

@tmedicci
Copy link

Summary

Enable to run it properly on Linux tiago-ThinkPad-T430 6.1.119-1-MANJARO #1 SMP PREEMPT_DYNAMIC Sat Nov 23 02:15:12 UTC 2024 x86_64 GNU/Linux.

Steps to Reproduce

Created a new virtual environment:

python -m venv .
. ./bin/activate 

Then, install the required packages:

pip3 install -r requirements.txt

And run it directly with ./mesh.py (steps related to the mesh.ini were omitted, as well as, running it with start.sh):

/home/tiago/Documents/tiago/projects/meshstatic/meshtastic-telegram-gateway/lib/python3.12/site-packages/telegram/utils/request.py:54: UserWarning: python-telegram-bot wasn't properly installed. Please refer to README.rst on how to properly install.
  warnings.warn(
Traceback (most recent call last):
  File "/home/tiago/Documents/tiago/projects/meshstatic/meshtastic-telegram-gateway/lib/python3.12/site-packages/telegram/utils/request.py", line 36, in <module>
    import telegram.vendor.ptb_urllib3.urllib3 as urllib3
  File "/home/tiago/Documents/tiago/projects/meshstatic/meshtastic-telegram-gateway/lib/python3.12/site-packages/telegram/vendor/ptb_urllib3/urllib3/__init__.py", line 7, in <module>
    from .connectionpool import (
  File "/home/tiago/Documents/tiago/projects/meshstatic/meshtastic-telegram-gateway/lib/python3.12/site-packages/telegram/vendor/ptb_urllib3/urllib3/connectionpool.py", line 11, in <module>
    from .exceptions import (
  File "/home/tiago/Documents/tiago/projects/meshstatic/meshtastic-telegram-gateway/lib/python3.12/site-packages/telegram/vendor/ptb_urllib3/urllib3/exceptions.py", line 2, in <module>
    from .packages.six.moves.http_client import (
ModuleNotFoundError: No module named 'telegram.vendor.ptb_urllib3.urllib3.packages.six.moves'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/tiago/Documents/tiago/projects/meshstatic/meshtastic-telegram-gateway/./mesh.py", line 15, in <module>
    from mtg.bot.meshtastic import MeshtasticBot
  File "/home/tiago/Documents/tiago/projects/meshstatic/meshtastic-telegram-gateway/mtg/bot/meshtastic/__init__.py", line 5, in <module>
    from .meshtastic import MeshtasticBot
  File "/home/tiago/Documents/tiago/projects/meshstatic/meshtastic-telegram-gateway/mtg/bot/meshtastic/meshtastic.py", line 22, in <module>
    from mtg.connection.telegram import TelegramConnection
  File "/home/tiago/Documents/tiago/projects/meshstatic/meshtastic-telegram-gateway/mtg/connection/telegram/__init__.py", line 4, in <module>
    from .telegram import TelegramConnection
  File "/home/tiago/Documents/tiago/projects/meshstatic/meshtastic-telegram-gateway/mtg/connection/telegram/telegram.py", line 7, in <module>
    import telegram
  File "/home/tiago/Documents/tiago/projects/meshstatic/meshtastic-telegram-gateway/lib/python3.12/site-packages/telegram/__init__.py", line 187, in <module>
    from .bot import Bot
  File "/home/tiago/Documents/tiago/projects/meshstatic/meshtastic-telegram-gateway/lib/python3.12/site-packages/telegram/bot.py", line 107, in <module>
    from telegram.utils.request import Request
  File "/home/tiago/Documents/tiago/projects/meshstatic/meshtastic-telegram-gateway/lib/python3.12/site-packages/telegram/utils/request.py", line 44, in <module>
    import urllib3.contrib.appengine as appengine  # type: ignore[no-redef]
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ModuleNotFoundError: No module named 'urllib3.contrib.appengine'
@tb0hdan
Copy link
Owner

tb0hdan commented Dec 22, 2024

Wow, it's a nasty one. I've been dragging the older python-telegram-bot dependency enough for it to become broken. Fixing this requires a pretty big overhaul of the existing code, so be patient.

@tb0hdan tb0hdan self-assigned this Dec 22, 2024
@tmedicci
Copy link
Author

Wow, it's a nasty one. I've been dragging the older python-telegram-bot dependency enough for it to become broken. Fixing this requires a pretty big overhaul of the existing code, so be patient.

Yeah, I thought the same. Don't worry...

If you have an architectural design for the new API, I can try to help implement something. It's been a while since I last implemented something in Python, but it'd be a nice opportunity for a side project.

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

No branches or pull requests

2 participants