Article ID: 128917, created on Jun 5, 2016, last review on Jun 18, 2016

  • Applies to:
  • Plesk Automation 11.5

Symptoms

  1. Moving database hosting from one service node to another fails with error:

    [ERROR]  copy-databases| Failed to perform an action on subscription 'example.com'. Exception message: int() argument must be a string or a number, not 'NoneType'
    
  2. Following error can be found in /opt/panel-migrator/logs/panel-migrator.debug.log:

    [2015-03-27 10:04:19,295] [ERROR] parallels.move_subscriptions.migrator |copy-databases| Failed to perform an action on subscription 'example.com'. Exception message: int() argument must b
    e a string or a number, not 'NoneType'
    [2015-03-27 10:04:19,295] [DEBUG] parallels.move_subscriptions.migrator |copy-databases| Exception:
    Traceback (most recent call last):
      File "/usr/lib/python2.7/site-packages/parallels/move_subscriptions/migrator.py", line 599, in try_subscription
        yield
      File "/usr/lib/python2.7/site-packages/parallels/move_subscriptions/migrator.py", line 860, in copy_databases
        db_users = self.ppa_data.get_db_users_for_databases([db.id, target_db_id])
      File "/usr/lib/python2.7/site-packages/parallels/move_subscriptions/ppa_data.py", line 242, in get_db_users_for_databases
        plesk_ops.DatabaseOperator.GetDbUsers.FilterByDbIds(db_ids)
      File "/usr/lib/python2.7/site-packages/parallels/plesk_api/client.py", line 27, in send
        return self.send_many(operation, **request_settings)[0]
      File "/usr/lib/python2.7/site-packages/parallels/plesk_api/client.py", line 76, in send_many
        operation_responses.append(operation.parse(operation_response))
      File "/usr/lib/python2.7/site-packages/parallels/plesk_api/operator/database.py", line 85, in parse
        return core.parse_result_set(elem,  cls._parse_data, 'id')
      File "/usr/lib/python2.7/site-packages/parallels/plesk_api/core.py", line 51, in parse_result_set
        return [Result.parse(r, parse_function) for r in result_nodes if r.findtext('status') != 'ok' or r.find(data_indicator) is not None]
      File "/usr/lib/python2.7/site-packages/parallels/plesk_api/core.py", line 22, in parse
        return Success(parse_data(elem))
      File "/usr/lib/python2.7/site-packages/parallels/plesk_api/operator/database.py", line 92, in _parse_data
        db_id=int(elem.findtext('db-id')),
    TypeError: int() argument must be a string or a number, not 'NoneType'
    

Cause

The behavior was caused by software issue PMT-1304.The fix is planned to be included in one of the future product updates.

Workaround

  1. Login to Customer Control Panel > Websites & Domains > Databases > Users.
  2. Alter the properties of source database users, having assign each of them to some particular database. Change the setting "Database" from "Any" to any particular database instance with the option "Make the user default for this database" enabled.

  3. Rerun database migration.

  4. Once database moving is completed, change database user properties back to original.

Search Words

move subscriptions

copy-databases

Exception message: int() argument must be a string or a number, not 'NoneType'

33a70544d00d562bbc5b17762c4ed2b3 caea8340e2d186a540518d08602aa065 e0aff7830fa22f92062ee4db78133079

Email subscription for changes to this article
Save as PDF