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

TypeError: 'NoneType' object is not subscriptable when generating LRMB0001 #29

Open
loulecrivain opened this issue Sep 13, 2024 · 1 comment
Assignees

Comments

@loulecrivain
Copy link
Contributor

Full trace here:

Traceback (most recent call last):
  File "/nix/store/9zzc7pvq63m5h9r69sk19qhvydxqxzz2-python3.11-cosmo-0.8.4/bin/.cosmo-wrapped", line 9, in <module>
    sys.exit(main())
             ^^^^^^
  File "/nix/store/9zzc7pvq63m5h9r69sk19qhvydxqxzz2-python3.11-cosmo-0.8.4/lib/python3.11/site-packages/cosmo/__main__.py", line 81, in main
    content = serializer.serialize()
              ^^^^^^^^^^^^^^^^^^^^^^
  File "/nix/store/9zzc7pvq63m5h9r69sk19qhvydxqxzz2-python3.11-cosmo-0.8.4/lib/python3.11/site-packages/cosmo/serializer.py", line 455, in serialize
    name, unit = self._get_unit(si)
                 ^^^^^^^^^^^^^^^^^^
  File "/nix/store/9zzc7pvq63m5h9r69sk19qhvydxqxzz2-python3.11-cosmo-0.8.4/lib/python3.11/site-packages/cosmo/serializer.py", line 319, in _get_unit
    if i["address"] == connected["primary_ip4"]["address"]:
                       ~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^
TypeError: 'NoneType' object is not subscriptable

I believe this is happens because connected is None, we should add a check somewhere

@loulecrivain
Copy link
Contributor Author

poke @vidister, since this is located in code from your latest merge request I believe

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

2 participants