Skip to content

fix hidprox UnboundLocalError cli arg error + hidprox slot set warning#332

Open
RickConsole wants to merge 2 commits intoRfidResearchGroup:mainfrom
RickConsole:fix-hidprox-cli-args
Open

fix hidprox UnboundLocalError cli arg error + hidprox slot set warning#332
RickConsole wants to merge 2 commits intoRfidResearchGroup:mainfrom
RickConsole:fix-hidprox-cli-args

Conversation

@RickConsole
Copy link

When manually configuring emulation settings for hidprox cards, there is an UnboundLocalError which is caused by not assigning local variables (fc, cn, il, oem) whne the print statements attempted to use them.

[USB] chameleon --> lf hid prox econfig -f H10301 --fc 123 --cn 45678 -s 1
 - Set hidprox tag id success.
CLI exception: Traceback (most recent call last):
  File "/home/rick/src/ChameleonUltra/software/script/chameleon_cli_main.py", line 146, in exec_cmd
    raise error
  File "/home/rick/src/ChameleonUltra/software/script/chameleon_cli_main.py", line 141, in exec_cmd
    unit.on_exec(args_parse_result)
  File "/home/rick/src/ChameleonUltra/software/script/chameleon_cli_unit.py", line 3236, in on_exec
    if fc > 0:
       ^^
UnboundLocalError: cannot access local variable 'fc' where it is not associated with a value

Additionally, added a warning when setting a HIDProx card to a slot that isnt configured to be one (Similar to Viking's functionality)

@github-actions
Copy link

You are welcome to add an entry to the CHANGELOG.md as well

@github-actions
Copy link

Built artifacts for commit b272682

Firmware

Client

@GameTec-live GameTec-live added the testme! This PR is ready but just missing tests. Join in and help testing! label Jan 30, 2026
@GameTec-live GameTec-live removed the testme! This PR is ready but just missing tests. Join in and help testing! label Feb 1, 2026
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

Successfully merging this pull request may close these issues.

2 participants