ITADN

AttributeError: 'int' object has no attribute 'decode'

#404Closedyoursteacup 创建于 2023-06-06
Y
yoursteacupcommented
# I have * [x] Tested with the latest release * [x] Tested with the current master branch * [x] Searched for similar existing issues ## Expected behaviour Solr search should give me some adequate response ## Actual behaviour Traceback (most recent call last): File "/usr/lib/python3.10/runpy.py", line 196, in _run_module_as_main return _run_code(code, main_globals, None, File "/usr/lib/python3.10/runpy.py", line 86, in _run_code exec(code, run_globals) File "/home/<some path>/solr_client/solr_client.py", line 85, in <module> res = solr_archive.search( File "/home/<some path>/.venv/lib/python3.10/site-packages/pysolr.py", line 828, in search decoded = self.decoder.decode(response) AttributeError: 'int' object has no attribute 'decode' ## Steps to reproduce the behaviour 1. Nothing exceptional, just performing simple search ```python url = f"http://{config.solr.host}:{config.solr.port}/solr/{config.solr.collection}" solr_archive = pysolr.Solr(url, config.solr.timeout) if __name__ == "__main__": res = solr_archive.search( q=f"*:*", **{ 'fq': ['text:"something"'] }, ) ``` ## Configuration * Operating system version: Ubuntu 20.04.5 LTS * Search engine version: solr 8.9.0, lucene 8.9.0 * Python version: 3.10.8 * pysolr version: 3.9.0
关闭于 2023-06-27 1 条评论