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
Client:ask broken ? #153
Comments
OK, in client.py
should probably be
i.e. closing parenthesis after "offset" not "''GET'" Now it is working with :
but not with
|
OK, all is working now if :
|
Thx for looking into this! Would you mind opening a pull request for the commits? |
Hello
I'd like too ! But I'm a git/github newbie.
What I've done so far :
- I forked the mwclient repository
- git cloned my forked repository , made changes, pushed them
I opened a pull request (PR) but I closed if because :
- the PR contains fixes for issues 149 (fetch login) , 153 and 156
(problems with client.ask())
- the latter are ok , but there are still problems with issue 149,
namely :
-- as I implemented it, the unit test login_flow_2 does not pass. I
think this is because the new raw_api_call() in mwclient.client.login is
not mocked in the unit test
- second : I had a misconfiguration in my php sessions configuration. As
a result the session was destroyed while my script using mwclient was
running. When that happens, any api call gets a "need new token" from
MW. In that case mwclient is calling site.get_token() which calls MW api
with parameters meta=token. In a private wiki , this calls gets a
readapidenied error . Maybe this would happen too with MW instances
Anyway I'll open a PR but with commits for 3 Issues, and the one
concerning issue 149 is not entirely solved : at least the unit test
login_flow_2 should be adapted to pass.
I guess I should open a PR for each different issue but I do not know
how to do it, or what is the best way to deal with it
Cheers
Michel
---
Salutations
Michel Bénard
Le 2017-05-10 14:50, Dan Michael O. Heggø a écrit :
Thx for looking into this! Would you mind opening a pull request for the commits?
--
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub [1], or mute the thread [2].
|
- second : I had a misconfiguration in my php sessions configuration. As
a result the session was destroyed while my script using mwclient was
running. When that happens, any api call gets a "need new token" from
MW. In that case mwclient is calling site.get_token() which calls MW api
with parameters meta=token. In a private wiki , this calls gets a
readapidenied error . Maybe this would happen too with MW instances
<1.27
---
Salutations
Michel Bénard
Le 2017-05-10 15:09, Michel Bénard a écrit :
Hello
I'd like too ! But I'm a git/github newbie.
What I've done so far :
- I forked the mwclient repository
- git cloned my forked repository , made changes, pushed them
I opened a pull request (PR) but I closed if because :
- the PR contains fixes for issues 149 (fetch login) , 153 and 156 (problems with client.ask())
- the latter are ok , but there are still problems with issue 149, namely :
-- as I implemented it, the unit test login_flow_2 does not pass. I think this is because the new raw_api_call() in mwclient.client.login is not mocked in the unit test
- second : I had a misconfiguration in my php sessions configuration. As a result the session was destroyed while my script using mwclient was running. When that happens, any api call gets a "need new token" from MW. In that case mwclient is calling site.get_token() which calls MW api with parameters meta=token. In a private wiki , this calls gets a readapidenied error . Maybe this would happen too with MW instances
Anyway I'll open a PR but with commits for 3 Issues, and the one concerning issue 149 is not entirely solved : at least the unit test login_flow_2 should be adapted to pass.
I guess I should open a PR for each different issue but I do not know how to do it, or what is the best way to deal with it
Cheers
Michel
---
Salutations
Michel Bénard
Le 2017-05-10 14:50, Dan Michael O. Heggø a écrit :
> Thx for looking into this! Would you mind opening a pull request for the commits?
>
> --
> You are receiving this because you authored the thread.
> Reply to this email directly, view it on GitHub [1], or mute the thread [2].
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi all,
as it is , I cannot get Client:ask to work ,
For example, test it on Semantic Mediawiki Sandbox
The trouble is : there is no "query" field in the response returned by site.ask() , the api calls returns an error
But you can see the query results here :
https://sandbox.semantic-mediawiki.org/w/api.php?action=ask&query=[[Has%20email::%2B]]|%3FLabel&format=json
Cheers
PS : what is the use of the Title parameter in Client.ask() ?
MB
The text was updated successfully, but these errors were encountered: