Closed
Bug 1184625
Opened 10 years ago
Closed 10 years ago
ImportError: cannot import name __version__ with ./mach marionette-test
Categories
(Remote Protocol :: Marionette, defect)
Remote Protocol
Marionette
Tracking
(Not tracked)
RESOLVED
WORKSFORME
People
(Reporter: mconley, Unassigned)
References
Details
(Whiteboard: [fix in comment 1])
STR:
1) Build Nightly with mk_add_options ENABLE_MARIONETTE=1 in a .mozconfig (not 100% sure this is necessary)
2) Run ./mach marionette-test to run the marionette tests.
ER:
Marionette tests should run.
AR:
ImportError: cannot import name __version__
File "/Users/mikeconley/Projects/mozilla-central/testing/marionette/mach_commands.py", line 142, in run_marionette_test
return run_marionette(tests, binary=binary, topsrcdir=self.topsrcdir, **kwargs)
File "/Users/mikeconley/Projects/mozilla-central/testing/marionette/mach_commands.py", line 40, in run_marionette
from marionette.runtests import (
File "/Users/mikeconley/Projects/mozilla-central/testing/marionette/client/marionette/runtests.py", line 7, in <module>
from marionette import __version__
Reporter | ||
Comment 1•10 years ago
|
||
Fixed by doing:
rm testing/marionette/client/marionette/marionette.pyc
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → WORKSFORME
Comment 2•10 years ago
|
||
Changing the title to make it easier to find for other people with this problem. Dupe other bugs to this one.
Summary: Cannot trigger marionette tests from mach → ImportError: cannot import name __version__ with ./mach marionette-test
Whiteboard: [fix in comment 1]
Comment 4•10 years ago
|
||
(In reply to Mike Conley (:mconley) - Needinfo me! from comment #1)
> Fixed by doing:
>
> rm testing/marionette/client/marionette/marionette.pyc
I usually set the PYTHONDONTWRITEBYTECODE output variable to avoid having .pyc files litter my working directories.
Comment 5•10 years ago
|
||
Yeah, that's a good solution.. just be aware that it comes with a minor perf hit.
It's also possible to purge all .pyc files in your repo by running:
$ hg purge --all -I "**/*.py[co]"
Updated•2 years ago
|
Product: Testing → Remote Protocol
You need to log in
before you can comment on or make changes to this bug.
Description
•