-
Notifications
You must be signed in to change notification settings - Fork 415
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AttributeError: 'NoneType' object has no attribute 'strip' #197
Comments
I’ve never tried it with LLDB from homebrew, only Xcode’s LLDB.
> ./lib/python2.7/site-packages/voltron-0.1.7-py2.7.egg/voltron/plugins/debugger/dbg_lldb.py(398)command()
-> return res.GetOutput().strip()
(Pdb) list
393 if command:
394 res = lldb.SBCommandReturnObject()
395 ci = self.host.GetCommandInterpreter()
396 ci.HandleCommand(str(command), res, False)
397 if res.Succeeded():
398 -> return res.GetOutput().strip()
399 else:
400 raise Exception(res.GetError().strip())
401 else:
402 raise Exception("No command specified")
403
(Pdb) n
AttributeError: "'NoneType' object has no attribute 'strip'"
> ./lib/python2.7/site-packages/voltron-0.1.7-py2.7.egg/voltron/plugins/debugger/dbg_lldb.py(398)command()
-> return res.GetOutput().strip()
Any good idea to resolve this? I wouldn't mind digging into the issue.
This makes it look like GetOutput() might be returning None rather than an empty string when there is no output in the newer version. Maybe try modifying the code to handle that case? Otherwise I’d say something more fundamental is going wrong. Can you `pp command` before there and show me what command it’s running? Also inspect the `res` object? I can’t remember what props it’ll have but the LLDB API doc will tell you if you want to dig into it.
|
Here are the output for
Thanks. I'll try to see what I can do. |
Hmm yeah it’s possible it’s just returning None now. I’d try changing this line:
398 -> return res.GetOutput().strip()
To:
output = res.GetOutput()
return output.strip() if output else None
… On May 4, 2017, at 9:10 AM, nateozem ***@***.***> wrote:
Here are the output for command and res:
(Pdb) pp command
'script import voltron'
(Pdb) pp res
<lldb.SBCommandReturnObject; proxy of <Swig Object of type 'lldb::SBCommandReturnObject *' at 0x11368ec60> >
Thanks. I'll try to see what I can do.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub <#197 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AAey8QUJPhGRGOcvq4VUzq9os6YlE2ctks5r2fiMgaJpZM4NQ1wa>.
|
Cool thanks. I'll give it a try. |
Nice. It works. I'll create PR (even though I just copy and paste your snippet), unless told otherwise. I wonder why it works? |
Sure send me a PR and I'll merge it. Make it return "" rather than None though actually.
… On May 4, 2017, at 11:37 AM, nateozem ***@***.***> wrote:
Nice. It works. I'll create PR (even though I just copy and paste your snippet), unless told otherwise.
I wonder why it works?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub <#197 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AAey8S25Nj9iFmnuwpULGEstL96wei5Oks5r2hrzgaJpZM4NQ1wa>.
|
sure |
Facing this, is it merged? |
yes, it's. I problem went away. Do you have the same version or have you pulled the latest commit from master? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Using
lldb v360.99.0
(v4.0.0.1
), I'll get the following error:lldb
info:voltron
:I'm sure I've installed things correctly, however I'm using updated version of
lldb
fromhomebrew
.So, would
lldb v4.x.x
be the issue?The reason I asked because from the debug log I gathered (shown below), there isn't any conflicts with
lldb
andpython
.Any good idea to resolve this? I wouldn't mind digging into the issue.
The text was updated successfully, but these errors were encountered: