Closed Bug 1651871 Opened 6 years ago Closed 6 years ago

moz-phab fails with "TypeError: join() argument must be str or bytes, not 'PosixPath'"

Categories

(Conduit :: moz-phab, defect)

defect

Tracking

(Not tracked)

RESOLVED INVALID

People

(Reporter: botond, Unassigned)

References

Details

After a self-update, moz-phab started failing with:

$ moz-phab submit .^ .
Traceback (most recent call last):
  File "/home/botond/.local/bin/moz-phab", line 33, in <module>
    sys.exit(load_entry_point('MozPhab==0.1.89', 'console_scripts', 'moz-phab')())
  File "/home/botond/.local/bin/moz-phab", line 25, in importlib_load_entry_point
    return next(matches).load()
  File "/home/botond/.local/lib/python3.5/site-packages/importlib_metadata/__init__.py", line 105, in load
    module = import_module(match.group('module'))
  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 958, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 673, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 673, in exec_module
  File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed
  File "/home/botond/.local/lib/python3.5/site-packages/mozphab/mozphab.py", line 16, in <module>
    from mozphab import environment
  File "/home/botond/.local/lib/python3.5/site-packages/mozphab/environment.py", line 37, in <module>
    os.environ.get("MOZBUILD_STATE_PATH", os.path.join(HOME_DIR, ".mozbuild")),
  File "/usr/lib/python3.5/posixpath.py", line 89, in join
    genericpath._check_arg_types('join', a, *p)
  File "/usr/lib/python3.5/genericpath.py", line 143, in _check_arg_types
    (funcname, s.__class__.__name__)) from None
TypeError: join() argument must be str or bytes, not 'PosixPath'

Solved by re-running pip3 install --user MozPhab after having used pyenv to install python 3.6 as per bug 1644845 comment 12.

Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → INVALID

I already had python 3.6 installed and ran into this when moz-phab self-updated, but running ./mach install-moz-phab -f to force-reinstall it (this time using my py3.6 default) fixed the problem.

This isn't technically invalid - moz-phab's min python version is 3.5 not 3.6; unfortunately test automation cannot run on 3.5 so this was missed.

Now that 3.6 is required to build Firefox it would be easier to bump our min version to 3.6 than fix issues with Path/str (bug 1619855).

See Also: → 1619855
You need to log in before you can comment on or make changes to this bug.