doronz88 / pymobiledevice3

Pure python3 implementation for working with iDevices (iPhone, etc...).
https://discord.gg/52mZGC3JXJ
GNU General Public License v3.0
1.32k stars 182 forks source link

Error when running #1077

Closed BlueFalconHD closed 2 months ago

BlueFalconHD commented 2 months ago

Test environment

Describe the bug When running the command I get an error message. Note: this didn't happen earlier today

To Reproduce Run python -m pymobiledevice3 -h in a Conda enviornment after installing pymobiledevice3 via pythom -m pip install -U pymobiledevice3

Expected behavior A help message to appear

Logs

Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/opt/homebrew/Caskroom/miniconda/base/lib/python3.12/site-packages/pymobiledevice3/__main__.py", line 176, in <module>
    main()
  File "/opt/homebrew/Caskroom/miniconda/base/lib/python3.12/site-packages/pymobiledevice3/__main__.py", line 100, in main
    cli()
  File "/Users/hayes/.local/lib/python3.12/site-packages/click/core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/hayes/.local/lib/python3.12/site-packages/click/core.py", line 1077, in main
    with self.make_context(prog_name, args, **extra) as ctx:
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/hayes/.local/lib/python3.12/site-packages/click/core.py", line 943, in make_context
    self.parse_args(ctx, args)
  File "/Users/hayes/.local/lib/python3.12/site-packages/click/core.py", line 1641, in parse_args
    echo(ctx.get_help(), color=ctx.color)
         ^^^^^^^^^^^^^^
  File "/Users/hayes/.local/lib/python3.12/site-packages/click/core.py", line 704, in get_help
    return self.command.get_help(self)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/hayes/.local/lib/python3.12/site-packages/click/core.py", line 1325, in get_help
    self.format_help(ctx, formatter)
  File "/Users/hayes/.local/lib/python3.12/site-packages/click/core.py", line 1358, in format_help
    self.format_options(ctx, formatter)
  File "/Users/hayes/.local/lib/python3.12/site-packages/click/core.py", line 1564, in format_options
    self.format_commands(ctx, formatter)
  File "/Users/hayes/.local/lib/python3.12/site-packages/click/core.py", line 1617, in format_commands
    cmd = self.get_command(ctx, subcommand)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Caskroom/miniconda/base/lib/python3.12/site-packages/pymobiledevice3/__main__.py", line 84, in get_command
    mod = __import__(f'pymobiledevice3.cli.{CLI_GROUPS[name]}', None, None, ['cli'])
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Caskroom/miniconda/base/lib/python3.12/site-packages/pymobiledevice3/cli/restore.py", line 20, in <module>
    from pymobiledevice3.restore.recovery import Behavior, Recovery
  File "/opt/homebrew/Caskroom/miniconda/base/lib/python3.12/site-packages/pymobiledevice3/restore/recovery.py", line 12, in <module>
    from pymobiledevice3.restore.base_restore import BaseRestore, Behavior
  File "/opt/homebrew/Caskroom/miniconda/base/lib/python3.12/site-packages/pymobiledevice3/restore/base_restore.py", line 8, in <module>
    from ipsw_parser.ipsw import IPSW
  File "/opt/homebrew/Caskroom/miniconda/base/lib/python3.12/site-packages/ipsw_parser/ipsw.py", line 9, in <module>
    from ipsw_parser.build_manifest import BuildManifest
  File "/opt/homebrew/Caskroom/miniconda/base/lib/python3.12/site-packages/ipsw_parser/build_manifest.py", line 6, in <module>
    from ipsw_parser.build_identity import BuildIdentity
  File "/opt/homebrew/Caskroom/miniconda/base/lib/python3.12/site-packages/ipsw_parser/build_identity.py", line 14, in <module>
    ipsw = local['ipsw']
           ~~~~~^^^^^^^^
  File "/opt/homebrew/Caskroom/miniconda/base/lib/python3.12/site-packages/plumbum/machines/local.py", line 242, in __getitem__
    return LocalCommand(self.which(cmd))
                        ^^^^^^^^^^^^^^^
  File "/opt/homebrew/Caskroom/miniconda/base/lib/python3.12/site-packages/plumbum/machines/local.py", line 203, in which
    raise CommandNotFound(progname, list(cls.env.path))
plumbum.commands.processes.CommandNotFound: (CommandNotFound(...), 'ipsw', [<LocalPath /Users/hayes/.bun/bin>, <LocalPath /opt/homebrew/Caskroom/miniconda/base/bin>, <LocalPath /opt/homebrew/Caskroom/miniconda/base/condabin>, <LocalPath /Users/hayesdombroski/Library/pnpm>, <LocalPath /nix/var/nix/profiles/default/bin>, <LocalPath /Users/hayes/go/bin>, <LocalPath /Users/hayes/.detaspace/bin>, <LocalPath /opt/homebrew/opt/openjdk/bin>, <LocalPath /Users/hayes/.cargo/bin>, <LocalPath /opt/homebrew/opt/coreutils/libexec/gnubin>, <LocalPath /opt/homebrew/sbin>, <LocalPath /opt/homebrew/bin>, <LocalPath /usr/sbin>, <LocalPath /usr/bin>, <LocalPath /bin>, <LocalPath /Users/hayes/.local/bin>, <LocalPath /Users/hayes/.spicetify>, <LocalPath /usr/local/bin>, <LocalPath /System/Cryptexes/App/usr/bin>, <LocalPath /sbin>, <LocalPath /var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin>, <LocalPath /var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin>, <LocalPath /var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin>, <LocalPath /Library/Apple/usr/bin>,<LocalPath /Applications/Little Snitch.app/Contents/Components>, <LocalPath /Applications/VMware Fusion.app/Contents/Public>, <LocalPath /usr/local/share/dotnet>, <LocalPath ~/.dotnet/tools>, <LocalPath /Library/Frameworks/Mono.framework/Versions/Current/Commands>, <LocalPath /Library/TeX/texbin>])

For community

⬇️ Please click the 👍 reaction instead of leaving a +1 or 👍 comment

doronz88 commented 2 months ago

Thanks for the update! Just created https://github.com/doronz88/pymobiledevice3/pull/1078 which should fix it Can you verify? Soon to be merged and released as a new version

BlueFalconHD commented 2 months ago

That fixed the issue, thanks!