Thank you for that. That got me a step farther. I was able to auto-generate
the user-config.py file.
When I try to login, I get a 404 error. (python pwb.py login)
I'll post the log message (I used debug) in a second, but here's the url
that pywikibot is using:
<https://wiki.vvfh.org/api.php?maxlag=5&meta=siteinfo|userinfo&uiprop=blockinfo|hasmsg&continue=&format=json&action=query&siprop=namespaces|namespacealiases|general>
If you load that in your browser, you'll see that it displays json data, so
I don't understand why I'm getting the 404 message.
Here's the log entry:
2017-11-15 10:35:23 bot.py, 977 in handle_args: DEBUG
handle_args() completed.
2017-11-15 10:35:23 __init__.py, 1252 in Site: DEBUG
Instantiated APISite object 'vvfh:en'
2017-11-15 10:35:23 site.py, 1614 in _get_general: DEBUG
general siteinfo not loaded yet.
2017-11-15 10:35:23 site.py, 1625 in _get_general: DEBUG
Load siteinfo properties 'namespaces', 'namespacealiases' along with
'general'
2017-11-15 10:35:23 throttle.py, 83 in checkMultiplicity: DEBUG
Checking multiplicity: pid = False
2017-11-15 10:35:23 throttle.py, 140 in checkMultiplicity: VERBOSE
Found 1 vvfh:en processes running, including this one.
2017-11-15 10:35:23 api.py, 1948 in submit: DEBUG
API request to vvfh:en (uses get: False):
Headers: {'Content-Type': 'application/x-www-form-urlencoded'}
URI: '/api.php'
Body:
'maxlag=5&meta=siteinfo%7Cuserinfo&uiprop=blockinfo%7Chasmsg&continue=&format=json&action=query&siprop=namespaces%7Cnamespacealiases%7Cgeneral'
2017-11-15 10:35:23
/usr/local/lib/python3.5/site-packages/urllib3/connectionpool.py, 858 in
connectionpool: WARNING
/usr/local/lib/python3.5/site-packages/urllib3/connectionpool.py:858:
InsecureRequestWarning: Unverified HTTPS request is being made. Adding
certificate verification is strongly advised. See:
https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
2017-11-15 10:35:23 http.py, 409 in error_handling_callback:
WARNING Http response status 404
2017-11-15 10:35:23 threadedhttp.py, 139 in encoding: VERBOSE
Http response doesn't contain a charset.
2017-11-15 10:35:23 api.py, 1981 in submit: DEBUG
API response received from vvfh:en:
<!doctype html>
<!--[if lt IE 7]> <html lang="en-us" class="no-js ie6">
<![endif]-->
<!--[if IE 7]> <html lang="en-us" class="no-js ie7">
<![endif]-->
<!--[if IE 8]> <html lang="en-us" class="no-js ie8">
<![endif]-->
<!--[if IE 9]> <html lang="en-us" class="no-js ie9">
<![endif]-->
<!--[if gt IE 9]><!--> <html lang="en-us"
class="no-js"> <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible"
content="IE=Edge;chrome=1" />
<meta name="viewport" content="width=device-width,
initial-scale=1.0">
<meta name="copyright" content="Copyright 2012 Ubiquiti
Networks, Inc. All rights reserved.">
<title>EdgeOS - 404 Error</title>
<link rel="shortcut icon"
href="/media/global/favicon.png"
/>
<link rel="stylesheet"
href="/lib/1434480045/stylesheets/css/reset.min.css" type="text/css"
media="screen" />
<link rel="stylesheet"
href="/lib/1434480045/fonts/open-sans/stylesheet.min.css"
type="text/css"
media="screen" />
<link rel="stylesheet"
href="/lib/1434480045/stylesheets/css/core.min.css" type="text/css"
media="screen" />
<link rel="stylesheet"
href="/lib/1434480045/stylesheets/css/edge.min.css" type="text/css"
media="screen" />
<link rel="stylesheet"
href="/lib/1434480045/stylesheets/css/fileuploader.min.css"
type="text/css"
media="screen" />
<script type="text/javascript"
src="/lib/1434480045/js/libs/modernizr.custom.js"></script>
</head>
<body>
<!-- Start: Page Content -->
<div id="PageContent">
<!-- Start: Header -->
<div id="PageHeader"
class="page-header">
<div class="ir
edgeos-header-logo">EdgeOS</div>
</div>
<!-- End: Header -->
<!-- Start: Main Panel -->
<div id="MainPanel" class="main-panel">
<!-- Start: Content -->
<div class="content-outer-container">
<div
class="content-inner-container">
<div class="content">
<div id="Error"
class="main-section">
<h1
class="section-title">Error: Not Found</h1>
<div
class="section-container tall basic">
<div id="StatusCode">
404
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- End: Page Content -->
</body>
</html>
2017-11-15 10:35:23 api.py, 1991 in submit: WARNING
Non-JSON response received from server vvfh:en; the server may be down.
2017-11-15 10:35:23 api.py, 2207 in wait: WARNING
Waiting 5 seconds before retrying.
I don't understand why I'm getting a 404 when the same query, loaded in a
browser, returns the json-formatted data requested.
Do I need to be using a -p and typing in the password?
--On November 15, 2017 at 11:53:55 AM +0330 Dalba <dalba.wiki(a)gmail.com>
wrote:
OK, we probably should add an option to generate_family_file.py for
ignoring SSL errors. But for now try using this pregenerated file:
https://phabricator.wikimedia.org/F10802604
(it should be placed at pywikibot/families directory)
On Wed, Nov 15, 2017 at 10:52 AM, Paul Schmehl <pschmehl(a)tx.rr.com> wrote:
I screwed up. I meant to type family file and typed user-config.py
instead.
I changed the ignore_certificate_error return value to true in
pywikibot/family.py, but it still chokes on ssl verify. That surprised
me. It's like the code is being ignored.
--On November 15, 2017 at 10:19:26 AM +0330 Dalba <dalba.wiki(a)gmail.com>
wrote:
I even added this to user-config.py, but still got the same result.
def ignore_certificate_error(self, code):
return True
I think ignore_certificate_error should be defined inside the family file
and has no effect in user-config.py.
As a workaround you can modify the ignore_certificate_error in
pywikibot/family.py to make it return True. Then generate your family
file using the generator script (hopefully there won't be any error now).
After that you can revert the change in family.py and define
ignore_certificate_error in the newly generated file.
"The man who never looks into a newspaper is better informed than he who
reads them, inasmuch as he who knows nothing is nearer the truth than he
whose mind is filled with falsehoods and errors." - Thomas Jefferson
Paul Schmehl (pschmehl(a)tx.rr.com)
Independent Researcher
_______________________________________________
pywikibot mailing list
pywikibot(a)lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikibot
"The man who never looks into a newspaper is better informed than he who
reads them, inasmuch as he who knows nothing is nearer the truth than he
whose mind is filled with falsehoods and errors." - Thomas Jefferson
Paul Schmehl (pschmehl(a)tx.rr.com)
Independent Researcher