alenpaulvarghese / Web-Screenshot-Bot

A simple telegram bot to take screenshot of a given website and upload it to telegram
GNU Affero General Public License v3.0
82 stars 77 forks source link

error launching #18

Closed jaromil closed 3 years ago

jaromil commented 3 years ago

Hi! trying this on my machine, followed instructions (including filling cred.py with my own) and got this:

Pyrogram v1.1.13, Copyright (C) 2017-2021 Dan <https://github.com/delivrance>
Licensed under the terms of the GNU Lesser General Public License v3 or later (LGPLv3+)

Traceback (most recent call last):
  File "main.py", line 13, in <module>
    app.run()
  File "/home/jrml/telegram/Web-Screenshot-Bot/venv/lib/python3.7/site-packages/pyrogram/methods/utilities/run.py", line 61, in run
    self.start()
  File "/home/jrml/telegram/Web-Screenshot-Bot/venv/lib/python3.7/site-packages/pyrogram/sync.py", line 56, in async_to_sync_wrap
    return loop.run_until_complete(coroutine)
  File "/usr/lib/python3.7/asyncio/base_events.py", line 584, in run_until_complete
    return future.result()
  File "/home/jrml/telegram/Web-Screenshot-Bot/venv/lib/python3.7/site-packages/pyrogram/methods/utilities/start.py", line 68, in start
    await self.initialize()
  File "/home/jrml/telegram/Web-Screenshot-Bot/venv/lib/python3.7/site-packages/pyrogram/methods/auth/initialize.py", line 44, in initialize
    self.load_plugins()
  File "/home/jrml/telegram/Web-Screenshot-Bot/venv/lib/python3.7/site-packages/pyrogram/client.py", line 714, in load_plugins
    module = import_module(module_path)
  File "/home/jrml/telegram/Web-Screenshot-Bot/venv/lib/python3.7/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 728, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/home/jrml/telegram/Web-Screenshot-Bot/plugins/downloader.py", line 16, in <module>
    from plugins.tool_bundle import (  # pylint:disable=import-error
  File "/home/jrml/telegram/Web-Screenshot-Bot/plugins/tool_bundle.py", line 92, in <module>
    async def split_func(location: str, filename: str, _format: str) -> list[str]:
TypeError: 'type' object is not subscriptable

using:

~/telegram/Web-Screenshot-Bot > python3 --version
Python 3.7.3

any clues what am I doing wrong?

alenpaulvarghese commented 3 years ago

update your python version

jaromil commented 3 years ago

you are right, thanks. I used docker to test and in case you are interested made a PR #19