Closed Officedr0ne closed 5 years ago
It's only a one liner which tries to pull out the channel by tagname:
req_channel = next((channel for channel in self.channels if channel.channel_tag == channel_tag), None)
So I can only presume that the channel_tag doesn't match any channel.channel_tag of your pb.channels, returning None instead. Can you reproduce this and give the specific channel names from the output of pb.channels and your call to get_channel()?
I'm having this same issue, but I'm certain the tag name is right.
print(pb.channels)
-> [Channel(name: 'PEP_o_the_Morning' tag: 'pepo')]
print(pb.get_channel('pepo'))
-> AttributeError: 'Pushbullet' object has no attribute 'get_channel'
Ah. So I must have misread the original issue, apologies. It's clear with the last update. It looks like Pushbullet object doesn't have that method, which I can only presume is because the latest release hasn't included the more recent commit's. I added the get_channel method in #73
@elanorigby are you using a pusbullet.py version from git or from pip or something else?
I'm in the pip zone. Thanks for the quick response!
@kovacsbalu @r-darwish Seems like a lot of code missing from the pip release. What's the plans for the next one?
@simonporter007 I don't know. Who manage pushbullet.py pip releases? Not me :)
Ha ha! Well in that case no idea, I don't think randomchars is about these days. Might just have to recommend using git instead!
@simonporter007 I don't think I have permissions to upload a package to PyPi. In any case, I stopped using PushBullet a while ago so it's probably best if @randomchars will put someone else as a collaborator instead of me.
@elanorigby Looks like they just created 0.11 tag which should get pushed to pypi. Should sort your issue if you upgrade it or if you've switched to install from git instead, then no worries.
Awesome, thanks.
So pb.channels works fine, but pb.get_channel returns an error that pushbullet doesn't have that object. Any idea what might be wrong?