Page MenuHomePhabricator

reflinks.py: unclosed file
Closed, ResolvedPublic

Description

PDF file.
Bad link : http://tenisheva.nethouse.ru/static/doc/0000/0000/0029/29830.rn4za2q6kz.pdf in [[Союз архитекторов Республики Башкортостан]]
WARNING: .\scripts\reflinks.py:601: ResourceWarning: unclosed file <_io.TextIOWrapper name=5 mode='w+' encoding='cp1252'>
  continue

Event Timeline

Restricted Application added subscribers: pywikibot-bugs-list, Aklapper. · View Herald Transcript
Xqt triaged this task as Medium priority.

I even don’t know what this error means :) I have seen but haven’t reported

Change 669743 had a related patch set uploaded (by Xqt; owner: Xqt):
[pywikibot/core@master] [bugfix] reflinks.py: If urlobj.write fails, the file will not be closed

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

I even don’t know what this error means :) I have seen but haven’t reported

The pdf info is tried to be written to a file but this may fail. The file is opened and will never be closed during script runs.

Change 669743 merged by jenkins-bot:
[pywikibot/core@master] [bugfix] reflinks.py: If urlobj.write fails, the file will not be closed

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