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

[BUG] Nonetype error on empty config #27

Open
Descent098 opened this issue Nov 29, 2023 · 0 comments
Open

[BUG] Nonetype error on empty config #27

Descent098 opened this issue Nov 29, 2023 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@Descent098
Copy link
Owner

When registering your first command there's an error because the macro object is a none type:

ahd register code "code ." "."
Registering macro code
        Command: code .
        Paths: .
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:\Python311\Scripts\ahd.exe\__main__.py", line 7, in <module>
  File "C:\Python311\Lib\site-packages\ahd\cli.py", line 152, in main
    register(arguments["<name>"], arguments["<command>"], arguments["<paths>"], config)
  File "C:\Python311\Lib\site-packages\ahd\configuration.py", line 116, in register
    config["macros"][macro_name] = {
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^
TypeError: 'NoneType' object does not support item assignment
@Descent098 Descent098 added the bug Something isn't working label Nov 29, 2023
@Descent098 Descent098 self-assigned this Nov 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant