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

Fail to import device types when specifying slugs #137

Open
BorisBachere opened this issue May 28, 2024 · 0 comments
Open

Fail to import device types when specifying slugs #137

BorisBachere opened this issue May 28, 2024 · 0 comments

Comments

@BorisBachere
Copy link

Example extracted from .env:

SLUGS=cisco-n9k-c93360yc-fx2
VENDORS=Cisco

Below error appends:

Traceback (most recent call last):
  File "/home/bbacspy8/projects2/Device-Type-Library-Import/./nb-dt-import.py", line 54, in <module>
    main()
  File "/home/bbacspy8/projects2/Device-Type-Library-Import/./nb-dt-import.py", line 32, in main
    module_types = settings.dtl_repo.parse_files(files, slugs=args.slugs)
  File "/home/bbacspy8/projects2/Device-Type-Library-Import/repo.py", line 111, in parse_files
    if slugs and True not in [
  File "/home/bbacspy8/projects2/Device-Type-Library-Import/repo.py", line 112, in <listcomp>
    True if s.casefold() in data["slug"].casefold() else False for s in slugs
KeyError: 'slug'
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