Giter Club home page Giter Club logo

googlesearch-on-wechat's Issues

使用该插件时无响应,日志`UnicodeEncodeError: 'latin-1' codec can't encode characters in position 0-4: ordinal not in range(256)`

在微信上使用该插件进行”搜索“”搜图“时,不会出现响应,但是可以进行正常的聊天以及其他插件的使用。
日志上的提示为

Traceback (most recent call last):
  File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/app/channel/chat_channel.py", line 168, in _handle
    reply = self._generate_reply(context)
  File "/app/channel/chat_channel.py", line 178, in _generate_reply
    e_context = PluginManager().emit_event(
  File "/app/plugins/plugin_manager.py", line 189, in emit_event
    instance.handlers[e_context.event](e_context, *args, **kwargs)
  File "/app/plugins/googleSearch-On-Wechat/GoogleSearch.py", line 47, in on_handle_context
    self.handle_image_search(e_context, content[len("搜图 "):])
  File "/app/plugins/googleSearch-On-Wechat/GoogleSearch.py", line 97, in handle_image_search
    response = requests.request("POST", url, headers=headers, data=payload)
  File "/usr/local/lib/python3.10/site-packages/requests/api.py", line 59, in request
    return session.request(method=method, url=url, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/requests/sessions.py", line 589, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/local/lib/python3.10/site-packages/requests/sessions.py", line 703, in send
    r = adapter.send(request, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/requests/adapters.py", line 486, in send
    resp = conn.urlopen(
  File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 793, in urlopen
    response = self._make_request(
  File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 496, in _make_request
    conn.request(
  File "/usr/local/lib/python3.10/site-packages/urllib3/connection.py", line 399, in request
    self.putheader(header, value)
  File "/usr/local/lib/python3.10/site-packages/urllib3/connection.py", line 313, in putheader
    super().putheader(header, *values)
  File "/usr/local/lib/python3.10/http/client.py", line 1256, in putheader
    values[i] = one_value.encode('latin-1')
UnicodeEncodeError: 'latin-1' codec can't encode characters in position 0-4: ordinal not in range(256)

机器情况:阿里云服务器,国内的,Ubuntu22.04

企業微信上顯示不全

企業微信上搜索總結看不到有有超鏈接,只有文字結果
微信截图_20231115104322
但是後台看是有超鏈接的
图片

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.