-
Notifications
You must be signed in to change notification settings - Fork 76
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error in function msg: parameter #1 <text> is not type UnicodeString #111
Comments
I guess your input is no unicode string. |
my trace: Traceback (most recent call last):
File "command_send_message.py", line 13, in <module>
sender.msg("@ehsankhorasani", "text")
File "/home/fatman/w/pytg/.env/local/lib/python2.7/site-packages/pytg/sender.py", line 630, in command_alias
return self.execute_function(command_name, *args, **kwargs)
File "/home/fatman/w/pytg/.env/local/lib/python2.7/site-packages/pytg/sender.py", line 274, in execute_function
command_name, new_args = self._validate_input(function_name, arguments)
File "/home/fatman/w/pytg/.env/local/lib/python2.7/site-packages/pytg/sender.py", line 414, in _validate_input
function_name=function_name, number=i, type=func_type.__class__.__name__, param=str(func_type), error=str(err)))
ValueError: Error in function msg: parameter #1 <text> is not type UnicodeString. (Not a string.) Edited by @luckydonald: Syntax highlighting |
@ehsankhorasani you must EDIT: according to @luckydonald better way is this : |
@shotgunner's comment applies to python 2. Actually sender.send_msg(u"@somebody", u"Hello World!") is possible too. |
The problem
i've download
command_send_message.py
from example directory and run it by python.but return me this eror:
ValueError: Error in function msg: parameter #1 <text> is not type UnicodeString. (Not a string.)
The text was updated successfully, but these errors were encountered: