[2.0] maas login yields "ImportError: No module named 'maasserver'"

Bug #1604169 reported by Andrew McDermott on 2016-07-18
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
Critical
Unassigned
2.0
Critical
Unassigned
Trunk
Critical
Unassigned

Bug Description

$ lsb_release -cs
xenial

$ maas login
The program 'maas' is currently not installed. You can install it by typing:
sudo apt install maas-cli

$ sudo apt-cache madison maas-cli
  maas-cli | 2.0.0~rc2+bzr5156-0ubuntu1~16.04.1 | http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages
  maas-cli | 2.0.0~rc2+bzr5156-0ubuntu1~16.04.1 | http://archive.ubuntu.com/ubuntu xenial-updates/main i386 Packages
  maas-cli | 2.0.0~beta3+bzr4941-0ubuntu1 | http://archive.ubuntu.com/ubuntu xenial/main amd64 Packages
  maas-cli | 2.0.0~beta3+bzr4941-0ubuntu1 | http://archive.ubuntu.com/ubuntu xenial/main i386 Packages
      maas | 2.0.0~beta3+bzr4941-0ubuntu1 | http://archive.ubuntu.com/ubuntu xenial/main Sources
      maas | 2.0.0~rc2+bzr5156-0ubuntu1~16.04.1 | http://archive.ubuntu.com/ubuntu xenial-updates/main Sources

$ sudo apt-get -q install maas-cli
Reading package lists...
Building dependency tree...
Reading state information...
The following NEW packages will be installed
  maas-cli
0 to upgrade, 1 to newly install, 0 to remove and 0 not to upgrade.
Need to get 0 B/2,588 B of archives.
After this operation, 37.9 kB of additional disk space will be used.
Selecting previously unselected package maas-cli.
(Reading database ... 559431 files and directories currently installed.)
Preparing to unpack .../maas-cli_2.0.0~rc2+bzr5156-0ubuntu1~16.04.1_all.deb ...
Unpacking maas-cli (2.0.0~rc2+bzr5156-0ubuntu1~16.04.1) ...
Setting up maas-cli (2.0.0~rc2+bzr5156-0ubuntu1~16.04.1) ...

$ maas login
Traceback (most recent call last):
  File "/usr/bin/maas", line 12, in <module>
    sys.exit(maascli.main())
  File "/usr/lib/python3/dist-packages/maascli/__init__.py", line 24, in main
    parser = prepare_parser(argv)
  File "/usr/lib/python3/dist-packages/maascli/parser.py", line 70, in prepare_parser
    register_cli_commands(parser)
  File "/usr/lib/python3/dist-packages/maascli/cli.py", line 193, in register_cli_commands
    load_regiond_commands(management, parser)
  File "/usr/lib/python3/dist-packages/maascli/cli.py", line 221, in load_regiond_commands
    klass = management.load_command_class(app, name)
  File "/usr/lib/python3/dist-packages/django/core/management/__init__.py", line 40, in load_command_class
    module = import_module('%s.management.commands.%s' % (app_name, name))
  File "/usr/lib/python3.5/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 986, in _gcd_import
  File "<frozen importlib._bootstrap>", line 969, in _find_and_load
  File "<frozen importlib._bootstrap>", line 944, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 986, in _gcd_import
  File "<frozen importlib._bootstrap>", line 969, in _find_and_load
  File "<frozen importlib._bootstrap>", line 944, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 986, in _gcd_import
  File "<frozen importlib._bootstrap>", line 969, in _find_and_load
  File "<frozen importlib._bootstrap>", line 944, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 986, in _gcd_import
  File "<frozen importlib._bootstrap>", line 969, in _find_and_load
  File "<frozen importlib._bootstrap>", line 956, in _find_and_load_unlocked
ImportError: No module named 'maasserver'

$ dpkg -l |grep maas
ii maas-cli 2.0.0~rc2+bzr5156-0ubuntu1~16.04.1 all MAAS client and command-line interface
ii python3-maas-client 2.0.0~rc2+bzr5156-0ubuntu1~16.04.1 a

Related branches

Changed in maas:
status: New → Confirmed
importance: Undecided → Critical
milestone: none → 2.0.0
Changed in maas:
status: Confirmed → Fix Committed
summary: - maas login yields "ImportError: No module named 'maasserver'"
+ [2.0] maas login yields "ImportError: No module named 'maasserver'"
Changed in maas:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers