facebook / chisel

Chisel is a collection of LLDB commands to assist debugging iOS apps.
MIT License
9.13k stars 803 forks source link

AttributeError: FBPrintViewHierarchyCommand instance has no attribute 'lex' #261

Open n0shake opened 5 years ago

n0shake commented 5 years ago

First up, thanks for making this awesome tool!

I installed Chisel via brew today morning and I'm running into the following error anytime I use any Chisel commands. Any guesses what I might be doing wrong?

Screen Shot 2019-04-08 at 8 14 12 AM

idrisr commented 5 years ago

what version of chisel do you have?

brew info chisel

On Mon, Apr 8, 2019 at 10:16 AM Abhishek Banthia notifications@github.com wrote:

First up, thanks for making this awesome tool!

I installed Chisel via brew today morning and I'm running into the following error anytime I use any Chisel commands. Any guesses what I might be doing wrong?

[image: Screen Shot 2019-04-08 at 8 14 12 AM] https://user-images.githubusercontent.com/8280282/55735630-92116e00-59d6-11e9-8bcd-2144ddd37b9b.png

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/facebook/chisel/issues/261, or mute the thread https://github.com/notifications/unsubscribe-auth/AAgbLXdHdwNujGeg-q_2vJAIOnVD2CpRks5ve11SgaJpZM4cicbR .

n0shake commented 5 years ago

1.8.1

Screen Shot 2019-04-08 at 9 16 28 AM

ChrisRicca commented 5 years ago

I'm seeing this as well, running lldb directly from the command line (version 8.0.1) and Chisel version 1.8.1 -- I also tested on lldb version 6.something and saw the same issue.

To be clear: I wasn't using Xcode. Just launching lldb from the command line.

dacaiguoguogmail commented 5 years ago

@ChrisRicca You may need importshlex, and add lex method to command

import shlex
  def lex(self, commandLine):
    return shlex.split(commandLine)
dacaiguoguogmail commented 5 years ago

Final solution

defaults write com.apple.dt.lldb DefaultPythonVersion 2

From https://github.com/facebook/chisel/issues/262