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

Exception when creating documentation set #128

Open
ysi opened this issue Jan 8, 2021 · 1 comment
Open

Exception when creating documentation set #128

ysi opened this issue Jan 8, 2021 · 1 comment
Assignees
Labels
NSX-T Issues related to NSX-T branch/code

Comments

@ysi
Copy link
Contributor

ysi commented Jan 8, 2021

Hi,

When I want to create a documentation sert (menu 1 and 5), script crash at Generating Tier-1 Forwarding Tables level.

Traceback (most recent call last):
File "_poweropsmain.py", line 566, in
main()
File "_poweropsmain.py", line 563, in main
action()
File "_poweropsmain.py", line 225, in opt_docs
action()
File "_poweropsmain.py", line 295, in doc_set
docs_tier1_forwardingtables.main()
File "/Users/ysimonet/Documents/Scripts/NSX/Python/powerops/NSX-T-PowerOps/lib/powerops_master/nsx-powerops/basic/docs_tier1_forwardingtables.py", line 106, in main
sheet = t1_routing_wkbk.add_sheet(str(i), cell_overwrite_ok=True)
File "/usr/local/lib/python3.8/site-packages/xlwt/Workbook.py", line 368, in add_sheet
raise Exception("invalid worksheet name %r" % sheetname)
Exception: invalid worksheet name '21452d08-f591-416f-bead-112d6c25ad95'

It seems that you use UUID as name sheet with python module "xlwt". UUID seems too long for a sheet name. In Excel itself it's working but with xlwt, name of sheet must not exceeded 32 caracters.
If I replace in docs_tier1_forwardingtables.py line 89 t1_id_list.append(i['id']) by t1_id_list.append(i['display_name']), it seems working.

[EDIT] : On Mac OS with 3.8 python version

@stephen-sauer
Copy link

branch:T-OPS

Hi,

When I want to create a documentation sert (menu 1 and 5), script crash at Generating Tier-1 Forwarding Tables level.

Traceback (most recent call last):
File "_poweropsmain.py", line 566, in
main()
File "_poweropsmain.py", line 563, in main
action()
File "_poweropsmain.py", line 225, in opt_docs
action()
File "_poweropsmain.py", line 295, in doc_set
docs_tier1_forwardingtables.main()
File "/Users/ysimonet/Documents/Scripts/NSX/Python/powerops/NSX-T-PowerOps/lib/powerops_master/nsx-powerops/basic/docs_tier1_forwardingtables.py", line 106, in main
sheet = t1_routing_wkbk.add_sheet(str(i), cell_overwrite_ok=True)
File "/usr/local/lib/python3.8/site-packages/xlwt/Workbook.py", line 368, in add_sheet
raise Exception("invalid worksheet name %r" % sheetname)
Exception: invalid worksheet name '21452d08-f591-416f-bead-112d6c25ad95'

It seems that you use UUID as name sheet with python module "xlwt". UUID seems too long for a sheet name. In Excel itself it's working but with xlwt, name of sheet must not exceeded 32 caracters.
If I replace in docs_tier1_forwardingtables.py line 89 t1_id_list.append(i['id']) by t1_id_list.append(i['display_name']), it seems working.

branch:T-OPS

@domfoley domfoley self-assigned this Jan 11, 2021
@domfoley domfoley added the NSX-T Issues related to NSX-T branch/code label Jan 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NSX-T Issues related to NSX-T branch/code
Projects
None yet
Development

No branches or pull requests

3 participants