cPanel restore: local variable 'cDBUser' referenced before assignment — CyberPanel - WebHosting Control Panel for OpenLiteSpeed
CyberHosting

cPanel restore: local variable 'cDBUser' referenced before assignment

Hi,

I'm testing the control panel and when I try to restore an account I get this error:
Failed to retore databases from file /home/backup/backup-9.30.2019_13-26-52_creandolared.tar.gz, error message: local variable 'cDBUser' referenced before assignment.

Comments

  • Hello,

    The reason for this seems to be that it had an empty database, was to eliminate it and run ok.

    line 663 script
    for inItems in data:
    if inItems.find('GRANT ALL PRIVILEGES') > -1 and inItems.find('localhost') > -1 and inItems.find('_test') == -1:
    cDBName = inItems.split('`')[1].replace('\\', '')
    logging.statusWriter(self.logFile, inItems, 1)
    if cDBName == items.replace('.sql', ''):
    cDBUser = inItems.split("'")[1]
    message = 'Database user for %s is %s.' % (cDBName, cDBUser)
    logging.statusWriter(self.logFile, message, 1)
    if Databases.objects.filter(dbUser=cDBUser).count() > 0:
    continue
    break
  • Hi @thisjrodriguez How did you fix this problem. I have a same problem, I don't know how to fix it. Thanks
Sign In or Register to comment.
CyberPanel Discord

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!