SneakerBotTutorials icon indicating copy to clipboard operation
SneakerBotTutorials copied to clipboard

Recent update wont run app.py

Open jeromesteve202 opened this issue 8 years ago • 7 comments

After the most recent update, when i try to run app.py I am getting an error. I have pasted the terminal output in this message.

Traceback (most recent call last):
  File "app.py", line 15, in <module>
    bot = main.bot({})
  File "/Users/stevesahayadarlin/Desktop/YeezyBot/SneakerBotTutorials-master/main.py", line 43, in __init__
    self.driver = webdriver.PhantomJS(service_args=['--proxy={}'.format(proxy), '--proxy-type=http'])
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/selenium/webdriver/phantomjs/webdriver.py", line 52, in __init__
    self.service.start()
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/selenium/webdriver/common/service.py", line 71, in start
    os.path.basename(self.path), self.start_error_message)
selenium.common.exceptions.WebDriverException: Message: 'phantomjs' executable needs to be in PATH. 

Exception AttributeError: "'Service' object has no attribute 'process'" in <bound method Service.__del__ of <selenium.webdriver.phantomjs.service.Service object at 0x10364b6d0>> ignored

jeromesteve202 avatar Nov 27 '17 20:11 jeromesteve202

Yeah I'm getting that aswell

Grumpyfish44 avatar Nov 29 '17 10:11 Grumpyfish44

You need to find your phantomjs executable (wherever it installed to, or go downloaded selenium again) and either copy the executable into the directory you're working out of, or you can pass the path to the executable by passing it to the class on initialization like so: driver = webdriver.PhantomJS(executable_path="your path here");

You can also add the path to your PATH environment variable, but I wouldn't recommend it.

jace1717 avatar Nov 29 '17 16:11 jace1717

I tried all of the solutions you mentioned. I'm still getting the same error.

jeromesteve202 avatar Nov 29 '17 18:11 jeromesteve202

Was anyone able to resolve?

Vanchat avatar Nov 30 '17 05:11 Vanchat

Yes, I was able to get past that error. If you pull or download the most updated project, there were some changes made in the main.py and I am able to run app.py

jeromesteve202 avatar Dec 01 '17 02:12 jeromesteve202

File "app.py", line 121 print exp ^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(exp)?

tdarlak-mwb avatar Jun 29 '20 07:06 tdarlak-mwb

I think this is a python 2.x project

dragonfiber avatar Aug 17 '22 17:08 dragonfiber