Local variable 'auo' referenced before assignment

Brief description of the problem

I’m trying to add a AD user account as the Admin User on a Samba Export, but it is erroring out.

Detailed step by step instructions to reproduce the problem!

  1. From the File Sharing Samba page, click Add Samba Export.
  2. Under Admin users, enter an AD user account, in the form of user@domain.com.
  3. Click Submit.

Web-UI screenshot

Capture

Error Traceback provided on the Web-UI

Traceback (most recent call last): File "/opt/rockstor/src/rockstor/rest_framework_custom/generic_view.py", line 41, in _handle_exception yield File "/opt/rockstor/src/rockstor/storageadmin/views/samba.py", line 239, in put self._set_admin_users(admin_users, smbo) File "/opt/rockstor/src/rockstor/storageadmin/views/samba.py", line 141, in _set_admin_users auo.smb_shares.add(smb_share) UnboundLocalError: local variable 'auo' referenced before assignment

Hi @HB7,

Thanks a lot for the report… I personally do not recall seeing this error so that is a bit curious. Just to make sure, could you let us know which version of Rockstor you are running? We have made some significant changes and fixes in AD and users info collection in the past few Rockstor releases so it would be worth making sure you’re using the latest code in this area before proceeding any further.

1 Like

I’m on version 4.0.9-0

1 Like

Upgraded to version 4.1.0-0 and that seems to have resolved the problem. Thanks!

2 Likes

Glad you’re all sorted out!

I’m honestly unsure as to why the upgrade fixed your issue, but I’m glad it’s sorted at least.
By curiosity, was there a system reboot (or restart of the rockstor.service) between the time you joined your AD and then tried to edit your Samba export?

1 Like

I don’t think there was a reboot between AD join and Samba export, but I can’t remember for sure.