Description
Hello, I'm on a Mac running Python 3.11.1 and receiving an error when running the make generate
build script.
Below is an output from CLI
python3 generate.py /private/tmp/test/leetcode-anki/generate.py:215: DeprecationWarning: There is no current event loop loop: asyncio.events.AbstractEventLoop = asyncio.get_event_loop() Traceback (most recent call last): File "/private/tmp/test/leetcode-anki/generate.py", line 216, in <module> loop.run_until_complete(main()) File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/asyncio/base_events.py", line 653, in run_until_complete return future.result() ^^^^^^^^^^^^^^^ File "/private/tmp/test/leetcode-anki/generate.py", line 211, in main await generate(start, stop, page_size, list_id, output_file) File "/private/tmp/test/leetcode-anki/generate.py", line 184, in generate task_handles = await leetcode_data.all_problems_handles() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/private/tmp/test/leetcode-anki/leetcode_anki/helpers/leetcode.py", line 274, in all_problems_handles return list(self._cache.keys()) ^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/functools.py", line 1001, in __get__ val = self.func(instance) ^^^^^^^^^^^^^^^^^^^ File "/private/tmp/test/leetcode-anki/leetcode_anki/helpers/leetcode.py", line 143, in _cache problems = self._get_problems_data() ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/private/tmp/test/leetcode-anki/leetcode_anki/helpers/leetcode.py", line 240, in _get_problems_data problem_count = self._get_problems_count() ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/private/tmp/test/leetcode-anki/leetcode_anki/helpers/leetcode.py", line 76, in wrapper return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "/private/tmp/test/leetcode-anki/leetcode_anki/helpers/leetcode.py", line 148, in _get_problems_count api_instance = self._api_instance ^^^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/functools.py", line 1001, in __get__ val = self.func(instance) ^^^^^^^^^^^^^^^^^^^ File "/private/tmp/test/leetcode-anki/leetcode_anki/helpers/leetcode.py", line 134, in _api_instance return _get_leetcode_api_client() ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/private/tmp/test/leetcode-anki/leetcode_anki/helpers/leetcode.py", line 38, in _get_leetcode_api_client csrf_token = leetcode.auth.get_csrf_cookie(session_id) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/private/tmp/test/leetcode-anki/leetcode-anki/lib/python3.11/site-packages/leetcode/auth.py", line 12, in get_csrf_cookie return response.cookies["csrftoken"] ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^ File "/private/tmp/test/leetcode-anki/leetcode-anki/lib/python3.11/site-packages/requests/cookies.py", line 334, in __getitem__ return self._find_no_duplicates(name) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/private/tmp/test/leetcode-anki/leetcode-anki/lib/python3.11/site-packages/requests/cookies.py", line 413, in _find_no_duplicates raise KeyError(f"name={name!r}, domain={domain!r}, path={path!r}") KeyError: "name='csrftoken', domain=None, path=None" make: *** [generate] Error 1
Any suggestions on how to fix this? I have followed the README steps to a T.