python-emojipedia
python-emojipedia copied to clipboard
TypeError: 'NoneType' object is not subscriptable
Traceback (most recent call last): File "/home/development/backend/venv/lib/python3.10/site-packages/asgiref/sync.py", line 486, in thread_handler raise exc_info[1] File "/home/development/backend/venv/lib/python3.10/site-packages/django/core/handlers/exception.py", line 42, in inner response = await get_response(request) File "/home/development/backend/venv/lib/python3.10/site-packages/django/core/handlers/base.py", line 253, in _get_response_async response = await wrapped_callback( File "/home/development/backend/venv/lib/python3.10/site-packages/asgiref/sync.py", line 448, in __call__ ret = await asyncio.wait_for(future, timeout=None) File "/usr/lib/python3.10/asyncio/tasks.py", line 408, in wait_for return await fut File "/home/development/backend/venv/lib/python3.10/site-packages/asgiref/current_thread_executor.py", line 22, in run result = self.fn(*self.args, **self.kwargs) File "/home/development/backend/venv/lib/python3.10/site-packages/asgiref/sync.py", line 490, in thread_handler return func(*args, **kwargs) File "/usr/lib/python3.10/contextlib.py", line 79, in inner return func(*args, **kwds) File "/home/development/backend/venv/lib/python3.10/site-packages/django/views/decorators/csrf.py", line 54, in wrapped_view return view_func(*args, **kwargs) File "/home/development/backend/venv/lib/python3.10/site-packages/rest_framework/viewsets.py", line 125, in view return self.dispatch(request, *args, **kwargs) File "/home/development/backend/venv/lib/python3.10/site-packages/rest_framework/views.py", line 509, in dispatch response = self.handle_exception(exc) File "/home/development/backend/venv/lib/python3.10/site-packages/rest_framework/views.py", line 469, in handle_exception self.raise_uncaught_exception(exc) File "/home/development/backend/venv/lib/python3.10/site-packages/rest_framework/views.py", line 480, in raise_uncaught_exception raise exc File "/home/development/backend/venv/lib/python3.10/site-packages/rest_framework/views.py", line 506, in dispatch response = handler(request, *args, **kwargs) File "/home/development/backend/apps/emojis/api/v1/views.py", line 16, in list queryset = self.get_queryset() File "/home/development/backend/apps/emojis/api/v1/views.py", line 26, in get_queryset return Emojipedia.category('nature') File "/home/development/backend/venv/lib/python3.10/site-packages/emojipedia/emojipedia.py", line 49, in category url = emoji_entry.find('a')['href'] TypeError: 'NoneType' object is not subscriptable