After an upload a ValueError was caused by FileInfo. This error is happening by the result sent after the file is uploaded. It should contain an imageinfo part similar to [[https://commons.wikimedia.org/w/api.php?action=query&titles=File:Albert Einstein Head.jpg&prop=imageinfo&continue=|action=query&titles=File:Albert Einstein Head.jpg&prop=imageinfo]] which is a list of dicts. `FilePage._load_file_revisions` iterates over that list and creates a `FileInfo` object for each instance by using the returned dict directly. And it seemed that it didn't returned a dict but an iterable containing an iterable with the length 1, something like this:
```
>>> {}.update([[1]])
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ValueError: dictionary update sequence element #0 has length 1; 2 is required
```
Original traceback from the tweet:
```
Sleeping for 8.2 seconds, 2615-65-25 16:52:57
WARNING: API warning (upload): The watch parameter has been deprecated.
Upload successful.
Traceback (most recent call last):
File “siteuploadfruit.py", line 43, in <module>
main()
File "siteuploadfruit.py", line 40, in main
chunk_size = 1048576)
File "/home/parker/core/pywikibot/tools/__init__.py", line 1094, in wrapper
return obj(‘__args. “__kw)
File ”/home/parker/core/pywikibot/site.py", line 5889, in upload
filepage._load_file_revisions(result[“inageinfo“])
File "/home/parker/core/pywikibot/page.py", line 2665, in _load_file_revisions
file_revision = FileInfo(file_rev)
File "[home/parker/core/pywikibot/page.py“, line 4429. in __init__
self.__dict__.update(file_revision)
ValueError: dictionary update sequence element #0 has length 1; 2 is required
<class 'ValueError'>
CRITICAL: Waiting for 1 network thread(s) to finish. Press ctrl-c to abort
```
Original: https://twitter.com/xor/status/602989248560504832
Follow up: https://twitter.com/xor/status/603703352711630849