import pywikibot 

site = pywikibot.Site('zwakattack', 'wikia')
page = pywikibot.Page(site, 'PyWiki Test')

page.text = 'Hello world!'
page.save()
WARNING: /srv/paws/lib/python3.4/site-packages/ipykernel/__main__.py:3: UserWarning: Site wikia:wikia instantiated using different code "zwakattack"
  app.launch_new_instance()

---------------------------------------------------------------------------
NoUsername                                Traceback (most recent call last)
/srv/paws/lib/python3.4/site-packages/pywikibot/page.py in _save(self, summary, watch, minor, botflag, async, callback, cc, quiet, **kwargs)
   1218             done = self.site.editpage(self, summary=summary, minor=minor,
-> 1219                                       watch=watch, bot=botflag, **kwargs)
   1220             if not done:

/srv/paws/lib/python3.4/site-packages/pywikibot/site.py in callee(self, *args, **kwargs)
   1324             if grp == 'user':
-> 1325                 self.login(False)
   1326             elif grp == 'sysop':

/srv/paws/lib/python3.4/site-packages/pywikibot/site.py in login(self, sysop)
   2076                                     'wrong': self.userinfo['name'],
-> 2077                                     'right': self._username[sysop]})
   2078             else:

NoUsername: Logged in on wikia:wikia via OAuth as 208.80.155.255, but expect as None

During handling of the above exception, another exception occurred:

OtherPageSaveError                        Traceback (most recent call last)
<ipython-input-1-fa4e49e21fef> in <module>()
      5 
      6 page.text = 'Hello world!'
----> 7 page.save()

/srv/paws/lib/python3.4/site-packages/pywikibot/tools/__init__.py in wrapper(*__args, **__kw)
   1445                              cls, depth)
   1446                     del __kw[old_arg]
-> 1447             return obj(*__args, **__kw)
   1448 
   1449         if not __debug__:

/srv/paws/lib/python3.4/site-packages/pywikibot/page.py in save(self, summary, watch, minor, botflag, force, async, callback, apply_cosmetic_changes, quiet, **kwargs)
   1206             self._save(summary=summary, watch=watch, minor=minor,
   1207                        botflag=botflag, async=async, callback=callback,
-> 1208                        cc=apply_cosmetic_changes, quiet=quiet, **kwargs)
   1209 
   1210     def _save(self, summary=None, watch=None, minor=True, botflag=None,

/srv/paws/lib/python3.4/site-packages/pywikibot/page.py in _save(self, summary, watch, minor, botflag, async, callback, cc, quiet, **kwargs)
   1232                 if isinstance(err, pywikibot.PageSaveRelatedError):
   1233                     raise err
-> 1234                 raise pywikibot.OtherPageSaveError(self, err)
   1235         if callback:
   1236             callback(self, err)

OtherPageSaveError: Edit to page [[wikia:PyWiki Test]] failed:
Logged in on wikia:wikia via OAuth as 208.80.155.255, but expect as None