Closed Bug 1677790 Opened 4 years ago Closed 4 years ago

mozregression fails on Python 3.9 with `ImportError: cannot import name 'readPlist' from 'plistlib'`

Categories

(Testing :: mozregression, defect)

Default
defect

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1580625

People

(Reporter: jld, Unassigned)

Details

I tried using ./mach mozregression, but it kept giving me the mozregression was installed. please re-run your command message and never actually doing anything. The message said to try installing with pip if that happened, so I did that and got this error:

Traceback (most recent call last):
  File "/usr/local/bin/mozregression", line 5, in <module>
    from mozregression.main import main
  File "/usr/local/lib/python3.9/site-packages/mozregression/main.py", line 28, in <module>
    from mozregression.launchers import REGISTRY as APP_REGISTRY
  File "/usr/local/lib/python3.9/site-packages/mozregression/launchers.py", line 18, in <module>
    import mozinstall
  File "/usr/local/lib/python3.9/site-packages/mozinstall/__init__.py", line 8, in <module>
    from .mozinstall import *
  File "/usr/local/lib/python3.9/site-packages/mozinstall/mozinstall.py", line 31, in <module>
    from plistlib import readPlist
ImportError: cannot import name 'readPlist' from 'plistlib' (/usr/local/Cellar/python@3.9/3.9.0_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/plistlib.py)

It looks like that exception is bug 1674162, which has been fixed in m-c but maybe not uploaded to PyPI?

It says please re-run your command. If you keep getting this message please manually run: 'pip install -U mozregression'.

Did you get that same message or did you get the plistlib error and then proceeded with pip?

If the latter, then the main problem would be that mach mozregression is not using the in-tree copies of all the dependencies of mozregression that are in-tree.

Depends on: 1678037

(In reply to Mike Hommey [:glandium] from comment #1)

It says please re-run your command. If you keep getting this message please manually run: 'pip install -U mozregression'.

Did you get that same message or did you get the plistlib error and then proceeded with pip?

If the latter, then the main problem would be that mach mozregression is not using the in-tree copies of all the dependencies of mozregression that are in-tree.

Annoyingly, sometimes mach mozregression can automatically install an old version of a mozbase dependency into the in-tree copy. I'm going to mark this as a dupe of bug 1580625 (which describes the issue), short term workaround is to fix the just-filed bug 1678037.

Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → DUPLICATE

(In reply to Mike Hommey [:glandium] from comment #1)

It says please re-run your command. If you keep getting this message please manually run: 'pip install -U mozregression'.

Did you get that same message or did you get the plistlib error and then proceeded with pip?

Not sure if this still needs to be answered after comment #2, but: I got that same message repeatedly with mach. I didn't see the plistlib error (or any other exception) printed to the terminal until I tried pip.

No longer depends on: 1674162, 1678037
You need to log in before you can comment on or make changes to this bug.