lamw / lamw/vmware-scripts

make_vcsp_2018.py UnboundLocalError: local variable

Open
#103 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Perl
Stars
951
Forks
504
PR merge metrics
No merged PRs in 30d

Description

Hello,

I am running in to an issue when executing against a local mount point, any idea why I might be getting this error?

python3 make_vcsp_2018.py -n vsphere-content-library -p /mnt/vsphere-content-library/contentlib/
Traceback (most recent call last):
File "make_vcsp_2018.py", line 578, in
main()
File "make_vcsp_2018.py", line 573, in main
make_vcsp(lib_name, lib_path, md5_enabled)
File "make_vcsp_2018.py", line 298, in make_vcsp
item_json = _dir2item(p, item_path, md5_enabled, "urn:uuid:%s" % lib_id)
File "make_vcsp_2018.py", line 163, in _dir2item
return _make_item(name, vcsp_type, name, files_items, identifier = uuid.uuid4(), library_id=lib_id, is_vapp_template=is_vapp)
UnboundLocalError: local variable 'is_vapp' referenced before assignment

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the command in the issue, then inspect make_vcsp_2018.py at make_vcsp (line 298) and _dir2item (line 163), where the traceback identifies the failing call. Trace how is_vapp is assigned before that return; done means the command no longer raises this UnboundLocalError.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
tooling
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.