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

501 Server Error #215

Closed
lushl9301 opened this issue Jun 2, 2015 · 13 comments
Closed

501 Server Error #215

lushl9301 opened this issue Jun 2, 2015 · 13 comments

Comments

@lushl9301
Copy link
Contributor

I know this might be duplicated.
But I didn't get clear solution from previous issues.


I just create a new project.
copy the code from http://demo.pyspider.org/debug/js_test_sciencedirect
I press run, select follows and then press the "play" button for crawling a detail_page
It gives:

[E 150602 15:32:42 base_handler:193] 501 Server Error
    Traceback (most recent call last):
      File "/usr/local/lib/python2.7/dist-packages/pyspider/processor/../libs/base_handler.py", line 186, in run_task
        result = self._run_task(task, response)
      File "/usr/local/lib/python2.7/dist-packages/pyspider/processor/../libs/base_handler.py", line 165, in _run_task
        response.raise_for_status()
      File "/usr/local/lib/python2.7/dist-packages/pyspider/libs/response.py", line 183, in raise_for_status
        raise http_error
    HTTPError: 501 Server Error

In addition, when I label the project as RUNNING and press run, 501 errors occur.

[W 150602 15:41:32 tornado_fetcher:352] [501] ggg:4fd00996c387078f77152ad9011418c7 http://www.sciencedirect.com/science/article/pii/S0167739X12000581 0s
[E 150602 15:41:32 processor:204] process ggg:4fd00996c387078f77152ad9011418c7 http://www.sciencedirect.com/science/article/pii/S0167739X12000581 -> [501] len:25 -> result:None fol:0 msg:0 err:HTTPError('501 Server Error',)

fetch results:

track.fetch  0.0ms
{
  "content": "phantomjs is not enabled.", 
  "encoding": "unicode", 
  "error": null, 
  "headers": {}, 
  "ok": false, 
  "redirect_url": null, 
  "status_code": 501, 
  "time": 0
}

but I compiled and installed phantomjs already. I'm using version 2.0.0.

Could you please give some advice?

Best Regards

@binux
Copy link
Owner

binux commented Jun 2, 2015

run pyspider phantomjs and paste output here.

@lushl9301
Copy link
Contributor Author

No output actually...

@binux
Copy link
Owner

binux commented Jun 2, 2015

Is the phantomjs command exists in current $PATH ?

@lushl9301
Copy link
Contributor Author

I added it just now.

run pyspider phantomjs
->
Web server running on port 25555

It should be ok now. Thanks a lot!!!

@lushl9301
Copy link
Contributor Author

Thanks a lot! It works

I really should figured out by myself.

😄 thanks a lot!

@binux
Copy link
Owner

binux commented Jun 2, 2015

I will add some messages to warn user the missing of the phantomjs command.

@lushl9301
Copy link
Contributor Author

Hahaha. We were thinking the same thing!
I just modified the quick start guide..

Maybe you want to have a look :D

@lushl9301
Copy link
Contributor Author

#216 this pull request

@potatoker
Copy link

I still have the problem with:
pyspider phatomjs run ,out put is Web server running on port 25555
and already added phantomjs to $PATH, run phantomjs in command line ,>> will appear.

@binux
Copy link
Owner

binux commented Nov 7, 2015

@potatoker while running with pyspider or pyspider all mode, is the log "Web server running on port 25555" also appear on screen?

@potatoker
Copy link

I've fixed this my get the latest version in github. (the previois one is
installed by pip).
thank you for your reply. Your work is really fancy.

On Sat, Nov 7, 2015 at 10:37 PM, Roy Binux notifications@github.com wrote:

@potatoker https://github.com/potatoker while running with pyspider or pyspider
all mode, is the log "Web server running on port 25555" also appear on
screen?


Reply to this email directly or view it on GitHub
#215 (comment).

@super1-chen
Copy link

i add "phantomjs-proxy": "localhost:25555" in config file it is working well

@rockgarden
Copy link

Where to add "phantomjs-proxy": "localhost:25555" in config file?

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

5 participants