ソースを参照

Merge pull request #1084 from moon2l/master

fix bug: TypeError: set(['bing', 'google']) is not JSON serializable,…
Adam Tauber 7 年 前
コミット
5ceaf21399
コミット者のEメールアドレスに関連付けられたアカウントが存在しません
共有1 個のファイルを変更した2 個の追加1 個の削除を含む
  1. 2
    1
      searx/webapp.py

+ 2
- 1
searx/webapp.py ファイルの表示

541
                                     'corrections': list(result_container.corrections),
541
                                     'corrections': list(result_container.corrections),
542
                                     'infoboxes': result_container.infoboxes,
542
                                     'infoboxes': result_container.infoboxes,
543
                                     'suggestions': list(result_container.suggestions),
543
                                     'suggestions': list(result_container.suggestions),
544
-                                    'unresponsive_engines': list(result_container.unresponsive_engines)}),
544
+                                    'unresponsive_engines': list(result_container.unresponsive_engines)},
545
+                                   default=lambda item: list(item) if isinstance(item, set) else item),
545
                         mimetype='application/json')
546
                         mimetype='application/json')
546
     elif output_format == 'csv':
547
     elif output_format == 'csv':
547
         csv = UnicodeWriter(StringIO())
548
         csv = UnicodeWriter(StringIO())