clips / clips/pattern

Basic Sort Returns HTTP Error

Open
#88 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
8.9k
Forks
1.6k
PR merge metrics
No merged PRs in 30d

Description

Anytime I try to run the "sort" function I get the follow error:

File "/usr/local/lib/python2.7/dist-packages/pattern/web/init.py", line 391, in open
if e.code == 403: raise HTTP403Forbidden(src=e, url=url)
pattern.web.HTTP403Forbidden

It's strange because my code used to run fine. Here's all I'm doing:
from pattern.web import sort
import json

search_terms = "chuck norris, mickey mouse"
context = "evil"

results = sort(
    terms = search_terms.split(","), 
    context = context,
    prefix = True)
print json.dumps(results)

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with pattern/web/init.py, especially the sort entry point and the open function at the traceback location. Reproduce the example with the shown search terms and context, then determine whether the HTTP 403 comes from the current remote service; done means sort handles the reported request successfully or documents the unsupported service behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
web-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.