Local variable 'appliance' referenced before assignment

[Please complete the below template with details of the problem reported on your Web-UI. Be as detailed as possible. Community members, including developers, shall try and help. Thanks for your time in reporting this issue! We recommend purchasing commercial support for expedited support directly from the developers.]

Brief description of the problem

[write here]

Today I purchased an annual subscription to support Rockstar, and attempted to enter the activation code you sent via email but received an error message.

        Traceback (most recent call last):

File “/opt/rockstor/src/rockstor/rest_framework_custom/generic_view.py”, line 41, in _handle_exception
File “/opt/rockstor/src/rockstor/storageadmin/views/update_subscription.py”, line 93, in post
stableo = self._toggle_repos(password=password)
File “/opt/rockstor/src/rockstor/storageadmin/views/update_subscription.py”, line 72, in _toggle_repos
).format(ono.password, appliance.uuid)
UnboundLocalError: local variable ‘appliance’ referenced before assignment

I am at loss on how to set up my Rockstor server to receive stable updates. . .

Detailed step by step instructions to reproduce the problem

[write here]

Web-UI screenshot

[Drag and drop the image here]

Error Traceback provided on the Web-UI

[paste here]

@MarkMayberry I’ve now responded to your support email regarding this failure.

In this case we have an inelegace where we error out sometimes with mismatched credentials. I’ve detailed what I think is happening here regarding your specific details.

Hope that helps, and best we continue re the specifics in support email. I’ve sent instructions regarding what I think is a-miss in your new registration.

Thanks again for helping to support our non-profit development.

1 Like


We saw this type of inelegance before more recently I thought. I seem to remember you chasing it down a little! Any pointers? As this is a bad show when there is just an App ID/activation-code miss-match!

We have some tests for this also!


@phillxnet, the only one I can think of that I was involved with a bit was around the Active Directory:

so similar, but different …

a few years ago you worked through a similar issue (but in the CentOS space), where the same error was reported:

that one is the closest I can see, but since that moved to PM at some point (for data privacy reasons) I don’t know how that was resolved.