Huji created this task.
Huji added a project: Pywikibot.
Restricted Application added subscribers: pywikibot-bugs-list, Aklapper.

TASK DESCRIPTION
  **List of steps to reproduce** (step by step, including full links if 
applicable):
  
  - Try uploading a file using #pywikibot 
<https://phabricator.wikimedia.org/tag/pywikibot/>
  
  **What happens?**:
  You will get this error message:
  
    ...
      File 
"/mnt/nfs/labstore-secondary-tools-project/huji/core/pywikibot/site/_decorators.py",
 line 92, in callee
        return fn(self, *args, **kwargs)
      File 
"/mnt/nfs/labstore-secondary-tools-project/huji/core/pywikibot/site/_apisite.py",
 line 2708, in upload
        return Uploader(self, filepage, **kwargs).upload()
      File 
"/mnt/nfs/labstore-secondary-tools-project/huji/core/pywikibot/site/_upload.py",
 line 136, in upload
        return self._upload(self.ignore_warnings, self.report_success)
      File 
"/mnt/nfs/labstore-secondary-tools-project/huji/core/pywikibot/site/_upload.py",
 line 440, in _upload
        return self.submit(final_request, result, data['result'],
    UnboundLocalError: local variable 'data' referenced before assignment
  
  The local variable `data` is first created further above in code, but inside 
a try..catch and that may be part of the issue here.
  
  **What should have happened instead?**:
  Upload should work or a proper exception returned.
  
  **Software version (if not a Wikimedia wiki), browser information, 
screenshots, other information, etc.**: caused by code refactoring in 
rPWBC209c69b013f6a3c38d6946006e711ffc47d43e26 
<https://phabricator.wikimedia.org/rPWBC209c69b013f6a3c38d6946006e711ffc47d43e26>

TASK DETAIL
  https://phabricator.wikimedia.org/T310619

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Huji
Cc: Xqt, Aklapper, Huji, pywikibot-bugs-list, Jyoo1011, JohnsonLee01, SHEKH, 
Dijkstra, Khutuck, Zkhalido, Viztor, Wenyi, Tbscho, MayS, Mdupont, JJMC89, 
Dvorapa, Altostratus, Avicennasis, mys_721tx, jayvdb, Masti, Alchimista
_______________________________________________
pywikibot-bugs mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to