Hi all,
While following the Wikimedia "Pywikipedia bot on non-Wikimedia projects" instructions, I received the following error. Guessing that PYTHONPATH was required, I supplied it in .bashrc and the current terminal (so I don't have to run .bashrc before using pywikipedia). But the error still occurs and I'm out of my one idea (and Google's zero) about the cause.
$ echo $PYTHONPATH /home/coder/pywikipedia $ python /home/coder/pywikipedia/generate_user_files.py 1: Create user_config.py file 2: Create user_fixes.py file 3: The two files What do you do? 3 Traceback (most recent call last): File "/home/coder/pywikipedia/generate_user_files.py", line 125, in <module> create_user_config() File "/home/coder/pywikipedia/generate_user_files.py", line 47, in create_user_config know_families = re.findall(r'(.+)_family.py\b', '\n'.join(os.listdir(os.path.join(base_dir, "families")))) OSError: [Errno 2] No such file or directory: 'families'
Any guidance would be greatly appreciated, Chris
Hello Chris,
On Sat, July 4, 2009 8:38 pm, Chris wrote:
Hi all,
$ python /home/coder/pywikipedia/generate_user_files.py
(...)
OSError: [Errno 2] No such file or directory: 'families'
You should be in the pywikipedia directory before using the framework (i.e. cd /home/coder/pywikipedia ). This will be fixed in the rewrite, but the trunk has this problem. Either work in the pywikipedia directory or switch to the rewrite branch :)
--Merlijn
Oh, ok. That wasn't too painful. :)
Thanks, Chris
On Sun, Jul 5, 2009 at 7:05 AM, Merlijn van Deen valhallasw@arctus.nlwrote:
Hello Chris,
On Sat, July 4, 2009 8:38 pm, Chris wrote:
Hi all,
$ python /home/coder/pywikipedia/generate_user_files.py
(...)
OSError: [Errno 2] No such file or directory: 'families'
You should be in the pywikipedia directory before using the framework (i.e. cd /home/coder/pywikipedia ). This will be fixed in the rewrite, but the trunk has this problem. Either work in the pywikipedia directory or switch to the rewrite branch :)
--Merlijn
Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l