Page MenuHomePhabricator

"Video2commons is getting an error: An exception occurred: FileNotFoundError: b'[Errno 2] No such file or directory'"
Closed, ResolvedPublicBUG REPORT


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

  • Using google chrome browser Version 95.0.4638.54 go to [[ URL | ]]
  • Upload the needed video normally on that website
  • after waiting for the whole process, from rendering, into converting, then adding to commons,

What happens?:
at the last step the error is produced: An exception occurred: FileNotFoundError: b'[Errno 2] No such file or directory

image.png (246×1 px, 37 KB)

What should have happened instead?:

  • Your task is done. You may find your upload at xx

image.png (43×813 px, 5 KB)

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

Event Timeline

Captura de tela de 2021-11-16 22-02-36.png (709×1 px, 154 KB)

Same problem here for a couple of weeks.

I can confirm the issue.

[2021-11-17 13:47:56,895: ERROR/ForkPoolWorker-14] Task video2commons.backend.worker.main[ea3650a1-4dcd-4341-95a3-7afa84e43b94] raised unexpected: FileNotFoundError(2, 'No such file or directory')
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/dist-packages/celery/app/", line 450, in trace_task
    R = retval = fun(*args, **kwargs)
  File "/usr/local/lib/python3.7/dist-packages/celery/app/", line 731, in __protected_call__
    return*args, **kwargs)
  File "/srv/v2c/video2commons/backend/", line 132, in main
    pywikibot.Site('commons', 'commons', user=username).login()
  File "/usr/local/lib/python3.7/dist-packages/pywikibot/site/", line 358, in login
    if self.userinfo['name'] == self.user():
  File "/usr/local/lib/python3.7/dist-packages/pywikibot/site/", line 465, in userinfo
    uidata = uirequest.submit()
  File "/usr/local/lib/python3.7/dist-packages/pywikibot/data/", line 1739, in submit
  File "/usr/local/lib/python3.7/dist-packages/pywikibot/data/", line 1245, in _add_defaults
    and >= '1.25wmf5'):
  File "/usr/local/lib/python3.7/dist-packages/pywikibot/site/", line 953, in mw_version
    mw_ver = MediaWikiVersion(self.version())
  File "/usr/local/lib/python3.7/dist-packages/pywikibot/site/", line 929, in version
    version = self.siteinfo.get('generator', expiry=1).split(' ')[1]
  File "/usr/local/lib/python3.7/dist-packages/pywikibot/site/", line 296, in get
    preloaded = self._get_general(key, expiry)
  File "/usr/local/lib/python3.7/dist-packages/pywikibot/site/", line 237, in _get_general
    default_info = self._get_siteinfo(props, expiry)
  File "/usr/local/lib/python3.7/dist-packages/pywikibot/site/", line 162, in _get_siteinfo
    data = request.submit()
  File "/usr/local/lib/python3.7/dist-packages/pywikibot/data/", line 2022, in submit
  File "/usr/local/lib/python3.7/dist-packages/pywikibot/data/", line 2014, in _write_cache
    with open(self._cachefile_path(), 'wb') as f:
FileNotFoundError: [Errno 2] No such file or directory: '/srv/v2c/apicache-py3/644d1c68a83935b749c8608f05fd23e5e5c1e18f5dce61a6c873727d7791a896'

Not sure how to debug this, is this perhaps a known issue with pywikibot?

I think it's trying to create the file but the directory doesn't exist.

Mentioned in SAL (#wikimedia-cloud) [2021-11-17T19:56:40Z] <chicocvenancio> manually create /srv/v2c/apicache-py3 to solve T295115