Page MenuHomePhabricator

ImportError: No module named terminal_interface
Closed, DeclinedPublic

Description

Author: audiodude

Description:
I believe my compat install is sync'd to the latest version. I cannot run version.py as you see below.

vagrant@mediawiki-vagrant:/vagrant/pywikibot-compat$ python login.py -dir:/home/vagrant/.pywikibot
Traceback (most recent call last):

File "login.py", line 59, in <module>
  import query
File "/vagrant/pywikibot-compat/query.py", line 30, in <module>
  import wikipedia as pywikibot
File "/vagrant/pywikibot-compat/wikipedia.py", line 9742, in <module>
  exec "import %s_interface as uiModule" % config.userinterface
File "<string>", line 1, in <module>

ImportError: No module named terminal_interface

vagrant@mediawiki-vagrant:/vagrant/pywikibot-compat$ python version.py -dir:/home/vagrant/.pywikibot
No module named terminal_interface
Serious import error; pywikibot not available - was it configured?
Traceback (most recent call last):

File "version.py", line 20, in <module>
  pywikibot.output('Pywikibot: %s' % getversion())

AttributeError: 'module' object has no attribute 'output'


Version: compat-(1.0)
Severity: normal
OS: Linux

Details

Reference
bz66442

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 3:16 AM
bzimport set Reference to bz66442.
bzimport added a subscriber: Unknown Object (????).

That sounds like your checkout is incomplete -- with the userinterfaces dir (or it's contents) missing.

Oh, wait. It's because of -dir:/home/vagrant/.pywikibot. If you want to use that syntax (i.e. changing the place where user-config.py is stored), please use core and not compat.

audiodude wrote:

Okay, no problem. I just thought that since that -dir option existed it would work. The real problem is that I'm developing on a MediaWiki vagrant instance (http://www.mediawiki.org/wiki/MediaWiki-Vagrant) and the directory is shared via NFS, so the permissions are wonky and the user-config.py can't be in the base pywikibot-compat directory.