Error type: b"'NoneType' object has no attribute '__getitem__'"
Description
Related Objects
Event Timeline
@Sandra_Hanbo: Thanks for reporting this. For future reference, please use the bug report form (linked from the top of the task creation page) to create a bug report, and provide steps to reproduce. Thanks.
If you have time and can still reproduce the situation: Please add a more complete description to this task. That should be
- a clear and complete list of exact steps to reproduce the situation, step by step, so that nobody needs to guess or interpret how you performed each step,
- what happens after performing these steps to reproduce,
- what you expected to happen instead,
- a link to a web address where the issue can be seen. Thanks again!
- Using google chrome browser Version 95.0.4638.54 go to [[ URL | https://video2commons.toolforge.org/ ]]
- Upload the needed video normally on that website
- after waiting for the whole process, from rendering, into converting, then adding to commons, at the last step the error is produced:
"An exception occurred: TypeError: b"'NoneType' object has no attribute 'getitem'""
- The expected result:
Your task is done. You may find your upload at (its location in Wikimedia Commons)
- The frequent of happening, always today
[2021-10-28 14:05:21,534: WARNING/ForkPoolWorker-38] -1: Configuring Pywikibot... [2021-10-28 14:05:21,546: VERBOSE/ForkPoolWorker-38] Found 1 commons:commons processes running, including this one. [2021-10-28 14:05:21,637: WARNING/ForkPoolWorker-38] -1: Uploading... [2021-10-28 14:05:21,734: WARNING/ForkPoolWorker-38] -1: Uploading... [2021-10-28 14:05:21,736: WARNING/ForkPoolWorker-38] -1: Cleaning up... [2021-10-28 14:05:21,738: VERBOSE/ForkPoolWorker-38] Dropped throttle(s). [2021-10-28 14:05:21,801: ERROR/ForkPoolWorker-38] Task video2commons.backend.worker.main[103dff53-8c71-4f82-82c8-f07d9cf6f011] raised unexpected: TypeError("'NoneType' object has no attribute '__getitem__'",) Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/celery/app/trace.py", line 385, in trace_task R = retval = fun(*args, **kwargs) File "/usr/local/lib/python2.7/dist-packages/celery/app/trace.py", line 648, in __protected_call__ return self.run(*args, **kwargs) File "/srv/v2c/video2commons/backend/worker.py", line 138, in main filedesc, username, statuscallback, errorcallback File "/srv/v2c/video2commons/backend/upload/__init__.py", line 48, in upload size, statuscallback, errorcallback File "/srv/v2c/video2commons/backend/upload/__init__.py", line 91, in upload_pwb chunk_size=chunked, async=bool(chunked) # , ignore_warnings=['exists-normalized'] File "/usr/local/lib/python2.7/dist-packages/pywikibot/tools/__init__.py", line 1447, in wrapper return obj(*__args, **__kw) File "/usr/local/lib/python2.7/dist-packages/pywikibot/site.py", line 5979, in upload token = self.tokens['edit'] File "/usr/local/lib/python2.7/dist-packages/pywikibot/site.py", line 1786, in __getitem__ key = self.site.validate_tokens([key])[0] File "/usr/local/lib/python2.7/dist-packages/pywikibot/site.py", line 3299, in validate_tokens 'token')['type'] TypeError: 'NoneType' object has no attribute '__getitem__'
Maybe something changed on the mediawiki api and our outdated pywikibot can't handle it? Logs indicate the error started in the last couple of days. First error entry in 2021-10-26 22:05:27,717
{c0cf17c} was the fix included in pywikibot 6.6.1; however, pywikibot hasn't supported python2 since 3.0.20200703.
Mentioned in SAL (#wikimedia-cloud) [2021-10-28T17:25:28Z] <chicocvenancio> move enconding04 to python3 T294520
Mentioned in SAL (#wikimedia-cloud) [2021-10-28T17:49:50Z] <chicocvenancio> move encoding05 and encoding06 to python3 T294520
@Chicocvenancio New bug had reached as I tried now.
- Using Chrome or Firefox I received this bug:
An exception occurred: AttributeError: b"'bytes' object has no attribute 'encode'"
The steps: the same steps as before but in the error has resulted directly.
@Chicocvenancio
A new error after trying
After waiting to be uploaded I received this bug :
An exception occurred: FileNotFoundError: b'[Errno 2] No such file or directory'
Please file new tickets for new problems, and follow https://www.mediawiki.org/wiki/How_to_report_a_bug - thanks a lot! :)