https://bugzilla.wikimedia.org/show_bug.cgi?id=72290

            Bug ID: 72290
           Summary: tilde in argument to -dir causes exception
           Product: Pywikibot
           Version: core (2.0)
          Hardware: All
                OS: All
            Status: NEW
          Severity: trivial
          Priority: Unprioritized
         Component: General
          Assignee: [email protected]
          Reporter: [email protected]
       Web browser: ---
   Mobile Platform: ---

If the directory ~/.pywikibot2 doesnt exist

/path/to/current/dir/ $ python pwb.py -dir:~/.pywikibot2 version
NOTE: ~/.pywikibot2/user-config.py was not found
Please follow the prompts to create it:
Traceback (most recent call last):
  File "pwb.py", line 149, in <module>
    run_python_file(path, [path], [path.decode('ascii')])
  File "pwb.py", line 69, in run_python_file
    exec(compile(source, filename, "exec"), main_mod.__dict__)
  File "generate_user_files.py", line 19, in <module>
    import pywikibot
  File "pywikibot/__init__.py", line 29, in <module>
    from pywikibot import config2 as config
  File "pywikibot/config2.py", line 209, in <module>
    _base_dir = get_base_dir()
  File "pywikibot/config2.py", line 195, in get_base_dir
    raise RuntimeError("Directory '%s' does not exist." % base_dir)
RuntimeError: Directory '/path/to/current/dir/~/.pywikibot2' does not exist.

(that path.decode('ascii') looks defective too)

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to