Giter Club home page Giter Club logo

Comments (28)

infamousmax avatar infamousmax commented on August 18, 2024

After making an edit to the main.js for python i get this.

Starting Python process...
Got open port: 8005
Bot path: C:\PokemonGo-Bot-Desktop\gofbot
python ./pokecli.py
Bot path: C:\PokemonGo-Bot-Desktop\gofbot\web
python serveit.py 8005
Python: Traceback (most recent call last):
File "C:\Python27\lib\site-packages\eventlet__init__.py", line 5, in
from eventlet import greenthread
File "C:\Python27\lib\site-packages\eventlet\greenthread.py", line 4, in
from eventlet import event
File "C:\Python27\lib\site-packages\eventlet\event.py", line 3, in
from eventlet import hubs
File "C:\Python27\lib\site-packages\eventlet\hubs__init__.py", line 3, in
from eventlet import patcher
File "C:\Python27\lib\site-packages\eventlet\patcher.py", line 4, in
from eventlet.support import six
File "C:\Python27\lib\site-packages\eventlet\support__init__.py", line 4, in
from eventlet.support import greenlets, six
File "C:\Python27\lib\site-packages\eventlet\support\greenlets.py", line 3, in
import greenlet
ImportError: DLL load failed: The specified procedure could not be found.
Traceback (most recent call last):
File "./pokecli.py", line 40, in
from pokemongo_bot import PokemonGoBot, TreeConfigBuilder
File "C:\PokemonGo-Bot-Desktop\gofbot\pokemongo_bot__init__.py", line 25, in
from pokemongo_bot.socketio_server.runner import SocketIoRunner
File "C:\PokemonGo-Bot-Desktop\gofbot\pokemongo_bot\socketio_server\runner.py", line 5, in
from eventlet import patcher, wsgi
File "C:\Python27\lib\site-packages\eventlet\patcher.py", line 4, in
from eventlet.support import six
File "C:\Python27\lib\site-packages\eventlet\support__init__.py", line 4, in
from eventlet.support import greenlets, six
File "C:\Python27\lib\site-packages\eventlet\support\greenlets.py", line 3, in
import greenlet
ImportError: DLL load failed: The specified procedure could not be found.

from pokemongo-bot-desktop.

Blukzen avatar Blukzen commented on August 18, 2024

Getting exact same error
Starting Python process... Got open port: 8002 Bot path: C:\PokemonGo-Bot-Desktop\gofbot python ./pokecli.py Bot path: C:\PokemonGo-Bot-Desktop\gofbot\web python serveit.py 8002 Python: Traceback (most recent call last): File "./pokecli.py", line 38, in from pgoapi.exceptions import NotLoggedInException ImportError: No module named pgoapi.exceptions

from pokemongo-bot-desktop.

g2384 avatar g2384 commented on August 18, 2024

I had the same issue. Go to the pgoapi github repo and install that module.

This should be added in the installation instruction.

from pokemongo-bot-desktop.

Blukzen avatar Blukzen commented on August 18, 2024

@g2384 now getting this
Starting Python process...
Got open port: 8001
Bot path: C:\Users\brade\PokemonGo-Bot-Desktop\gofbot
python ./pokecli.py
Bot path: C:\Users\brade\PokemonGo-Bot-Desktop\gofbot\web
python serveit.py 8001
Python: Traceback (most recent call last):
File "./pokecli.py", line 38, in
import requests
ImportError: No module named requests

any thoughts?

from pokemongo-bot-desktop.

geeteshk avatar geeteshk commented on August 18, 2024

I have installed pgoapi and I am getting the same error. Did a clean install and everything. Any ideas people? The CLI Bot works fine for me.

from pokemongo-bot-desktop.

g2384 avatar g2384 commented on August 18, 2024

does this line help?
pip install requests

from pokemongo-bot-desktop.

geeteshk avatar geeteshk commented on August 18, 2024

Just tried that. Same error.

Python: Traceback (most recent call last): File "./pokecli.py", line 38, in <module> from pgoapi.exceptions import NotLoggedInException ImportError: No module named pgoapi.exceptions

from pokemongo-bot-desktop.

infamousmax avatar infamousmax commented on August 18, 2024

yeah tried all the above still getting Greenlet error.

from pokemongo-bot-desktop.

g2384 avatar g2384 commented on August 18, 2024

The issues are all because some modules are missing, but I cannot tell where goes wrong. Waiting for some real python people.

from pokemongo-bot-desktop.

Yutsa avatar Yutsa commented on August 18, 2024

I'm on Debian Jessie and I have the same Python: Traceback (most recent call last): File "./pokecli.py", line 38, in <module> from pgoapi.exceptions import NotLoggedInException ImportError: No module named pgoapi.exceptions

Where is the pgoapi repo ? And should I just clone it in the root of the project ?

from pokemongo-bot-desktop.

g2384 avatar g2384 commented on August 18, 2024

@Yutsa https://github.com/tejado/pgoapi. No, install this pgoapi module separately.

from pokemongo-bot-desktop.

Yutsa avatar Yutsa commented on August 18, 2024

I've done

cd gofbot/

git clone https://github.com/tejado/pgoapi.git

cd pgoapi/

python setup.py install

It installs pgoapi but I still get ImportError: No module named pgoapi.exceptions when executing npm start

Note that when I check with pip list it displays pgoapi (1.1.6). Also I'm using a virtualenv if that is relevant.

I looked inside the pgoapi directory and found the module directory with the __init__.py and exceptions.py so I copied this directory to the root of gofbot and now it recognizes pgoapi.excpetions but I get the following error:

Python: Traceback (most recent call last):
  File "./pokecli.py", line 38, in <module>
    from pgoapi.exceptions import NotLoggedInException
  File "/home/edouard/pokemon-go/PokemonGo-Bot-Desktop/gofbot/pgoapi/__init__.py", line 50, in <module>
    from pgoapi.pgoapi import PGoApi
  File "/home/edouard/pokemon-go/PokemonGo-Bot-Desktop/gofbot/pgoapi/pgoapi.py", line 34, in <module>
    from pgoapi.rpc_api import RpcApi
  File "/home/edouard/pokemon-go/PokemonGo-Bot-Desktop/gofbot/pgoapi/rpc_api.py", line 44, in <module>
    from POGOProtos.Networking.Envelopes_pb2 import RequestEnvelope
  File "/home/edouard/pokemon-go/PokemonGo-Bot-Desktop/gofbot/pgoapi/protos/POGOProtos/Networking/Envelopes_pb2.py", line 16, in <module>
    from POGOProtos.Networking import Requests_pb2 as POGOProtos_dot_Networking_dot_Requests__pb2
  File "/home/edouard/pokemon-go/PokemonGo-Bot-Desktop/gofbot/pgoapi/protos/POGOProtos/Networking/Requests_pb2.py", line 23, in <module>
    ENCOUNTER\x10\x91\x01\x12!\n\x1c\x43OLLECT_DAILY_DEFENDER_BONUS\x10\x92\x01\x12\x14\n\x0fUPGRADE_POKEMON\x10\x93\x01\x12\x19\n\x14SET_FAVORITE_POKEMON\x10\x94\x01\x12\x15\n\x10NICKNAME_POKEMON\x10\x95\x01\x12\x10\n\x0b\x45QUIP_BADGE\x10\x96\x01\x12\x19\n\x14SET_CONTACT_SETTINGS\x10\x97\x01\x12\x15\n\x10GET_ASSET_DIGEST\x10\xac\x02\x12\x16\n\x11GET_DOWNLOAD_URLS\x10\xad\x02\x12\x1c\n\x17GET_SUGGESTED_CODENAMES\x10\x91\x03\x12\x1d\n\x18\x43HECK_CODENAME_AVAILABLE\x10\x92\x03\x12\x13\n\x0e\x43LAIM_CODENAME\x10\x93\x03\x12\x0f\n\nSET_AVATAR\x10\x94\x03\x12\x14\n\x0fSET_PLAYER_TEAM\x10\x95\x03\x12\x1b\n\x16MARK_TUTORIAL_COMPLETE\x10\x96\x03\x12\x16\n\x11LOAD_SPAWN_POINTS\x10\xf4\x03\x12\t\n\x04\x45\x43HO\x10\x9a\x05\x12\x1b\n\x16\x44\x45\x42UG_UPDATE_INVENTORY\x10\xbc\x05\x12\x18\n\x13\x44\x45\x42UG_DELETE_PLAYER\x10\xbd\x05\x12\x17\n\x12SFIDA_REGISTRATION\x10\xa0\x06\x12\x15\n\x10SFIDA_ACTION_LOG\x10\xa1\x06\x12\x18\n\x13SFIDA_CERTIFICATION\x10\xa2\x06\x12\x11\n\x0cSFIDA_UPDATE\x10\xa3\x06\x12\x11\n\x0cSFIDA_ACTION\x10\xa4\x06\x12\x11\n\x0cSFIDA_DOWSER\x10\xa5\x06\x12\x12\n\rSFIDA_CAPTURE\x10\xa6\x06\x62\x06proto3')

Python: TypeError: __init__() got an unexpected keyword argument `'syntax'

from pokemongo-bot-desktop.

vardius avatar vardius commented on August 18, 2024

I think this is the problem related to the nodejs.

When i try to import module from command line it works, but script is run true npm and then it can not load modules

from pokemongo-bot-desktop.

Yutsa avatar Yutsa commented on August 18, 2024

@vardius I can confirm that if I open a interactive python shell I can do import pgoapi.exceptions without problems.

from pokemongo-bot-desktop.

vardius avatar vardius commented on August 18, 2024

I have found a solution:

in the main.js file around line 222

you ahve something like this:
if (os.platform() == 'win32') { pythonCmd = path.join(__dirname, 'pywin', 'python.exe'); }
this mean that your python is installed in ur current project under dirrectory: pywin\python.exe
So to make it work, in my case i just commented this if statement due to the fact that in my command line python is available just under command python

In your case probably you will have to update this pythonCmd setup for example
pythonCmd = path.join('C:/', 'Program Files', 'Python', 'python.exe');
if your python is installed under C:/Program Files/Python/python.exe directory

How ever there are more issues, appearing after fixing this one

from pokemongo-bot-desktop.

Yutsa avatar Yutsa commented on August 18, 2024

Well I'm running GNU/Linux Debian Jessie so I'm not on Windows.

Thus the var pythonCmd = 'python' is right I guess

from pokemongo-bot-desktop.

vardius avatar vardius commented on August 18, 2024

Then it should skip this error i suppose, i have no idea why it appears in ur case

from pokemongo-bot-desktop.

Yutsa avatar Yutsa commented on August 18, 2024

Okay I found why ! As I said I was using the bot in a virtualenv. But when using npm start it used the python of my system and not the one of my virtualenv.

That means that it also used the libraries of my system and not of the virtualenv. However I installed the requirements inside the virtualenv so it was not available outside of it.

I installed the requirements outside of my virtualenv and it worked.

I guess I'd need to find a way to execute the virtualenv's python next.

from pokemongo-bot-desktop.

Parth6182 avatar Parth6182 commented on August 18, 2024

Repeat #40

from pokemongo-bot-desktop.

justinbeatz avatar justinbeatz commented on August 18, 2024

For windows, comment this and you will be fine:

if (os.platform() == 'win32') { pythonCmd = path.join(__dirname, 'pywin', 'python.exe'); }

This is because the code try to find if you are on windows use the python from the pywin directory, ignoring if you have python installed yet, with all dependencies (like pgoapi), so the best is to remove that from the code and use the user (base) python. I will make a PR for this.

Edit: here is the PR

from pokemongo-bot-desktop.

Yutsa avatar Yutsa commented on August 18, 2024

If you only did virtualenv . and never source bin/activate then you never entered the virtualenv.

But since you installed pgoapi systemwide now, even if you enter the virtualenv it should work since I suspect the JS script use the system's python and not the vritualenv's one.

from pokemongo-bot-desktop.

hdchuong avatar hdchuong commented on August 18, 2024

@Yutsa I got exactly the same error as yours and kind of stuck right now as I know nothing about JS or node. Can you give me the list of commands should be typed in the terminal window? Much appreciate!

from pokemongo-bot-desktop.

Kujawadl avatar Kujawadl commented on August 18, 2024

I can confirm @Yutsa. I had the same error, it was an issue with my virtualenv setup. For me, my path wasn't set up properly. @hdchuong maybe check which virtualenv to see if you have virtualenv in your path?

from pokemongo-bot-desktop.

Yutsa avatar Yutsa commented on August 18, 2024

@hdchuong Well the thing is that I couldn't launch the bot because it couldn't find some libraries installed in my virtualenv. The only thing I did was to install these libraries system-wide, that is outside the virtualenv, using pip

from pokemongo-bot-desktop.

hdchuong avatar hdchuong commented on August 18, 2024

@Kujawadl I got virtualenv in my path: /usr/local/bin/virtualenv
@Yutsa I tried install it system-wide but still not work. I think we got the same error. Can you show me the specific commands you have been running?

from pokemongo-bot-desktop.

Yutsa avatar Yutsa commented on August 18, 2024

@hdchuong Well I haven't used the bot really but from what I remember I only did a pip install from pgoapi's github repo. It installed the library system-wide and then it worked. Sorry if that doesn't solve your problem but I've stopped using this software.

I hope you'll find a solution

from pokemongo-bot-desktop.

hdchuong avatar hdchuong commented on August 18, 2024

@Yutsa I did pip install -r requirements.txt both from virtualenv and system-wide and still stuck with the Python: TypeError: __init__() got an unexpected keyword argument'syntax'` :(

from pokemongo-bot-desktop.

hdchuong avatar hdchuong commented on August 18, 2024

One more thing. I got this New python executable in /Volumes/Data/Personal/PokemonGo-Bot-Desktop/bin/python2.7 Not overwriting existing python script /Volumes/Data/Personal/PokemonGo-Bot-Desktop/bin/python (you must use /Volumes/Data/Personal/PokemonGo-Bot-Desktop/bin/python2.7) Installing setuptools, pip, wheel...done. when doing virtualenv . Is this normal?

from pokemongo-bot-desktop.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.