jxmorris12 / PokemonGo-Finder

Live visualization of all the pokemon in your area... and more!
GNU General Public License v3.0
171 stars 43 forks source link

AttributeError: 'Pushbullet' object has no attribute 'get_channel' #38

Closed Trainnnnn closed 7 years ago

Trainnnnn commented 7 years ago

I'm running into this error: AttributeError: 'Pushbullet' object has no attribute 'get_channel' http://pastebin.com/69XCVmq4

Is there a new variable in config.json with the introductionn of pushbullet channels?

paperc07 commented 7 years ago

yeah idk what happened it was fine yesterday

Trainnnnn commented 7 years ago

Error is always presented when finding first Pokemon.

paperc07 commented 7 years ago

Yep

KarlTrueman commented 7 years ago

ive temp fixed this https://github.com/R37/PokemonGo-Finder it only works if you only have one channel. all you need is your config file and then run it and it should automatically find your channel and start.

paperc07 commented 7 years ago

What do you mean one channel? How do we run it still with main.py

paperc07 commented 7 years ago

C:\Users\FRU5TRAT3\Desktop\PokemonGo-Finder-master (2)\PokemonGo-Finder-master>m ain.py File "C:\Users\FRU5TRAT3\Desktop\PokemonGo-Finder-master (2)\PokemonGo-Finder- master\main.py", line 83 <<<<<<< HEAD ^ SyntaxError: invalid syntax

C:\Users\FRU5TRAT3\Desktop\PokemonGo-Finder-master (2)\PokemonGo-Finder-master>

Trainnnnn commented 7 years ago

Hi @R37. Thanks for hopping on the issue quick. After putting the updated files in place I also get the same error @paperc07 is getting.

paperc07 commented 7 years ago

Yeah thanks @r37 for the quick reply

KarlTrueman commented 7 years ago

My gitgub folder seems to of messed with my code. ill take a look now ive got a machine running the script so ill try upload that

Edit: seems to of merged files weirdly so ill download the files from my remote server and re upload

Trainnnnn commented 7 years ago

@R37 Thanks. Is there a spot to put your channel name? If you just want it to push to yourself are any changes necessary?

Thanks!

atticusm commented 7 years ago

Same. Thank you again for everything you've done! Hopefully this get's fixed ASAP.

paperc07 commented 7 years ago

Ok thanks again @r37 let us know

Skyblade01 commented 7 years ago

Don't know how to create a pull to fix this so I just put the code changes for notifier.py in pastebin

http://pastebin.com/jSjJgrmT

paperc07 commented 7 years ago

I will check it out here in a min

Skyblade01 commented 7 years ago

bleh this whole merge looks to be frakked, after fixing that it will throw a login error after one iteration of searching. Going to look into fixing it as well.

paperc07 commented 7 years ago

Yeah it gave me same error

kratsg commented 7 years ago

Error is raised due to this commit: https://github.com/jxmorris12/PokemonGo-Finder/commit/20a51c32eb4b87af413bb7be02d8e601674789d6

Skyblade01 commented 7 years ago

@kratsg Yea but the login error I am seeing after one full scan cycle isn't, probably from the commit before

kratsg commented 7 years ago

@kratsg Yea but the login error I am seeing after one full scan cycle isn't, probably from the commit before

Yes. Also, the whole channel thing isn't supported. The login error occurs after a full scan.

paperc07 commented 7 years ago

I still have the one from yesterday if anyone wants that it works and I believe auto updates. Post your email if you want it.

kratsg commented 7 years ago

@paperc07 do you not know how to use github?

Trainnnnn commented 7 years ago

Can't you just attach the file?

kratsg commented 7 years ago

Guys, this is github. Fork the repo, make your changes, push, submit a pull request with the fixes -- and that's how you do it. Or fork it, change to the version that works for you, and link it.

paperc07 commented 7 years ago

@kratsg I am a noob that;s why I am always asking for help and pushbullet isnt working :(

kratsg commented 7 years ago

https://github.com/kvangent/PokemonGo-Map -- this is going to be a better one. This one has a lot of bugs that need to get pulled in from upstream.

paperc07 commented 7 years ago

yeah but the map I never use, I want to be able to put a location where I am going to be for a few hours and it notify me from my list whats in the area, but thanks

kratsg commented 7 years ago

@paperc07 -- the one I linked is a fork that is more up-to-date and uses notifications. Use that instead of this one unless @jxmorris12 fixes his stuff? Anyhow, they're working based off v2.0 of the map.

paperc07 commented 7 years ago

@kratsg ok well thank you so much I will check that out right now

I assume I just put true for all the ones I want?

Traceback (most recent call last): File "runserver.py", line 10, in from flask_cors import CORS, cross_origin ImportError: No module named flask_cors

C:\Users\FRU5TRAT3\Desktop\PokemonGo-Map-master>

paperc07 commented 7 years ago

@kratsg ty so much, I got sick of python errors reinstalled everything and everything is working flawlessly now thanks again that newer pokemon go map is sick!!

mariotatis commented 7 years ago

In notifier.py Comment line 50 and line 70 and uncomment line 71

Do not use channel name at all, it fixes the issue.

paperc07 commented 7 years ago

[+] Searching for Pokemon at location 26.60376 -82.011825 Pokemon : {'lat': 26.602461816281092, 'lng': -82.01274103231611, 'disappear_time': 1469426837.474, ' id': 19, 'name': u'Rattata'} Exception in thread search_thread: Traceback (most recent call last): File "C:\Python27\lib\threading.py", line 801, in bootstrap_inner self.run() File "C:\Python27\lib\threading.py", line 754, in run self.__target(_self.args, *_self.__kwargs) File "C:\Users\FRU5TRAT3\Desktop\POKEMON FINDER\trunk\main.py", line 627, in main pokemonsJSON, ignore, only) File "C:\Users\FRU5TRAT3\Desktop\POKEMON FINDER\trunk\main.py", line 736, in process_step notifier.pokemon_found(pokemon_obj) File "C:\Users\FRU5TRAT3\Desktop\POKEMON FINDER\trunk\notifier.py", line 50, in pokemon_found my_channel = pushbullet_client.get_channel('CHANNELNAME HERE') AttributeError: 'Pushbullet' object has no attribute 'get_channel'

BUT YES doing what @malosaa said will get it working

In notifier.py Comment line 50 and line 70 and uncomment line 71

Do not use channel name at all, it fixes the issue.

malosaa commented 7 years ago

hehe , its really easy .. open notify.py and put a # infront of this line push = pushbullet_client.push_link(notification_text, google_maps_link, body=location_text, channel=my_channel)

and delete the # at this line push = pushbullet_client.push_link(notification_text, google_maps_link, body=location_text)

malosaa commented 7 years ago

if you have a pushbullet account what has a channel you can share the notifications with other people they can subscribe to you and get your notifications , ill add it to the readme now

kratsg commented 7 years ago

if you have a pushbullet account what has a channel you can share the notifications with other people they can subscribe to you and get your notifications , ill add it to the readme now

That's not the solution. The push_link function does not have a channel attribute and will complain about this, which means the pushbullet client being used doesn't support channels at all.

malosaa commented 7 years ago

yes it is supported and works here normal ...

malosaa commented 7 years ago

ok , i wil release a fix and disable it by default , and you can turn on channels as you want , i put it in the readme aswel

kratsg commented 7 years ago

Again, this will still contain bugs because it's rebased off an older version of the maps code.

This: https://github.com/kvangent/PokemonGo-Map -- contains all the current functionality of this repository + more features that do not exist. I would strongly suggest not confusing people by trying to let them use this, which is current very far out of date now.

malosaa commented 7 years ago

@kratsg this version has no bugs , i killed all the bugs , it was a simple config setting that you needed to do , thats why the channel_name error pops up...

check here ,i fixed it #40 now for people who don't want to use channels it right away.

yes kvgent has a working one based on ahaaaaaa develop repo , but i changed his code aswell here : https://github.com/malosaa/PokemonGo-Finder_

but i prefer jxmorris repo because the config settings are much faster and easyer for people who aren't experienced with editing code..

Skyblade01 commented 7 years ago

@kratsg I wouldn't use KVA's BECAUSE its using the the new mapping code. The new mapping doesn't even detect half as many pokemon as the old master code did(which jxmorris code is based on). Once they work out the bugs in the new mapping algorithm to correctly detect pokemon sure but right now it still is picking up less than half.

kratsg commented 7 years ago

@Skyblade01 -- just change the number of steps. There is a bug in the old code that double-counts pokemon which was fixed... The current code works for me perfectly fine and detects everything that I am able to see in person.

Skyblade01 commented 7 years ago

@kratsg it has nothing to do with double counting pokemon, if I run both at the same time the old code picks up more and different pokemon near the center than the new code does. This is with the new code set to 10 steps and the old set to 5.

kratsg commented 7 years ago

@Skyblade01 -- are you using Windows? https://github.com/AHAAAAAAA/PokemonGo-Map/issues/1909

There is a known issue about this.

Skyblade01 commented 7 years ago

@kratsg I am using windows, the fact there is a known issue about it just proves my point to not use the new mapping code until its fixed, unless you're on mac or linux.

kratsg commented 7 years ago

@kratsg I am using windows, the fact there is a known issue about it just proves my point to not use the new mapping code until its fixed, unless you're on mac or linux.

The old mapping code has a very bad bug on mac/linux. A majority of the development is going to be on that and I have zero issues unless I use this repo. Suit yourself.

Skyblade01 commented 7 years ago

@kratsg It's not really to suit myself, you came here saying to use the other repo because it's basically better in all ways than this one and to not use this repo because it's out of date. I am just pointing out that if someone is on windows this repo is the only one I know of that does notifications AND detects all pokemon.

malosaa commented 7 years ago

here everything works fine with this repo... so no issue

jxmorris12 commented 7 years ago

I'm going to disable pushbullet push to channel