jadolg / rocketchat_API

Python API wrapper for Rocket.Chat
MIT License
270 stars 92 forks source link

Hello,I got an error while using rocket.chat_post_message #228

Closed HuXinjing closed 1 year ago

HuXinjing commented 1 year ago

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_postmessage(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 1 year ago

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

HuXinjing commented 1 year ago

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

There is no more error information. Thanks anyway~