Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UnboundLocalError: cannot access local variable 'inp' where it is not associated with a value #7

Open
cerumo opened this issue Feb 17, 2024 · 0 comments

Comments

@cerumo
Copy link

cerumo commented Feb 17, 2024

When running leetscrape question 26, I'm getting:

Generating code stub for 26. remove-duplicates-from-sorted-array
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "C:\new\winpython\WPy64-31220\python-3.12.2.amd64\Scripts\leetscrape.exe\__main__.py", line 7, in <module>
  File "C:\new\winpython\WPy64-31220\python-3.12.2.amd64\Lib\site-packages\leetscrape\scripts.py", line 164, in leetscrape
    args.func(args, parser)
  File "C:\new\winpython\WPy64-31220\python-3.12.2.amd64\Lib\site-packages\leetscrape\scripts.py", line 21, in leetscrape_question
    fcs.generate(
  File "C:\new\winpython\WPy64-31220\python-3.12.2.amd64\Lib\site-packages\leetscrape\generate_code_stub.py", line 74, in generate
    test_to_write = self._create_test_file(code_to_write)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\new\winpython\WPy64-31220\python-3.12.2.amd64\Lib\site-packages\leetscrape\generate_code_stub.py", line 225, in _create_test_file
    input_string, output_string = self._get_parameters(
                                  ^^^^^^^^^^^^^^^^^^^^^
  File "C:\new\winpython\WPy64-31220\python-3.12.2.amd64\Lib\site-packages\leetscrape\generate_code_stub.py", line 181, in _get_parameters
    parameter_dict = parse_args(inp)  # type: ignore
                                ^^^
UnboundLocalError: cannot access local variable 'inp' where it is not associated with a value

Also, do you have the list of questions and solutions etc already scraped available somewhere?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant