Page MenuHomePhabricator

'NoneType' object has no attribute '__getitem__'
Closed, ResolvedPublic


While running on non-WMF wiki I got this error.

Pywikibot: [https] r-pywikibot-core.git (a3bb536, g6745, 2015/10/25, 23:17:55, ok)
Release version: 2.0b3
requests version: 2.7.0
  cacerts: C:\Python27\lib\site-packages\requests\cacert.pem
    certificate test: ok
Python: 2.7.8 (default, Jun 30 2014, 16:03:49) [MSC v.1500 32 bit (Intel)])
File "", line 248, in <module>
  if not main():
File "", line 242, in main
  run_python_file(filename, [filename] + args, argvu, file_package)
File "", line 120, in run_python_file
File ".\scripts\", line 1101, in <module>
File ".\scripts\", line 1092, in main
File ".\scripts\", line 752, in run
  page.put(new_text, self.generate_summary(applied), callback=self.count_changes)
File "C:\Users\Jony\Dropbox\ws\BOT\core\pywikibot\tools\", line 1327, in wrapper
  return obj(*__args, **__kw)
File "C:\Users\Jony\Dropbox\ws\BOT\core\pywikibot\", line 1188, in put
File "C:\Users\Jony\Dropbox\ws\BOT\core\pywikibot\tools\", line 1327, in wrapper
  return obj(*__args, **__kw)
File "C:\Users\Jony\Dropbox\ws\BOT\core\pywikibot\", line 1107, in save
  cc=apply_cosmetic_changes, **kwargs)
File "C:\Users\Jony\Dropbox\ws\BOT\core\pywikibot\", line 1115, in _save
  summary = self._cosmetic_changes_hook(summary) or summary
File "C:\Users\Jony\Dropbox\ws\BOT\core\pywikibot\", line 1164, in _cosmetic_changes_hook
  self.text = ccToolkit.change(old)
File "C:\Users\Jony\Dropbox\ws\BOT\core\pywikibot\", line 269, in change
  new_text = self._change(text)
File "C:\Users\Jony\Dropbox\ws\BOT\core\pywikibot\", line 263, in _change
  text = self.safe_execute(method, text)
File "C:\Users\Jony\Dropbox\ws\BOT\core\pywikibot\", line 250, in safe_execute
  result = method(text)
File "C:\Users\Jony\Dropbox\ws\BOT\core\pywikibot\", line 715, in fixSyntaxSave
  if http_url[4:] == https_url[5:]:
TypeError: 'NoneType' object has no attribute '__getitem__'
<type 'exceptions.TypeError'>
CRITICAL: Closing network session.


Related Gerrit Patches:

Event Timeline

Wesalius created this task.Oct 26 2015, 2:14 PM
Wesalius raised the priority of this task from to Needs Triage.
Wesalius updated the task description. (Show Details)
Wesalius added a project:
Wesalius added a subscriber: Wesalius.
Restricted Application added subscribers: pywikibot-bugs-list, Aklapper. · View Herald TranscriptOct 26 2015, 2:14 PM
XZise claimed this task.Oct 26 2015, 2:21 PM
XZise added a subscriber: XZise.

Oops sorry, I introduced it in 4e393d63.

Change 248875 had a related patch set uploaded (by XZise):
[FIX] cosmetic_changes: Allow missing HTTPS hostname

Change 248875 merged by jenkins-bot:
[FIX] cosmetic_changes: Allow missing HTTPS hostname

Restricted Application added a subscriber: TerraCodes. · View Herald TranscriptNov 23 2016, 4:38 PM

Isn't this solved already?

Wesalius closed this task as Resolved.Jun 23 2018, 11:56 AM

Probably is, I did not run into the error again since posting.