rdnkarchiver / gofile-dl

https://pypi.org/project/gofile-dl/
Apache License 2.0
5 stars 2 forks source link

TypeError: 'type' object is not subscriptable #4

Closed ohbhoi closed 2 years ago

ohbhoi commented 2 years ago

Hi,

I try to use this repo on heroku. It works fine on my local machine and google cloud shell. But this doesn't work in heroku. Heroku gives below given error:-

2022-03-23T17:57:55.979032+00:00 app[worker.1]: Traceback (most recent call last):
2022-03-23T17:57:55.979046+00:00 app[worker.1]:   File "/app/.heroku/python/bin/gofile-dl", line 33, in 
2022-03-23T17:57:55.979136+00:00 app[worker.1]:     sys.exit(load_entry_point('gofile-dl==1.2.1', 'console_scripts', 'gofile-dl')())
2022-03-23T17:57:55.979138+00:00 app[worker.1]:   File "/app/.heroku/python/bin/gofile-dl", line 25, in importlib_load_entry_point
2022-03-23T17:57:55.979206+00:00 app[worker.1]:     return next(matches).load()
2022-03-23T17:57:55.979208+00:00 app[worker.1]:   File "/app/.heroku/python/lib/python3.7/site-packages/importlib_metadata/__init__.py", line 203, in load
2022-03-23T17:57:55.979304+00:00 app[worker.1]:     module = import_module(match.group('module'))
2022-03-23T17:57:55.979312+00:00 app[worker.1]:   File "/app/.heroku/python/lib/python3.7/importlib/__init__.py", line 127, in import_module
2022-03-23T17:57:55.979387+00:00 app[worker.1]:     return _bootstrap._gcd_import(name[level:], package, level)
2022-03-23T17:57:55.979395+00:00 app[worker.1]:   File "", line 1006, in _gcd_import
2022-03-23T17:57:55.979493+00:00 app[worker.1]:   File "", line 983, in _find_and_load
2022-03-23T17:57:55.979569+00:00 app[worker.1]:   File "", line 967, in _find_and_load_unlocked
2022-03-23T17:57:55.979643+00:00 app[worker.1]:   File "", line 668, in _load_unlocked
2022-03-23T17:57:55.979718+00:00 app[worker.1]:   File "", line 638, in _load_backward_compatible
2022-03-23T17:57:55.979793+00:00 app[worker.1]:   File "/app/.heroku/python/lib/python3.7/site-packages/gofile_dl-1.2.1-py3.7.egg/gofile_dl/gofile_dl.py", line 112, in 
2022-03-23T17:57:55.979883+00:00 app[worker.1]: TypeError: 'type' object is not subscriptable

if we check line 112 in gofile_dl.py file we got this line:-

async def download_all(token: str, targets: list[dict[str, str]]) -> None:

as far as i understand the commit 25f9138b6624bae09ea7134d35027bb49b853d3d is creating this issue which you used for adding feature txt file as argument.

Please fix it. It works find on my local machine and google cloud shell. But this doesn't work in heroku. I want to use this on heroku. I can't run my script 24/7 on my local machine or gcs (you might know how gcs works).

Hope you will fix this issue.

Thanks

rdnkarchiver commented 2 years ago

Can you try the exact same setup with Python 3.9 instead of 3.7?

ohbhoi commented 2 years ago

i tried python 3.9 but same error.

ohbhoi commented 2 years ago

any solution? gofile-dl==1.1.0 used to work with heroku but after gofile updated their api this version is also not working..i am getting "api error" with gofile-dl==1.1.0 version everywhere.

can you please fix your code for heroku? gofile-dl==1.1.0 was working on heroku but now after api change its not working.

rdnkarchiver commented 2 years ago

@ohbhoi can you share the log when you use Python 3.9 like you did in the original message?

ohbhoi commented 2 years ago

its an heroku's issue..this package works fine on gcs,aws and local machine.idk what's problem with heroku..after data breach heroku become more trash at least for me.

jadedgnome commented 1 year ago

I got this same error with python 3.7 & 3.8 but it worked with 3.10.