Coder Social home page Coder Social logo

pihole2telegram's People

Contributors

arxdust avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

pihole2telegram's Issues

Doesn't work

$ python3 pihole2telegram.py
Traceback (most recent call last):
  File "pihole2telegram.py", line 2, in <module>
    from telegram.ext import CommandHandler
  File "/usr/local/lib/python3.7/dist-packages/telegram/ext/__init__.py", line 25, in <module>
    from .callbackcontext import CallbackContext
  File "/usr/local/lib/python3.7/dist-packages/telegram/ext/callbackcontext.py", line 21, in <module>
    from telegram import Update
ImportError: cannot import name 'Update' from 'telegram' (/usr/local/lib/python3.7/dist-packages/telegram/__init__.py)

ImportError: cannot import name 'Update' from 'telegram'

I have deployed a telegram bot (with Django) on Heroku with python version 3.6.9
It worked well without any issues.
After months I did some changes and while trying to deploy it again I get issues.
Heroku doesn't support python 3.6.9 anymore. It supports 3.6.10
So I set up venv with python 3.6.10 and I'm still getting the same issue after running the server.
Short issue:
from .callbackcontext import CallbackContext File "/home/usr/bot-name/venv/lib/python3.6/site-packages/telegram/ext/callbackcontext.py", line 21, in <module> from telegram import Update ImportError: cannot import name 'Update' from 'telegram' (/home/usr/bot-name/venv/lib/python3.6/site-packages/telegram/__init__.py)

Also I have tried python 3.7.6 (it's also supported by Heroku) but I get the same issue after running the server:

_python manage.py runserver
Watching for file changes with StatReloader
Exception in thread django-main-thread:
Traceback (most recent call last):
File "/usr/local/lib/python3.7/threading.py", line 926, in _bootstrap_inner
self.run()
File "/usr/local/lib/python3.7/threading.py", line 870, in run
self._target(*self._args, **self._kwargs)
File "/home/usr/bot-name/venv/lib/python3.7/site-packages/django/utils/autoreload.py", line 54, in wrapper
fn(*args, **kwargs)
File "/home/usr/bot-name/venv/lib/python3.7/site-packages/django/core/management/commands/runserver.py", line 109, in inner_run
autoreload.raise_last_exception()
File "/home/usr/bot-name/venv/lib/python3.7/site-packages/django/utils/autoreload.py", line 77, in raise_last_exception
raise _exception[1]
File "/home/usr/bot-name/venv/lib/python3.7/site-packages/django/core/management/init.py", line 337, in execute
autoreload.check_errors(django.setup)()
File "/home/usr/bot-name/venv/lib/python3.7/site-packages/django/utils/autoreload.py", line 54, in wrapper
fn(*args, **kwargs)
File "/home/usr/bot-name/venv/lib/python3.7/site-packages/django/init.py", line 24, in setup
apps.populate(settings.INSTALLED_APPS)
File "/home/usr/bot-name/venv/lib/python3.7/site-packages/django/apps/registry.py", line 91, in populate
app_config = AppConfig.create(entry)
File "/home/usr/bot-name/venv/lib/python3.7/site-packages/django/apps/config.py", line 116, in create
mod = import_module(mod_path)
File "/home/usr/bot-name/venv/lib/python3.7/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1006, in _gcd_import
File "", line 983, in _find_and_load
File "", line 967, in _find_and_load_unlocked
File "", line 677, in _load_unlocked
File "", line 728, in exec_module
File "", line 219, in call_with_frames_removed
File "/home/usr/bot-name/venv/lib/python3.7/site-packages/django_telegrambot/apps.py", line 9, in
from telegram.ext import Dispatcher
File "/home/usr/bot-name/venv/lib/python3.7/site-packages/telegram/ext/init.py", line 25, in
from .callbackcontext import CallbackContext
File "/home/usr/bot-name/venv/lib/python3.7/site-packages/telegram/ext/callbackcontext.py", line 21, in
from telegram import Update
ImportError: cannot import name 'Update' from 'telegram' (/home/usr/bot-name/venv/lib/python3.7/site-packages/telegram/init.py)

Here you can find my requirements file:
requirements.txt

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.