Page MenuHomePhabricator
Feed Search

Apr 11 2021

Momor72 added a comment to T278863: Synchronising Wikidata and Wikipedias using pywikibot - Task 2.

image.png (152×785 px, 19 KB)

Can anyone point me to where I can find documentation for the reload function in line 15 of example.py? It seems to be causing the above error when I execute my code. My terminal defaults to UTF-8, so I could for the sake of the project just comment out the code I'm sure just to take a look at things. However, I've been through documentation for the imported modules and can't find anything, nor could I find the code defined in the script itself. Thanks

You actually don't need to do any of this if you're using Python 3. The example code is written in Python 2, where UTF-8 wasn't the standard, it is the standard in Python 3. Reload is not even a function in Python 3 either because it's unnecessary for most cases.

Sources:
https://stackoverflow.com/questions/961162/reloading-module-giving-nameerror-name-reload-is-not-defined
https://stackoverflow.com/questions/14083111/should-i-use-encoding-declaration-in-python-3

Apr 11 2021, 8:54 PM · Outreachy (Round 22)
Momor72 added a comment to T278863: Synchronising Wikidata and Wikipedias using pywikibot - Task 2.

Can anyone point me to where I can find documentation for the reload function in line 15 of example.py? It seems to be causing the above error when I execute my code. My terminal defaults to UTF-8, so I could for the sake of the project just comment out the code I'm sure just to take a look at things. However, I've been through documentation for the imported modules and can't find anything, nor could I find the code defined in the script itself. Thanks

Apr 11 2021, 8:24 PM · Outreachy (Round 22)

Apr 7 2021

Momor72 added a comment to T278860: Synchronising Wikidata and Wikipedias using pywikibot - Task 1.

I'm having some trouble finding the sandbox so that we can get comfortable with pywikibot. Can someone please direct me to where on Phabricator that info is located? Thanks so much.

Apr 7 2021, 4:26 PM · Outreachy (Round 22)