for _filename in os.listdir(os.path.join(_base_dir, 'families')):
OSError: [Errno 2] No such file or directory:
'/home/username/.pywikibot/families'

Looks like you have compat in "/home/username/pywikipedia/compat/" but
_base_dir is '/home/username/.pywikibot'

_base_dir is determined in the following order -
    1.  If the script was called with a -dir: argument, use the directory
        provided in this argument
    2.  If the user has a PYWIKIBOT_DIR environment variable, use the value
        of it
    3.  If the script was started from a directory that contains a
        user-config.py file, use this directory as the base
    4.  If all else fails, use the directory from which this module was
        loaded.
    5.  If the user-config.py file is not found, another will be created
        in the current directory, following in the footsteps of project,
        language and bot username.

To me you must make sure _base_dir will return
"/home/username/pywikipedia/compat/", so it will find subdir families.


On Wed, Sep 11, 2013 at 5:12 PM, Steen Thomassen
<[email protected]>wrote:

>  Den 08-09-2013 07:09, Amir Ladsgroup skrev:
>
>   File "/home/username/pywikipedia/compat/config.py", line 578, in <module>
>
>>      for _filename in os.listdir(os.path.join(_base_dir, 'families')):
>> OSError: [Errno 2] No such file or directory:
>> '/home/username/.pywikibot/families'
>>
>>  It's a bug and needs to be fixed but for a fast solution, copy your
> user-fixes.py and user-config.py to the compat folder I think It will erase
> the error but I need to fix it in long-term
>
> Is workaround don't work. It was not a solution. Same error messsage.
>
> /Steen
>
> _______________________________________________
> Pywikipedia-l mailing list
> [email protected]
> https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
>
>
_______________________________________________
Pywikipedia-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l

Reply via email to