In [1]:
import pywikibot

site = pywikibot.Site('th', 'wikipedia')
page = pywikibot.Page(site, 'ผู้ใช้:Geonuch/ทดลองเขียน')
---------------------------------------------------------------------------
IsADirectoryError                         Traceback (most recent call last)
<ipython-input-1-02c1c505994a> in <module>()
----> 1 import pywikibot
      2 
      3 site = pywikibot.Site('th', 'wikipedia')
      4 page = pywikibot.Page(site, 'ผู้ใช้:Geonuch/ทดลองเขียน')

/srv/paws/pwb/pywikibot/__init__.py in <module>()
     23 
     24 from pywikibot._wbtypes import WbRepresentation as _WbRepresentation
---> 25 from pywikibot.bot import (
     26     input, input_choice, input_yn, inputChoice, handle_args, showHelp, ui,
     27     calledModuleName, Bot, CurrentPageBot, WikidataBot,

/srv/paws/pwb/pywikibot/bot.py in <module>()
     95 
     96 import pywikibot
---> 97 from pywikibot import config2 as config
     98 from pywikibot import daemonize
     99 from pywikibot import i18n

/srv/paws/pwb/pywikibot/config2.py in <module>()
   1051             if OSWIN32 or _filemode & 0o02 == 0:
   1052                 with open(_filename, 'rb') as f:
-> 1053                     exec(compile(f.read(), _filename, 'exec'), _uc)
   1054             else:
   1055                 warning("Skipped '%(fn)s': writeable by others."

/srv/paws/user-config.py in <module>()
      7 custom_path = os.path.expanduser('~/user-config.py')
      8 if os.path.exists(custom_path):
----> 9     with open(custom_path, 'rb') as f:
     10         exec(compile(f.read(), custom_path, 'exec'), globals())
     11 

IsADirectoryError: [Errno 21] Is a directory: '/home/paws/user-config.py'
In [2]:
/home/paws/user-config.pyimport 
  File "<ipython-input-2-9bd7ca9118e0>", line 1
    home(/paws/user-config.pyimport)
         ^
SyntaxError: invalid syntax
In [3]:
import /home/paws/user-config.pyimport 
  File "<ipython-input-3-ff42b8986b21>", line 1
    import /home/paws/user-config.pyimport
           ^
SyntaxError: invalid syntax
In [ ]: