In T330606#8648573, @rook wrote:@Klip_game Maybe it is a login issue with PAWS. Could you try running it from the new cluster hub-paws.wmcloud.org (I'm not really expecting much as I tried it from both the new and old, and both seemed to work, so I apologize, but I'm grasping at straws :)
- Queries
- All Stories
- Search
- Advanced Search
- Transactions
- Transaction Logs
Feed Advanced Search
Advanced Search
Advanced Search
Feb 27 2023
Feb 27 2023
Klip_game added a comment to T330606: When I read the page, I get "API error mwoauth-invalid-authorization....".
Klip_game added a comment to T330606: When I read the page, I get "API error mwoauth-invalid-authorization....".
In T330606#8647120, @Aklapper wrote:Isn't this T252306? :)
Klip_game added a comment to T330606: When I read the page, I get "API error mwoauth-invalid-authorization....".
In T330606#8647198, @rook wrote:How are you running the script?
As my Notebook, not running as script. I tried to run from the terminal as a script. Here is the result:
@PAWS:~$ pwb.py test.py WARNING: API error mwoauth-invalid-authorization: The authorization headers in your request are not valid: No approved grant was found for that authorization token. Traceback (most recent call last): File "/srv/paws/pwb/pwb.py", line 39, in <module> sys.exit(main()) File "/srv/paws/pwb/pwb.py", line 35, in main runpy.run_path(str(path), run_name='__main__') File "/usr/lib/python3.10/runpy.py", line 289, in run_path return _run_module_code(code, init_globals, run_name, File "/usr/lib/python3.10/runpy.py", line 96, in _run_module_code _run_code(code, mod_globals, init_globals, File "/usr/lib/python3.10/runpy.py", line 86, in _run_code exec(code, run_globals) File "/srv/paws/pwb/pywikibot/scripts/wrapper.py", line 516, in <module> main() File "/srv/paws/pwb/pywikibot/scripts/wrapper.py", line 500, in main if not execute(): File "/srv/paws/pwb/pywikibot/scripts/wrapper.py", line 487, in execute run_python_file(filename, script_args, module) File "/srv/paws/pwb/pywikibot/scripts/wrapper.py", line 147, in run_python_file exec(compile(source, filename, 'exec', dont_inherit=True), File "test.py", line 4, in <module> print(page.text) File "/srv/paws/pwb/pywikibot/page/_page.py", line 548, in text return self.get(get_redirect=True) File "/srv/paws/pwb/pywikibot/page/_page.py", line 397, in get self._getInternals() File "/srv/paws/pwb/pywikibot/page/_page.py", line 436, in _getInternals self.site.loadrevisions(self, content=True) File "/srv/paws/pwb/pywikibot/site/_generators.py", line 722, in loadrevisions 'rvprop': self._rvprops(content=content), File "/srv/paws/pwb/pywikibot/site/_generators.py", line 636, in _rvprops if self.mw_version >= '1.32': File "/srv/paws/pwb/pywikibot/site/_apisite.py", line 1151, in mw_version mw_ver = MediaWikiVersion(self.version()) File "/srv/paws/pwb/pywikibot/site/_apisite.py", line 1124, in version version = self.siteinfo.get('generator', expiry=1).split(' ')[1] File "/srv/paws/pwb/pywikibot/site/_siteinfo.py", line 304, in get preloaded = self._get_general(key, expiry) File "/srv/paws/pwb/pywikibot/site/_siteinfo.py", line 242, in _get_general default_info = self._get_siteinfo(props, expiry) File "/srv/paws/pwb/pywikibot/site/_siteinfo.py", line 167, in _get_siteinfo data = request.submit() File "/srv/paws/pwb/pywikibot/data/api/_requests.py", line 1264, in submit self._data = super().submit() File "/srv/paws/pwb/pywikibot/data/api/_requests.py", line 1061, in submit raise NoUsernameError('Failed OAuth authentication for {}: {}' pywikibot.exceptions.NoUsernameError: Failed OAuth authentication for wikipedia:uk: The authorization headers in your request are not valid: No approved grant was found for that authorization token. CRITICAL: Exiting due to uncaught exception <class 'pywikibot.exceptions.NoUsernameError'> @PAWS:~$
Feb 26 2023
Feb 26 2023
Feb 25 2023
Feb 25 2023
On meta.wikimedia.org I got the answer:
"The rights in the OAuth grant are system wide and can only be changed by an administrator of PAWS requesting a new grant and changing the configuration of the app for everyone."
Thanks for the advice. I posted a question on meta.wikimedia.org
There is no item "Delete pages, revisions, and log entries" in the list of giants. This item never came up for me. When I signed up, I wasn't an admin yet. After receiving the admin flag, I did not have any new items in the list of giants. I suspect that the list of giants is taken from the Russian wiki, not the Ukrainian wiki. I do not know what to do to change the list of giants.
As far as I understand, user-config.py is not used for notebook.
My user-config.py :
Feb 24 2023
Feb 24 2023
Feb 11 2023
Feb 11 2023
Everything started working today.
Feb 10 2023
Feb 10 2023
I tried to connect from different computers and got the error again
Content licensed under Creative Commons Attribution-ShareAlike (CC BY-SA) 4.0 unless otherwise noted; code licensed under GNU General Public License (GPL) 2.0 or later and other open source licenses. By using this site, you agree to the Terms of Use, Privacy Policy, and Code of Conduct. · Wikimedia Foundation · Privacy Policy · Code of Conduct · Terms of Use · Disclaimer · CC-BY-SA · GPL · Credits