Closed Bug 1590265 Opened 9 months ago Closed 9 months ago

ImportError cannot import name import_sibling_modules when running `mach try chooser`

Categories

(Firefox Build System :: General, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: danielleleb12, Unassigned)

References

(Blocks 1 open bug)

Details

(Keywords: in-triage)

When running mach try chooser, I get the error:

The details of the failure are as follows:

ImportError: cannot import name import_sibling_modules

File "/Users/danielleleblanc-cyr/src/mozilla-unified/python/mach/mach/main.py", line 360, in run
return self._run(argv)
File "/Users/danielleleblanc-cyr/src/mozilla-unified/python/mach/mach/main.py", line 417, in _run
args = parser.parse_args(argv)
File "/usr/local/Cellar/python@2/2.7.16_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/argparse.py", line 1705, in parse_args
args, argv = self.parse_known_args(args, namespace)
File "/usr/local/Cellar/python@2/2.7.16_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/argparse.py", line 1737, in parse_known_args
namespace, args = self._parse_known_args(args, namespace)
File "/usr/local/Cellar/python@2/2.7.16_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/argparse.py", line 1946, in _parse_known_args
stop_index = consume_positionals(start_index)
File "/usr/local/Cellar/python@2/2.7.16_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/argparse.py", line 1902, in consume_positionals
take_action(action, args)
File "/usr/local/Cellar/python@2/2.7.16_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/argparse.py", line 1811, in take_action
action(self, namespace, argument_values, option_string)
File "/Users/danielleleblanc-cyr/src/mozilla-unified/python/mach/mach/dispatcher.py", line 173, in call
if handler.parser:
File "/Users/danielleleblanc-cyr/src/mozilla-unified/python/mach/mach/decorators.py", line 82, in parser
self._parser = self._parser()
File "/Users/danielleleblanc-cyr/src/mozilla-unified/tools/tryselect/mach_commands.py", line 37, in call
mod = importlib.import_module('tryselect.selectors.{}'.format(self.selector))
File "/usr/local/Cellar/python@2/2.7.16_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/importlib/init.py", line 37, in import_module
import(name)
File "/Users/danielleleblanc-cyr/src/mozilla-unified/build/mach_bootstrap.py", line 404, in call
module = self._original_import(name, globals, locals, fromlist, level)
File "/Users/danielleleblanc-cyr/src/mozilla-unified/tools/tryselect/selectors/chooser/init.py", line 11, in <module>
from tryselect.cli import BaseTryParser
File "/Users/danielleleblanc-cyr/src/mozilla-unified/build/mach_bootstrap.py", line 404, in call
module = self._original_import(name, globals, locals, fromlist, level)
File "/Users/danielleleblanc-cyr/src/mozilla-unified/tools/tryselect/cli.py", line 12, in <module>
from .templates import all_templates
File "/Users/danielleleblanc-cyr/src/mozilla-unified/build/mach_bootstrap.py", line 404, in call
module = self._original_import(name, globals, locals, fromlist, level)
File "/Users/danielleleblanc-cyr/src/mozilla-unified/tools/tryselect/templates.py", line 20, in <module>
from .tasks import resolve_tests_by_suite
File "/Users/danielleleblanc-cyr/src/mozilla-unified/build/mach_bootstrap.py", line 404, in call
module = self._original_import(name, globals, locals, fromlist, level)
File "/Users/danielleleblanc-cyr/src/mozilla-unified/tools/tryselect/tasks.py", line 21, in <module>
from taskgraph.generator import TaskGraphGenerator
File "/Users/danielleleblanc-cyr/src/mozilla-unified/build/mach_bootstrap.py", line 404, in call
module = self._original_import(name, globals, locals, fromlist, level)
File "/Users/danielleleblanc-cyr/src/mozilla-unified/taskcluster/taskgraph/generator.py", line 15, in <module>
from .optimize import optimize_task_graph
File "/Users/danielleleblanc-cyr/src/mozilla-unified/build/mach_bootstrap.py", line 404, in call
module = self._original_import(name, globals, locals, fromlist, level)
File "/Users/danielleleblanc-cyr/src/mozilla-unified/taskcluster/taskgraph/optimize/init.py", line 24, in <module>

I also tried running mach bootstrap, and got another error:
The details of the failure are as follows:

CalledProcessError: Command '['/usr/local/opt/python@2/bin/python2.7', u'/Users/danielleleblanc-cyr/src/mozilla-unified/mach', u'artifact', u'toolchain', u'--from-build', u'macosx64-node']' returned non-zero exit status 1

File "/Users/danielleleblanc-cyr/src/mozilla-unified/python/mozboot/mozboot/mach_commands.py", line 44, in bootstrap
bootstrapper.bootstrap()
File "/Users/danielleleblanc-cyr/src/mozilla-unified/python/mozboot/mozboot/bootstrap.py", line 497, in bootstrap
checkout_root)
File "/Users/danielleleblanc-cyr/src/mozilla-unified/python/mozboot/mozboot/bootstrap.py", line 371, in maybe_install_private_packages_or_exit
self.instance.ensure_node_packages(state_dir, checkout_root)
File "/Users/danielleleblanc-cyr/src/mozilla-unified/python/mozboot/mozboot/osx.py", line 534, in ensure_node_packages
self.install_toolchain_artifact(state_dir, checkout_root, node.OSX)
File "/Users/danielleleblanc-cyr/src/mozilla-unified/python/mozboot/mozboot/base.py", line 319, in install_toolchain_artifact
subprocess.check_call(cmd, cwd=state_dir)
File "/usr/local/Cellar/python@2/2.7.16_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 190, in check_call
raise CalledProcessError(retcode, cmd)

Running ./mach clobber python ought to fix this. Does the command succeed after running that?

Flags: needinfo?(danielleleb12)

That fixed it, thanks!

Flags: needinfo?(danielleleb12)

Ok, thanks for confirming.

Status: NEW → RESOLVED
Closed: 9 months ago
Resolution: --- → FIXED
Duplicate of this bug: 1597858
Duplicate of this bug: 1626872
You need to log in before you can comment on or make changes to this bug.