Skip to content
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

Script stuck #7

Open
Giovanni55913 opened this issue Aug 20, 2021 · 4 comments
Open

Script stuck #7

Giovanni55913 opened this issue Aug 20, 2021 · 4 comments

Comments

@Giovanni55913
Copy link

Hi,

I currently have an issue with the script. It seems that the script gets stuck on checking the pokeballs. It comesback with a couple off errors, but does not go on. Could you help me with this ?

evTools listening on ws://127.0.0.1:62817/devtools/browser/ed177697-d8ac-4840-b99f-80ae6b34891b
File "C:\Project\vortexbot.py", line 813, in
if any (player.items[ball] == None or player.items[ball] < config['restock'][ball]['min'] for ball in ['Poké Ball', 'Great Ball', 'Ultra Ball']):
File "C:\Project\vortexbot.py", line 813, in
if any (player.items[ball] == None or player.items[ball] < config['restock'][ball]['min'] for ball in ['Poké Ball', 'Great Ball', 'Ultra Ball']):
KeyError: 'Poké Ball'
PS C:\Project> [19160:23748:0820/174104.000:ERROR:device_event_log_impl.cc(214)] [17:41:03.999] USB: usb_device_handle_win.cc:1048 Failed to read descriptor from node connection: Een apparaat dat op het systeem is aangesloten, werkt niet. (0x1F)
[19160:23748:0820/174104.004:ERROR:device_event_log_impl.cc(214)] [17:41:04.003] Bluetooth: bluetooth_adapter_winrt.cc:1073 Getting Default Adapter failed.
[19160:23748:0820/174104.005:ERROR:device_event_log_impl.cc(214)] [17:41:04.004] USB: usb_device_handle_win.cc:1048 Failed to read descriptor from node connection: Een apparaat dat op het systeem is aangesloten, werkt niet. (0x1F)
py .\vortexbot.py
C:\Project\vortexbot.py:744: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details.
config = yaml.load(f)

DevTools listening on ws://127.0.0.1:52998/devtools/browser/37af66ba-00a4-4aa2-a35a-9da257735eca
PS C:\Project> py .\vortexbot.py
C:\Project\vortexbot.py:744: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details.
config = yaml.load(f)

DevTools listening on ws://127.0.0.1:59679/devtools/browser/f6e4503d-878e-4e3f-87ae-26f0e4e865f5
Traceback (most recent call last):
File "C:\Project\vortexbot.py", line 813, in
if any (player.items[ball] == None or player.items[ball] < config['restock'][ball]['min'] for ball in ['Poké Ball', 'Great Ball', 'Ultra Ball']):
File "C:\Project\vortexbot.py", line 813, in
if any (player.items[ball] == None or player.items[ball] < config['restock'][ball]['min'] for ball in ['Poké Ball', 'Great Ball', 'Ultra Ball']):
KeyError: 'Poké Ball'
PS C:\Project> [23956:22828:0820/174254.099:ERROR:device_event_log_impl.cc(214)] [17:42:54.099] USB: usb_device_handle_win.cc:1048 Failed to read descriptor from node connection: Een apparaat dat op het systeem is aangesloten, werkt niet. (0x1F)
[23956:22828:0820/174254.103:ERROR:device_event_log_impl.cc(214)] [17:42:54.103] Bluetooth: bluetooth_adapter_winrt.cc:1073 Getting Default Adapter failed.
[23956:22828:0820/174254.104:ERROR:device_event_log_impl.cc(214)] [17:42:54.105] USB: usb_device_handle_win.cc:1048 Failed to read descriptor from node connection: Een apparaat dat op het systeem is aangesloten, werkt niet. (0x1F)

@tolgahantunc
Copy link

tolgahantunc commented Aug 20, 2021

Same here. I edited the code and made unavailable to run (the tool skips that part), so Key Error is not occurring and tool continues running. The bot move in a map automatically. However, this time I am getting a different error, the tool doesn't catch any pokemon automatically, you need to watch your screen and click Battle button manually when you want to catch a pokemon.

I am not saying that the fix I did is a REAL fix, we need help from the developer of the tool.

Cheers

@Tishj
Copy link
Owner

Tishj commented Dec 13, 2021

Key Error is occuring because of the python version most likely
Just took a look at the bot yesterday, and it seems PokemonVortex have changed the code for the game in such a way that it's now impossible to retrieve 'encounter' information

In more detail:
The Phaser object (in essence; the game engine they're using) has been wrapped in a Proxy that traps every 'get' call based on the type of variable that you try to retrieve:

  • object: return a new Proxy around the object, with the same get trap
  • string: return empty ("")
  • number: return 0
  • boolean: return false
  • function: return empty ( ()=> {})

So to retrieve the current encounter, we were using Phaser.Display.Canvas.CanvasPool.pool[2].parent.scene.encounterProfile.encounter to get the data, which now tells us nothing whatsoever

@Tishj
Copy link
Owner

Tishj commented Dec 13, 2021

TL;DR

The 'catch' functionality is dead :(

@iambibhas
Copy link

not the ideal solution, but one way to get out of this broken feature could be to hit the catch button on every encounter and then scrape the details. i know it breaks the smoothness of the whole functionality. But it's better than it not working at all. Apart from that, and running OCR on the map every second, can't think of anything else.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants