I'm driving a flagged bot into Commons, but some time ago I migrated from Windows to Linux  so I'd to reinstall pywikibot ad reconfiguring it.

It seems that something is going wrong with the statement:
usernames['commons']['commons'] = u'BrolloBot'

When running pwb.py login -all, I successfully login into other bot accounts, but login in to commons fails, and I get a message: 

RuntimeError: dictionary changed size during iteration
CRITICAL: Exiting due to uncaught exception <type 'exceptions.RuntimeError'>

What is happening please? 

Alex brollo