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

dev1.1.0g // Bad csv format breaks 'ztp' commands #26

Closed
derek-shnosh opened this issue Jul 30, 2018 · 3 comments
Closed

dev1.1.0g // Bad csv format breaks 'ztp' commands #26

derek-shnosh opened this issue Jul 30, 2018 · 3 comments

Comments

@derek-shnosh
Copy link
Collaborator

derek-shnosh commented Jul 30, 2018

Received the following traceback when my keystore_id rows had more delimiters than the header row.

root@freeztp-dev:/etc/ztp/sis# ztp request external-keystore-test SBS 
Traceback (most recent call last):
  File "/bin/ztp", line 3511, in <module>
    interpreter()
  File "/bin/ztp", line 3058, in interpreter
    config.load_external()
  File "/bin/ztp", line 668, in load_external
    external_keystores.load()
  File "/bin/ztp", line 2992, in load
    if key[:7] == "idarray":
TypeError: 'NoneType' object has no attribute '__getitem__'

All ZTP commands gave the same traceback until the csv format was fixed.

@icovada
Copy link

icovada commented Oct 11, 2018

Sounds like it's doing exactly what it's supposed to.

@derek-shnosh
Copy link
Collaborator Author

derek-shnosh commented Oct 11, 2018

@icovada of course; but from what I understand, error handling should be implemented to adhere to development best practices; so the end user is provided with a simplistic error message. Which would prevent the end user from having to seek assistance; i.e. "Missing in external CSV" is easier to decipher and take action than a traceback.

@PackeTsar has done an excellent job all around with FreeZTP. I created the issue to bring the traceback to his attention, not so much to seek assistance with the error.

@PackeTsar
Copy link
Owner

Added bug to tracker issue

PackeTsar added a commit that referenced this issue Apr 4, 2020
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

3 participants