Closed L1ghtn1ng closed 7 years ago
Thank you for your report.
I guess you had passing ping
method result to parse
method like following:
def main():
ping_parser = pingparsing.PingParsing()
transmitter = pingparsing.PingTransmitter()
transmitter.destination_host = "8.8.8.8"
transmitter.waittime = 10
result = transmitter.ping()
ping_parser.parse(result)
I could reproduce the problem by this code. In that case, you could easily fix the code.
def main():
ping_parser = pingparsing.PingParsing()
transmitter = pingparsing.PingTransmitter()
transmitter.destination_host = "8.8.8.8"
transmitter.waittime = 10
result = transmitter.ping()
ping_parser.parse(result.stdout) # modified line
Think so will need to double check it when I get to work on Monday but it does from me testing your way does work and would be nice to have a changelog saying that there was a breaking change and how to fix it in release notes. Also your python version bage is broken in the readme and the the docs
You're absolutely right.
I've change to accept for both ping_parser.parse(result)
and ping_parser.parse(result.stdout)
at pingparsing 0.8.2
.
You do not need to change the source code if you upgrade the package.
your python version bage is broken in the readme and the the docs
Looks like pingparsing PyPI page (python version badge source) always corrupt when I publish the package from Travis CI, I'm not sure how to fix that right now.
Yes I did have the code as that and have upgraded to 8.2 and my script now works
Sent from phone
From: Tsuyoshi Hombashi notifications@github.com Sent: Sunday, June 11, 2017 12:28:11 AM To: thombashi/pingparsing Cc: J.Townsend; Author Subject: Re: [thombashi/pingparsing] Attribute Error (#25)
Thank you for your report.
I guess you had passing ping method result to parse method like following:
def main(): ping_parser = pingparsing.PingParsing() transmitter = pingparsing.PingTransmitter() transmitter.destination_host = "8.8.8.8" transmitter.waittime = 10 result = transmitter.ping() ping_parser.parse(result)
I could reproduce the problem by this code. In that case, you could easily fix the code.
def main(): ping_parser = pingparsing.PingParsing() transmitter = pingparsing.PingTransmitter() transmitter.destination_host = "8.8.8.8" transmitter.waittime = 10 result = transmitter.ping() ping_parser.parse(result.stdout) # modified line
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/thombashi/pingparsing/issues/25#issuecomment-307596077, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ADddQiOS4XKeiUY1qfI3wABr_cj7DIO5ks5sCyaLgaJpZM4N2PKz.
Thank you for sharing. I'm glad that works for you.
Then, I'll close the issue.
Running 8.0 of pingparsing and getting the above error on archlinux with python 3.6