-
-
Notifications
You must be signed in to change notification settings - Fork 55
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
gidgethub.InvalidField: Validation Failed for 'q' #167
Comments
You probably need to quote the URLs. See https://docs.python.org/3/library/urllib.parse.html#urllib.parse.quote for one possible solution. Also notice that your second example has double colons, |
The issue is likely permissions. I'm getting the same behaviour on this endpoint if I add I tried the same call via curl and got the following response: {
"message": "Validation Failed",
"errors": [
{
"message": "The listed users and repositories cannot be searched either because the resources do not exist or you do not have permission to view them.",
"resource": "Search",
"field": "q",
"code": "invalid"
}
],
"documentation_url": "https://docs.github.com/v3/search/"
} Two thoughts on this:
Turns out I can just catch the exception and the detail is in the If I figure out the proper perms I'll report back. Reporting back: This error is returned if your search query limits you to a set of private repositories (and no public ones). i.e. if you searched an org that had only private repos and no public ones, you get this permission error. The search docs say that you need |
I encountered the same error, when using the GH Search API for a user that doesn't exist. This query works ok:
This query returns 422:
I received the same error as @manterfield has shared above:
It seems like the So in this case it simply says that I wonder if we should change the behavior here to use the |
Any idea on how that would look with multiple errors? |
Try to use /search/issues. my query works good on guthub page. But I get problem in getitem
Get error -
gidgethub.InvalidField: Validation Failed for 'q'
But
await gh.getitem(f"/search/issues?q=is:merged+type:pr")
worksAlso my repo contains dots. And
await gh.getitem(f"/search/issues?q=repo:{name_with_dots}")
does not work.My last params is date:
merged:>YYYY-MM-DD
- it does not work too in gh.getitemIt looks so strange. Could you please help me with this problem?
The text was updated successfully, but these errors were encountered: