jadolg/rocketchat_API

Hello,I got an error while using rocket.chat_post_message

HuXinjing opened this issue · 2 comments

here is my code:
bot_username = os.environ.get('ROCKET_USERNAME')
password = os.environ.get('ROCKET_PASSWORD')
server_url = os.environ.get('ROCKET_SERVER_URL')
proxy_dict = None
rocket = RocketChat(bot_username, password, server_url=server_url, proxies=proxy_dict)
rocket.chat_post_message(response, channel='GENERAL')

and here is error:
Traceback (most recent call last):
File "/data/lijiaxiang/codes/chatGLM-6B-QLoRA/mychat/myscript.py", line 105, in
rocket.chat_post_message(response, channel='GENERAL')
File "/data/lijiaxiang/anaconda3/lib/python3.11/site-packages/rocketchat_API/APISections/chat.py", line 16, in chat_post_message
return self.call_api_post(
^^^^^^^^^^^^^^^^^^^
File "/data/lijiaxiang/anaconda3/lib/python3.11/site-packages/rocketchat_API/APISections/base.py", line 97, in call_api_post
self.server_url + self.API_path + method,
~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~

Is it my misusing this API?

The response include some '\n', dose it matter?

jadolg commented

This error message seems incomplete. I can't understand what's going on.

This error message seems incomplete. I can't understand what's going on.

There is no more error information. Thanks anyway~