Page MenuHomePhabricator

Login fails if current user does not have permission to create apicache-py3
Closed, ResolvedPublicBUG REPORT

Description

List of steps to reproduce (step by step, including full links if applicable):

  • Change into a directory the current user does not have permission to create directories
  • Run Site().login()

What happens?:
FileNotFoundError: b'[Errno 2] No such file or directory'" eg T295115

This seems to be due to the generic exception handling of OSError in https://gerrit.wikimedia.org/r/plugins/gitiles/pywikibot/core/+/5878687e53b9ba27ade510a2187ec2a68d4c3207/pywikibot/data/api.py#1941

What should have happened instead?:

Software version (if not a Wikimedia wiki), browser information, screenshots, other information, etc:

Event Timeline

I think you have to set a PYWIKIBOT_DIR environment variable then.

Xqt triaged this task as Medium priority.

Change 740297 had a related patch set uploaded (by Xqt; author: Xqt):

[pywikibot/core@master] [bugfix] Only ignore FileExistsError when creating the api cache

https://gerrit.wikimedia.org/r/740297

Change 740297 merged by jenkins-bot:

[pywikibot/core@master] [bugfix] Only ignore FileExistsError when creating the api cache

https://gerrit.wikimedia.org/r/740297