dipu-bd / lightnovel-crawler

Generate and download e-books from online sources.
https://pypi.org/project/lightnovel-crawler/
GNU General Public License v3.0
1.51k stars 292 forks source link

Telegram Bot notworking #831

Closed baronbanjo closed 3 years ago

baronbanjo commented 3 years ago

Can't connect to telegram, Failed to establish a new connection.

2021-04-26 00:24:25,561 [WARNING] (telegram.vendor.ptb_urllib3.urllib3.connectionpool)
Retrying (Retry(total=2, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<telegram.vendor.ptb_urllib3.urllib3.connection.VerifiedHTTPSConnection object at 0x7f10fc929c88>: Failed to establish a new connection: [Errno 101] Network is unreachable',)': /bot***********/getMe
2021-04-26 00:24:30,574 [WARNING] (telegram.vendor.ptb_urllib3.urllib3.connectionpool)
Retrying (Retry(total=1, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<telegram.vendor.ptb_urllib3.urllib3.connection.VerifiedHTTPSConnection object at 0x7f10fc929d30>: Failed to establish a new connection: [Errno 101] Network is unreachable',)': /bot**********/getMe
2021-04-26 00:24:35,587 [WARNING] (telegram.vendor.ptb_urllib3.urllib3.connectionpool)
Retrying (Retry(total=0, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<telegram.vendor.ptb_urllib3.urllib3.connection.VerifiedHTTPSConnection object at 0x7f10fc929dd8>: Failed to establish a new connection: [Errno 101] Network is unreachable',)': /**************/getMe
dipu-bd commented 3 years ago

maybe it is down. use the discord bot for now

yudilee commented 3 years ago

Usually this error is represent your internet connection to telegram is unreachable. Change your connection if it is available.

On Mon, Apr 26, 2021 at 4:31 AM Sudipto Chandra @.***> wrote:

maybe it is down. use the discord bot for now

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/dipu-bd/lightnovel-crawler/issues/831#issuecomment-826393213, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABV5AW6EG4GDTHYFR3ICYN3TKSC4PANCNFSM43RPUEFA .

damare01 commented 3 years ago

I also tried but I always get an error

damare01 commented 3 years ago

the discord works fine

damare01 commented 3 years ago

@dipu-bd I get this error when I attemp to send a link to the telegram bot I created

An uncaught error was raised while handling the error
Traceback (most recent call last):
  File "C:\Users\user\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\telegram\ext\dispatcher.py", line 442, in process_update
    handler.handle_update(update, self, check, context)
  File "C:\Users\user\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\telegram\ext\conversationhandler.py", line 549, in handle_update
    new_state = handler.handle_update(update, dispatcher, check_result, context)
  File "C:\Users\user\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\telegram\ext\handler.py", line 160, in handle_update
    return self.callback(update, context)
TypeError: handle_novel_url() missing 1 required positional argument: 'user_data'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\user\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\telegram\ext\dispatcher.py", line 454, in process_update
    self.dispatch_error(update, exc)
  File "C:\Users\user\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\telegram\ext\dispatcher.py", line 674, in dispatch_error
    callback(update, context)
TypeError: error_handler() missing 1 required positional argument: 'error'
2021-04-30 20:35:42,381 [WARNING] (telegram.vendor.ptb_urllib3.urllib3.connectionpool)
Retrying (Retry(total=2, connect=None, read=None, redirect=None)) after connection broken by 'ConnectTimeoutError(<telegram.vendor.ptb_urllib3.urllib3.connectionpool.HTTPSConnectionPool object at 0x000001665EF43910>, 'Connect timed out. (connect timeout=5.0)')': /bot1748751627:AAHd9mXaOCcF7KJ1UaDjChaK--90m2tLvDc/getUpdates
yudilee commented 3 years ago

This error because you used new python telegram bot. Try use version 11. 1.0

On Fri, Apr 30, 2021, 7:56 PM damare01 @.***> wrote:

@dipu-bd https://github.com/dipu-bd I get this error when I attemp to send a link to the telegram bot I created

An uncaught error was raised while handling the error Traceback (most recent call last): File "C:\Users\user\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\telegram\ext\dispatcher.py", line 442, in process_update handler.handle_update(update, self, check, context) File "C:\Users\user\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\telegram\ext\conversationhandler.py", line 549, in handle_update new_state = handler.handle_update(update, dispatcher, check_result, context) File "C:\Users\user\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\telegram\ext\handler.py", line 160, in handle_update return self.callback(update, context) TypeError: handle_novel_url() missing 1 required positional argument: 'user_data'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "C:\Users\user\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\telegram\ext\dispatcher.py", line 454, in process_update self.dispatch_error(update, exc) File "C:\Users\user\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\telegram\ext\dispatcher.py", line 674, in dispatch_error callback(update, context) TypeError: error_handler() missing 1 required positional argument: 'error' 2021-04-30 20:35:42,381 [WARNING] (telegram.vendor.ptb_urllib3.urllib3.connectionpool) Retrying (Retry(total=2, connect=None, read=None, redirect=None)) after connection broken by 'ConnectTimeoutError(<telegram.vendor.ptb_urllib3.urllib3.connectionpool.HTTPSConnectionPool object at 0x000001665EF43910>, 'Connect timed out. (connect timeout=5.0)')': /bot1748751627:AAHd9mXaOCcF7KJ1UaDjChaK--90m2tLvDc/getUpdates

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/dipu-bd/lightnovel-crawler/issues/831#issuecomment-830075807, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABV5AW2G7TMV7L7GXDEBV2DTLKSJDANCNFSM43RPUEFA .

damare01 commented 3 years ago

This error because you used new python telegram bot. Try use version 11. 1.0 On Fri, Apr 30, 2021, 7:56 PM damare01 @.***> wrote: @dipu-bd https://github.com/dipu-bd I get this error when I attemp to send a link to the telegram bot I created An uncaught error was raised while handling the error Traceback (most recent call last): File "C:\Users\user\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\telegram\ext\dispatcher.py", line 442, in process_update handler.handle_update(update, self, check, context) File "C:\Users\user\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\telegram\ext\conversationhandler.py", line 549, in handle_update new_state = handler.handle_update(update, dispatcher, check_result, context) File "C:\Users\user\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\telegram\ext\handler.py", line 160, in handle_update return self.callback(update, context) TypeError: handle_novel_url() missing 1 required positional argument: 'user_data' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "C:\Users\user\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\telegram\ext\dispatcher.py", line 454, in process_update self.dispatch_error(update, exc) File "C:\Users\user\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\telegram\ext\dispatcher.py", line 674, in dispatch_error callback(update, context) TypeError: error_handler() missing 1 required positional argument: 'error' 2021-04-30 20:35:42,381 [WARNING] (telegram.vendor.ptb_urllib3.urllib3.connectionpool) Retrying (Retry(total=2, connect=None, read=None, redirect=None)) after connection broken by 'ConnectTimeoutError(<telegram.vendor.ptb_urllib3.urllib3.connectionpool.HTTPSConnectionPool object at 0x000001665EF43910>, 'Connect timed out. (connect timeout=5.0)')': /bot1748751627:AAHd9mXaOCcF7KJ1UaDjChaK--90m2tLvDc/getUpdates — You are receiving this because you commented. Reply to this email directly, view it on GitHub <#831 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABV5AW2G7TMV7L7GXDEBV2DTLKSJDANCNFSM43RPUEFA .

@yudilee How?

yudilee commented 3 years ago

If you install using pip just uninstall python-telegram-bot and install using pip by describe version number

On Fri, Apr 30, 2021, 8:35 PM damare01 @.***> wrote:

This error because you used new python telegram bot. Try use version 11. 1.0 … <#m23674022476033199> On Fri, Apr 30, 2021, 7:56 PM damare01 @.***> wrote: @dipu-bd https://github.com/dipu-bd https://github.com/dipu-bd I get this error when I attemp to send a link to the telegram bot I created An uncaught error was raised while handling the error Traceback (most recent call last): File "C:\Users\user\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\telegram\ext\dispatcher.py", line 442, in process_update handler.handle_update(update, self, check, context) File "C:\Users\user\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\telegram\ext\conversationhandler.py", line 549, in handle_update new_state = handler.handle_update(update, dispatcher, check_result, context) File "C:\Users\user\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\telegram\ext\handler.py", line 160, in handle_update return self.callback(update, context) TypeError: handle_novel_url() missing 1 required positional argument: 'user_data' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "C:\Users\user\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\telegram\ext\dispatcher.py", line 454, in process_update self.dispatch_error(update, exc) File "C:\Users\user\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\telegram\ext\dispatcher.py", line 674, in dispatch_error callback(update, context) TypeError: error_handler() missing 1 required positional argument: 'error' 2021-04-30 20:35:42,381 [WARNING] (telegram.vendor.ptb_urllib3.urllib3.connectionpool) Retrying (Retry(total=2, connect=None, read=None, redirect=None)) after connection broken by 'ConnectTimeoutError(<telegram.vendor.ptb_urllib3.urllib3.connectionpool.HTTPSConnectionPool object at 0x000001665EF43910>, 'Connect timed out. (connect timeout=5.0)')': /bot1748751627:AAHd9mXaOCcF7KJ1UaDjChaK--90m2tLvDc/getUpdates — You are receiving this because you commented. Reply to this email directly, view it on GitHub <#831 (comment) https://github.com/dipu-bd/lightnovel-crawler/issues/831#issuecomment-830075807>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABV5AW2G7TMV7L7GXDEBV2DTLKSJDANCNFSM43RPUEFA .

@yudilee https://github.com/yudilee How?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/dipu-bd/lightnovel-crawler/issues/831#issuecomment-830098871, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABV5AW2JFASEIBDLSUSDUZ3TLKWYXANCNFSM43RPUEFA .

damare01 commented 3 years ago

ahhh thank you!

damare01 commented 3 years ago

its working! Thank you!

yudilee commented 3 years ago

You're welcome

On Fri, Apr 30, 2021, 8:51 PM damare01 @.***> wrote:

its working! Thank you!

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/dipu-bd/lightnovel-crawler/issues/831#issuecomment-830109424, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABV5AWY26EFYI25XFY7MC5LTLKYURANCNFSM43RPUEFA .

damare01 commented 3 years ago

@yudilee does the bot allows multiple downloads at the same time?

yudilee commented 3 years ago

Not at this time. Telegram Bot do not support asynchronous unlike discord bot. It is on our to do list of improvement to add asynchronous support for telegram bot. But last year I can't do anything about it. I hope that I have some free time to do some work for that this year.

On Fri, Apr 30, 2021, 9:38 PM damare01 @.***> wrote:

@yudilee https://github.com/yudilee does the bot allows multiple downloads at the same time?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/dipu-bd/lightnovel-crawler/issues/831#issuecomment-830140011, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABV5AW3YNO6BL7WCU3A3N6DTLK6FPANCNFSM43RPUEFA .

damare01 commented 3 years ago

@yudilee oohhhh, thank you!

damare01 commented 3 years ago

@yudilee what is this error ?

Traceback (most recent call last):
  File "/home/Damare/.local/lib/python3.8/site-packages/telegram/ext/dispatcher.py", line 447, in process_update
    handler.handle_update(update, self, check, context)
  File "/home/Damare/.local/lib/python3.8/site-packages/telegram/ext/conversationhandler.py", line 602, in handle_update
    new_state = handler.handle_update(update, dispatcher, check_result, context)
  File "/home/Damare/.local/lib/python3.8/site-packages/telegram/ext/handler.py", line 160, in handle_update
    return self.callback(update, context)
TypeError: init_app() missing 1 required positional argument: 'user_data'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/home/Damare/.local/lib/python3.8/site-packages/telegram/ext/dispatcher.py", line 459, in process_update
    self.dispatch_error(update, exc)
  File "/home/Damare/.local/lib/python3.8/site-packages/telegram/ext/dispatcher.py", line 679, in dispatch_error
    callback(update, context)
TypeError: error_handler() missing 1 required positional argument: 'error'
damare01 commented 3 years ago

@yudilee what is this error ?

Traceback (most recent call last):
  File "/home/Damare/.local/lib/python3.8/site-packages/telegram/ext/dispatcher.py", line 447, in process_update
    handler.handle_update(update, self, check, context)
  File "/home/Damare/.local/lib/python3.8/site-packages/telegram/ext/conversationhandler.py", line 602, in handle_update
    new_state = handler.handle_update(update, dispatcher, check_result, context)
  File "/home/Damare/.local/lib/python3.8/site-packages/telegram/ext/handler.py", line 160, in handle_update
    return self.callback(update, context)
TypeError: init_app() missing 1 required positional argument: 'user_data'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/home/Damare/.local/lib/python3.8/site-packages/telegram/ext/dispatcher.py", line 459, in process_update
    self.dispatch_error(update, exc)
  File "/home/Damare/.local/lib/python3.8/site-packages/telegram/ext/dispatcher.py", line 679, in dispatch_error
    callback(update, context)
TypeError: error_handler() missing 1 required positional argument: 'error'

the bot won't work because of this error

dipu-bd commented 3 years ago

what is your telegram bot package version. here is how you can see it: pip show python-telegram-bot

yudilee commented 3 years ago

It should be the same error we have discussed earlier

On Thu, May 6, 2021, 10:41 AM damare01 @.***> wrote:

@yudilee https://github.com/yudilee what is this error ?

Traceback (most recent call last): File "/home/Damare/.local/lib/python3.8/site-packages/telegram/ext/dispatcher.py", line 447, in process_update handler.handle_update(update, self, check, context) File "/home/Damare/.local/lib/python3.8/site-packages/telegram/ext/conversationhandler.py", line 602, in handle_update new_state = handler.handle_update(update, dispatcher, check_result, context) File "/home/Damare/.local/lib/python3.8/site-packages/telegram/ext/handler.py", line 160, in handle_update return self.callback(update, context) TypeError: init_app() missing 1 required positional argument: 'user_data' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/Damare/.local/lib/python3.8/site-packages/telegram/ext/dispatcher.py", line 459, in process_update self.dispatch_error(update, exc) File "/home/Damare/.local/lib/python3.8/site-packages/telegram/ext/dispatcher.py", line 679, in dispatch_error callback(update, context) TypeError: error_handler() missing 1 required positional argument: 'error'

the bot won't work because of this error

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/dipu-bd/lightnovel-crawler/issues/831#issuecomment-833201275, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABV5AW7LAOLREZD6NEMIKP3TMIFWDANCNFSM43RPUEFA .

damare01 commented 3 years ago

what is your telegram bot package version. here is how you can see it: pip show python-telegram-bot

oh I think its my terminal is the one having the problem

damare01 commented 3 years ago

it's working now

damare01 commented 3 years ago

how are you hosting your telegram bot 24/7?

yudilee commented 3 years ago

Long time ago I used raspberry pi to host it using my home internet connection. But after it broke I put it on my laptop and kept doing that till now

On Thu, May 6, 2021, 10:58 AM damare01 @.***> wrote:

how are you hosting your telegram bot 24/7?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/dipu-bd/lightnovel-crawler/issues/831#issuecomment-833205831, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABV5AW6AH7KB4F3NM36RWLTTMIHUTANCNFSM43RPUEFA .

damare01 commented 3 years ago

so that means your laptop is always turned on?

yudilee commented 3 years ago

Yes. Sometimes I turn it of to let it rest

On Thu, May 6, 2021, 11:04 AM damare01 @.***> wrote:

so that means your laptop is always turned on?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/dipu-bd/lightnovel-crawler/issues/831#issuecomment-833207824, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABV5AW5UPM64IA4AFTJWKD3TMIIM3ANCNFSM43RPUEFA .

damare01 commented 3 years ago

Yes. Sometimes I turn it of to let it rest On Thu, May 6, 2021, 11:04 AM damare01 @.***> wrote: so that means your laptop is always turned on? — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <#831 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABV5AW5UPM64IA4AFTJWKD3TMIIM3ANCNFSM43RPUEFA .

@yudilee I sometimes get this error when the epub file is being generated, how do you fix/avoid it?

An uncaught error was raised while executing job 1780999956
Traceback (most recent call last):
  File "C:\Users\user\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\telegram\vendor\ptb_urllib3\urllib3\connectionpool.py", line 402, in _make_request
    six.raise_from(e, None)
  File "<string>", line 2, in raise_from
  File "C:\Users\user\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\telegram\vendor\ptb_urllib3\urllib3\connectionpool.py", line 398, in _make_request
    httplib_response = conn.getresponse()
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.1520.0_x64__qbz5n2kfra8p0\lib\http\client.py", line 1345, in getresponse
    response.begin()
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.1520.0_x64__qbz5n2kfra8p0\lib\http\client.py", line 307, in begin
    version, status, reason = self._read_status()
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.1520.0_x64__qbz5n2kfra8p0\lib\http\client.py", line 268, in _read_status
    line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.1520.0_x64__qbz5n2kfra8p0\lib\socket.py", line 704, in readinto
    return self._sock.recv_into(b)
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.1520.0_x64__qbz5n2kfra8p0\lib\ssl.py", line 1241, in recv_into
    return self.read(nbytes, buffer)
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.1520.0_x64__qbz5n2kfra8p0\lib\ssl.py", line 1099, in read
    return self._sslobj.read(len, buffer)
socket.timeout: The read operation timed out
damare01 commented 3 years ago

@dipu-bd when I execute the bot I would get this error

Traceback (most recent call last):
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.1520.0_x64__qbz5n2kfra8p0\lib\runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.1520.0_x64__qbz5n2kfra8p0\lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "C:\Users\user\Downloads\lightnovel-crawler\__main__.py", line 4, in <module>
    main()
  File "C:\Users\user\Downloads\lightnovel-crawler\lncrawl\__init__.py", line 12, in main
    from .core import start_app
  File "C:\Users\user\Downloads\lightnovel-crawler\lncrawl\core\__init__.py", line 8, in <module>
    import colorama
ModuleNotFoundError: No module named 'colorama'
yudilee commented 3 years ago

Install using pip

On Thu, May 20, 2021, 11:34 AM damare01 @.***> wrote:

@dipu-bd https://github.com/dipu-bd when I execute the bot I would get this error

Traceback (most recent call last): File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.1520.0_x64qbz5n2kfra8p0\lib\runpy.py", line 197, in _run_module_as_main return _run_code(code, main_globals, None, File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.1520.0_x64__qbz5n2kfra8p0\lib\runpy.py", line 87, in _run_code exec(code, run_globals) File "C:\Users\user\Downloads\lightnovel-crawler__main.py", line 4, in main() File "C:\Users\user\Downloads\lightnovel-crawler\lncrawl\init__.py", line 12, in main from .core import start_app File "C:\Users\user\Downloads\lightnovel-crawler\lncrawl\core\init__.py", line 8, in import colorama ModuleNotFoundError: No module named 'colorama'

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/dipu-bd/lightnovel-crawler/issues/831#issuecomment-844679624, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABV5AWYNDATL6UX5QBJTLSLTOSGLXANCNFSM43RPUEFA .

damare01 commented 3 years ago

Install using pip On Thu, May 20, 2021, 11:34 AM damare01 @.***> wrote: @dipu-bd https://github.com/dipu-bd when I execute the bot I would get this error Traceback (most recent call last): File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.1520.0_x64qbz5n2kfra8p0\lib\runpy.py", line 197, in _run_module_as_main return _run_code(code, main_globals, None, File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.1520.0_x64__qbz5n2kfra8p0\lib\runpy.py", line 87, in _run_code exec(code, run_globals) File "C:\Users\user\Downloads\lightnovel-crawler__main.py", line 4, in main() File "C:\Users\user\Downloads\lightnovel-crawler\lncrawl\init__.py", line 12, in main from .core import start_app File "C:\Users\user\Downloads\lightnovel-crawler\lncrawl\core\init__.py", line 8, in import colorama ModuleNotFoundError: No module named 'colorama' — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <#831 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABV5AWYNDATL6UX5QBJTLSLTOSGLXANCNFSM43RPUEFA .

this command pip install --user -U lightnovel-crawler ?

yudilee commented 3 years ago

pip install colorama

On Thu, May 20, 2021, 11:38 AM damare01 @.***> wrote:

Install using pip … <#m3288301583530248920> On Thu, May 20, 2021, 11:34 AM damare01 @.**> wrote: @dipu-bd https://github.com/dipu-bd https://github.com/dipu-bd when I execute the bot I would get this error Traceback (most recent call last): File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.1520.0_x64__qbz5n2kfra8p0\lib\runpy.py", line 197, in run_module_as_main return run_code(code, main_globals, None, File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.1520.0_x64__qbz5n2kfra8p0\lib\runpy.py", line 87, in run_code exec(code, run_globals) File "C:\Users\user\Downloads\lightnovel-crawler_main.py", line 4, in main() File "C:\Users\user\Downloads\lightnovel-crawler\lncrawl_init.py", line 12, in main from .core import start_app File "C:\Users\user\Downloads\lightnovel-crawler\lncrawl\core_init*.py", line 8, in import colorama ModuleNotFoundError: No module named 'colorama' — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <#831 (comment) https://github.com/dipu-bd/lightnovel-crawler/issues/831#issuecomment-844679624>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABV5AWYNDATL6UX5QBJTLSLTOSGLXANCNFSM43RPUEFA .

this command pip install --user -U lightnovel-crawler ?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/dipu-bd/lightnovel-crawler/issues/831#issuecomment-844681837, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABV5AW2O7Z6EV33WX7NMDYTTOSG3HANCNFSM43RPUEFA .

yudilee commented 3 years ago

Or you can install requirement and requirement dev

On Thu, May 20, 2021, 11:38 AM damare01 @.***> wrote:

Install using pip … <#m3288301583530248920> On Thu, May 20, 2021, 11:34 AM damare01 @.**> wrote: @dipu-bd https://github.com/dipu-bd https://github.com/dipu-bd when I execute the bot I would get this error Traceback (most recent call last): File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.1520.0_x64__qbz5n2kfra8p0\lib\runpy.py", line 197, in run_module_as_main return run_code(code, main_globals, None, File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.1520.0_x64__qbz5n2kfra8p0\lib\runpy.py", line 87, in run_code exec(code, run_globals) File "C:\Users\user\Downloads\lightnovel-crawler_main.py", line 4, in main() File "C:\Users\user\Downloads\lightnovel-crawler\lncrawl_init.py", line 12, in main from .core import start_app File "C:\Users\user\Downloads\lightnovel-crawler\lncrawl\core_init*.py", line 8, in import colorama ModuleNotFoundError: No module named 'colorama' — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <#831 (comment) https://github.com/dipu-bd/lightnovel-crawler/issues/831#issuecomment-844679624>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABV5AWYNDATL6UX5QBJTLSLTOSGLXANCNFSM43RPUEFA .

this command pip install --user -U lightnovel-crawler ?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/dipu-bd/lightnovel-crawler/issues/831#issuecomment-844681837, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABV5AW2O7Z6EV33WX7NMDYTTOSG3HANCNFSM43RPUEFA .

damare01 commented 3 years ago

Or you can install requirement and requirement dev On Thu, May 20, 2021, 11:38 AM damare01 @.> wrote: Install using pip … <#m3288301583530248920> On Thu, May 20, 2021, 11:34 AM damare01 @.> wrote: @dipu-bd https://github.com/dipu-bd https://github.com/dipu-bd when I execute the bot I would get this error Traceback (most recent call last): File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.1520.0_x64__qbz5n2kfra8p0\lib\runpy.py", line 197, in run_module_as_main return run_code(code, main_globals, None, File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.1520.0_x64__qbz5n2kfra8p0\lib\runpy.py", line 87, in run_code exec(code, run_globals) File "C:\Users\user\Downloads\lightnovel-crawler_main.py", line 4, in main() File "C:\Users\user\Downloads\lightnovel-crawler\lncrawl_init.py", line 12, in main from .core import start_app File "C:\Users\user\Downloads\lightnovel-crawler\lncrawl\core_init.py", line 8, in import colorama ModuleNotFoundError: No module named 'colorama' — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <#831 (comment) <#831 (comment)>>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABV5AWYNDATL6UX5QBJTLSLTOSGLXANCNFSM43RPUEFA . this command pip install --user -U lightnovel-crawler ? — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <#831 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABV5AW2O7Z6EV33WX7NMDYTTOSG3HANCNFSM43RPUEFA .

already done this

damare01 commented 3 years ago

i don't what is happening to my laptop, the pips are scattered in different folders/directory

damare01 commented 3 years ago

pip install colorama On Thu, May 20, 2021, 11:38 AM damare01 @.> wrote: Install using pip … <#m3288301583530248920> On Thu, May 20, 2021, 11:34 AM damare01 @.> wrote: @dipu-bd https://github.com/dipu-bd https://github.com/dipu-bd when I execute the bot I would get this error Traceback (most recent call last): File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.1520.0_x64__qbz5n2kfra8p0\lib\runpy.py", line 197, in run_module_as_main return run_code(code, main_globals, None, File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.1520.0_x64__qbz5n2kfra8p0\lib\runpy.py", line 87, in run_code exec(code, run_globals) File "C:\Users\user\Downloads\lightnovel-crawler_main.py", line 4, in main() File "C:\Users\user\Downloads\lightnovel-crawler\lncrawl_init.py", line 12, in main from .core import start_app File "C:\Users\user\Downloads\lightnovel-crawler\lncrawl\core_init.py", line 8, in import colorama ModuleNotFoundError: No module named 'colorama' — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <#831 (comment) <#831 (comment)>>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABV5AWYNDATL6UX5QBJTLSLTOSGLXANCNFSM43RPUEFA . this command pip install --user -U lightnovel-crawler ? — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <#831 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABV5AW2O7Z6EV33WX7NMDYTTOSG3HANCNFSM43RPUEFA .

@yudilee already done this but it won't work, I still receive the same error

damare01 commented 3 years ago

@yudilee

Installing collected packages: colorama
Successfully installed colorama-0.4.4
PS C:\Users\user\lightnovel-crawler> python3 . --bot telegram
Traceback (most recent call last):
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.1520.0_x64__qbz5n2kfra8p0\lib\runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.1520.0_x64__qbz5n2kfra8p0\lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "C:\Users\user\lightnovel-crawler\__main__.py", line 4, in <module>
    main()
  File "C:\Users\user\lightnovel-crawler\lncrawl\__init__.py", line 12, in main
    from .core import start_app
  File "C:\Users\user\lightnovel-crawler\lncrawl\core\__init__.py", line 8, in <module>
    import colorama
ModuleNotFoundError: No module named 'colorama'
dipu-bd commented 3 years ago
damare01 commented 3 years ago

@dipu-bd what is this error?

Traceback (most recent call last):
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.1520.0_x64__qbz5n2kfra8p0\lib\runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.1520.0_x64__qbz5n2kfra8p0\lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "C:\Users\user\Downloads\lightnovel-crawler-master\__main__.py", line 4, in <module>
    main()
  File "C:\Users\user\Downloads\lightnovel-crawler-master\lncrawl\__init__.py", line 13, in main
    start_app()
  File "C:\Users\user\Downloads\lightnovel-crawler-master\lncrawl\core\__init__.py", line 76, in start_app
    raise err
  File "C:\Users\user\Downloads\lightnovel-crawler-master\lncrawl\core\__init__.py", line 73, in start_app
    run_bot(bot)
  File "C:\Users\user\Downloads\lightnovel-crawler-master\lncrawl\bots\__init__.py", line 20, in run_bot
    TelegramBot().start()
  File "C:\Users\user\Downloads\lightnovel-crawler-master\lncrawl\bots\telegram.py", line 33, in start
    self.updater = Updater(
  File "C:\Users\user\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\telegram\ext\updater.py", line 128, in __init__
    self.bot = Bot(token, base_url, request=self._request, private_key=private_key,
  File "C:\Users\user\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\telegram\bot.py", line 116, in __init__
    self.token = self._validate_token(token)
  File "C:\Users\user\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\telegram\bot.py", line 147, in _validate_token
    raise InvalidToken()
telegram.error.InvalidToken: Invalid token
dipu-bd commented 3 years ago

it means you have not set proper token in .env file

PleaseReadMe commented 3 years ago

it means you have not set proper token in .env file

@dipu-bd same person here, the token in the .env is exactly the same as the token sent to me by BotFather

dipu-bd commented 3 years ago

can you share in details how you are running your bot?

damare01 commented 3 years ago

can you share in details how you are running your bot?

@dipu-bd first I will open the lightnovel-crawler folder, then I will right click/shift+alt+f to open powershell and lastly I will enter python3 . --bot telegram

dipu-bd commented 3 years ago

is the .env file located in the lightnovel-crawler folder?

PleaseReadMe commented 3 years ago

is the .env file located in the lightnovel-crawler folder?

Yes

dipu-bd commented 3 years ago

I don't know what you are missing then. Here is my .env file. Check if the key format matches yours.

image

damare01 commented 3 years ago

I don't know what you are missing then. Here is my .env file. Check if the key format matches yours.

image

I already solve the error and now I have a new one