ā11-11-2024 03:48 AM
Hi,
I am trying to use the Apply Config Template workflow) (found on https://github.com/extremenetworks/ExtremeScripting/blob/master/XMC_XIQ-SE/oneview_workflows/xwf/App...) since migrating our XIQ-SE from 24.7 to 24.10 but the workflow fails with the following message on the action output:
Traceback (most recent call last):
File "<string>", line 1031, in <module>
File "<string>", line 918, in main
File "<string>", line 717, in readCsvToDict
UnboundLocalError: local variable 'indexKey' referenced before assignment
Traceback (most recent call last):
File "<string>", line 1031, in <module>
File "<string>", line 918, in main
File "<string>", line 717, in readCsvToDict
UnboundLocalError: local variable 'indexKey' referenced before assignment
This worked fine on the previous version, and I have stripped back the config on the referred ASCII config template to just a 'show run' and getting the same, so I think this is a code/workflow issue following the database migration rather than anything I'm doing myself. Any one else seen the same or know how to fix? Looking at the python script it seems to be when the CSV file is imported, but my programming isn't nearly half up to scratch to know what to do!
Thanks
Russ
Solved! Go to Solution.
ā11-14-2024 03:47 AM
Sorry Ludo, this was my fault.
I was confusing CFG and CSV files when replying before; my CSV file was purposely blank (as the config only references site variables) but I was 99% sure it worked with a blank CSV before our upgrade. I have now pointed the workflow to use the same CSV file I use for our Onboard Mgmt VLAN workflow and can manipulate that if needed so I don't need to duplicate entries in two files. All working as expected now! Many thanks.
ā11-12-2024 07:32 AM
Hi Ludo,
The CSV file isn't blank, it had worked fine before I upgraded to 24.10.10. I've tried downloading and re-importing a fresh raw copy of the workflow, still have the same when pointing to different CSV files that worked previously as I had a few for doing different tasks.
Thanks
Russ
ā11-11-2024 09:18 AM
Hi, I'm the author of that workflow.
I think the problem is with your CSV file. Could it be an empty file ?
The code sees the file, but seems not to be able to read a single line out of it...
I should catch the error with a message... in next version!
Best regards
Ludovico Stevens