opensourcehacker / sevabot Goto Github PK
View Code? Open in Web Editor NEWA Skype bot supporting integration with external services
Home Page: http://sevabot-skype-bot.readthedocs.org/
A Skype bot supporting integration with external services
Home Page: http://sevabot-skype-bot.readthedocs.org/
When I !reload the bot's modules I get the following error messages:
2014-08-07 19:13:29,134 - sevabot - ERROR - shutdown() takes no arguments (1 given)
Traceback (most recent call last):
File "/root/sevabot/sevabot/utils.py", line 39, in closure
return func(_args, *_kwargs)
File "/root/sevabot/sevabot/bot/modules.py", line 127, in shutdown
self.handler.shutdown()
TypeError: shutdown() takes no arguments (1 given)
Not sure what the error is here but it does not seem to affect the bot's functionality. Just wanted to report it. Ah, I'm using Ubuntu 14.04 LTS, python 2.76 and skype 4.3.0.37
And: Great work, guys! :)
Skype just killed everything below 4.3. So to be able to connect at all right now you need to update, which is not in apt-get atm.
http://askubuntu.com/questions/488053/how-to-install-skype-4-3
I keep seeing this in the sevabot logs
2013-09-25 14:11:30,872 - sevabot.frontend.api - INFO - Successfully sent message (sun) - https://jenkins.xxxxxxx.com/job/PhonoSDK-1.1-Mobile/158/
2013-09-25 14:11:31,154 - sevabot.frontend.api - ERROR - 'status'
2013-09-25 14:11:31,154 - sevabot.frontend.api - ERROR - 'status'
Traceback (most recent call last):
File "/Users/administrator/opt/sevabot/sevabot/frontend/api.py", line 55, in dispatch_request
msg = self.compose()
File "/Users/administrator/opt/sevabot/sevabot/frontend/api.py", line 197, in compose
if payload['build']['status'] == 'SUCCESS':
KeyError: 'status'
2013-09-25 14:11:34,674 - sevabot.frontend.api - INFO - Successfully sent message (sun) - https://jenkins.xxxxxx.com/job/PhonoSDK-1.0-Mobile/171/
I also ran wireshark on the machine to inspect the post, and the key is there. So any idea why I am getting this log line indicating a problem when there isn't actually one ?
Thanks!
-John
Tell me how to create a module like "question and answer"
for example:
!qa name
will test1
!qa name2
will test2
etc.
Because I am so cool
I need something like this:
localhost:5000/message/secretid/chatid/here is text sended to user
Please, help me.
Sometimes (after some idle time, or just after service restart) some chat messages are not processed. When I open (via vnc) the fluxbox desktop, there is an info icon of not read messages (with the commands I have sent) on skype.
I've put a listener on 'Notification' events and I see there is no 'CHATMESSAGE', and only one CHAT <bla, bla> ACTIVITY_TIMESTAMP when this happens.
I did some changes to bot.py to listen this notifications and read MissedMessages and removed 'MessageStatus' handler. And that resolves my problem.
Is this a know problem or there is any workaround?
I've tried to install sevabot on a new headless Ubuntu server. Everything goes fine until
. venv/bin/activate
, which warns you of two missing things: pip-.tar.gz and setuptools-.tar.gz . While anyone linux-savvy knows to just get them from somewhere and install them, not everybody is, so they might ignore it and keep going.
That ends with the user stuck trying to start up Sevabot, failing as those two packets don't exist.
Installation step-by-step should be updated for that.
always get same errors in all commands
maybe can some help me:
Exception in thread Thread-5545:
Traceback (most recent call last):
File "C:\Python\Lib\threading.py", line 808, in bootstrap_inner
self.run()
File "c:\sevabot\sevabot\bot\modules.py", line 246, in run
self.result = self.func()
File "c:\sevabot\sevabot\bot\modules.py", line 64, in threaded_run
process = subprocess.Popen(args, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=False, env=env)
File "C:\Python\Lib\subprocess.py", line 711, in __init
errread, errwrite)
File "C:\Python\Lib\subprocess.py", line 948, in _execute_child
startupinfo)
TypeError: environment can only contain strings
Hi,
Whilst trying to get sevabot working with Jenkins I noticed that the latest version of the Notification Plugin caused an exception.
The fix appears to be changing the following line (https://github.com/opensourcehacker/sevabot/blob/master/sevabot/frontend/api.py#L192) to:
payload = request.json
(seemed excessive to create a pull request)
Cheers,
Gary
when connected to vebhook zapier.ัom chat prints a blank line, a pop window Skype says that "the message is deleted."
zapier.com
URL webhook POST:
http://188.x.x.x:5000/message/861933af9506dafc90d6e55c0e991e91/password/
if you enter:
(http://188.x.x.x:5000/zapier/861933af9506dafc90d6e55c0e991e91/password/
ERROR 404)
Hi,
I cant see a group chat on the chats list. There are only 1on1 chats. How can I enable group chat to use a bot functionality?
Hello,
just found this interesting project and thought why not :)
I just did the vagrant installation. What next? What do I have to do to get it running?
I cannot connect to the VM via VNC so I cannot setup skype. Or did I miss something?
Hi,
looks like notifications not working with parametrized Jobs,
is it Sevabot issue? Or this issue should be resolved with notification plugin developers?
Notifying endpoint 'HTTP:http://sevabotserver:5000/jenkins-notifier/9269f992491cdb01b9f81ad2ed1e3fc9/notifypass/'
ERROR: Failed to notify endpoint 'HTTP:http://sevabotserver:5000/jenkins-notifier/9269f992491cdb01b9f81ad2ed1e3fc9/notify/'
java.lang.NoSuchMethodError: hudson.model.ParameterValue.buildEnvironment(Lhudson/model/Run;Lhudson/EnvVars;)V
at com.tikal.hudson.plugins.notification.Phase.buildJobState(Phase.java:100)
at com.tikal.hudson.plugins.notification.Phase.handle(Phase.java:41)
at com.tikal.hudson.plugins.notification.JobListener.onStarted(JobListener.java:31)
at hudson.model.listeners.RunListener.fireStarted(RunListener.java:213)
at hudson.model.Run.execute(Run.java:1661)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:230)
Failed to notify endpoint 'HTTP:http://sevabotserver:5000/jenkins-notifier/9269f992491cdb01b9f81ad2ed1e3fc9/notifypass/' - java.lang.NoSuchMethodError: hudson.model.ParameterValue.buildEnvironment(Lhudson/model/Run;Lhudson/EnvVars;)V
So I remember having this problem previously, but I can't remember how I fixed it.
I have the settings.py file at /home/skype/sevabot, and doing
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
echo $DIR
outputs exactly that, /home/skype/sevabot
However, when I try to start sevabot ( SERVICES="sevabot" ./scripts/start-server.sh start ), it doesn't do anything for some seconds, then
Could not load settings file: settings.py
Started Sevabot web server process id
I've even symlinked it on ./sevabot, ./sevabot/frontend, to no avail.
Using the latest version, fetched a day or two ago.
Any ideas of what could be causing this?
Hey,
is it possible for sevabot to pass the userid of the person running the command. So for example if paul or ryan ran a command it would pass their skype id to the script so we can use it as a basic level of authentication in the script as well as allowing the scripts to store data user specifically.
I can see in the debug output that the information is received by the sevabot process but not sure if this is implemented currently as an option.
Can we get sevabot to listen to 0.0.0.0:5000 instead of just (example) 1.2.3.4:5000? Seems when my DHCP IP address changes, the listener doesn't... Until restarted.
~/sevabot/scripts/start-server.sh must be called from inside ~/sevabot or settings.py will not be found
testing out =)
My hosting has updated all our servers with the new security fix (found here); since it did, I can't start sevabot anymore.
It seems to have stopped detecting the display it starts up, trying to start more than one until the error
_XSERVTransSocketINETCreateListener: ...SocketCreateListener() failed
_XSERVTransMakeAllCOTSServerListeners: server already running
Fatal server error:
Cannot establish any listening sockets - Make sure an X server isn't already running
...appears.
That fix seems to have something to do with user privileges and their containment -- maybe Sevabot needs to use something as a determinated user? For example, adding the skype user as root (!!) to run the start-server.sh? But then again, that doesn't make a lot of sense if the problem is with displays...
Entire logs when running the start-server.sh start command here.
Running
Linux (hostname)2.6.32-042stab090.5 #1 SMP Sat Jun 21 00:15:09 MSK 2014 x86_64 x86_64 x86_64 GNU/Linux
(Ubuntu)
Feel free to ask for any information that might be useful.
I think we do not have permission to use Skype logo unless we are prepared to have Microsoft lawyers ripping of our skin (current favicon)
We need a logo what we can use as
etc.
Any ideas?
When installing sevabot on ubuntu 12.04, I have sevabot working: responses in skype. The website interface is not launching though. On start up there is no description of a web endpoint at the ip address specified in settings.py.
After a clean reinstall, I notice that I get this output during python setup.py develop:
Finished processing dependencies for sevabot==1.2.5.dev0
Error in atexit._run_exitfuncs:
Traceback (most recent call last):
File "/usr/lib/python2.7/atexit.py", line 24, in _run_exitfuncs
func(_targs, *_kargs)
File "/usr/lib/python2.7/multiprocessing/util.py", line 284, in _exit_function
info('process shutting down')
TypeError: 'NoneType' object is not callable
Error in sys.exitfunc:
Traceback (most recent call last):
File "/usr/lib/python2.7/atexit.py", line 24, in _run_exitfuncs
func(_targs, *_kargs)
File "/usr/lib/python2.7/multiprocessing/util.py", line 284, in _exit_function
info('process shutting down')
TypeError: 'NoneType' object is not callable
I'm having trouble with Sevabot in group chats. Everything works fine in conversations with single people, however when I join a chat, every message sent to that chat results in the following exception:
Exception in thread Skype4Py MessageStatus event scheduler:
Traceback (most recent call last):
File "/usr/lib64/python2.6/threading.py", line 532, in __bootstrap_inner
self.run()
File "build/bdist.linux-x86_64/egg/Skype4Py/utils.py", line 225, in run
handler(_self.args, *_self.kwargs)
File "/home/skype/sevabot/sevabot/bot/bot.py", line 95, in handleMessages
logger.debug("Incoming %s - %s - %s: %s" % (status, msg.Chat.FriendlyName,
File "build/bdist.linux-x86_64/egg/Skype4Py/chat.py", line 245, in _GetFriendlyName
return self._Property('FRIENDLYNAME')
File "build/bdist.linux-x86_64/egg/Skype4Py/chat.py", line 33, in _Property
return self._Owner._Property('CHAT', self.Name, PropName, Value, Cache)
File "build/bdist.linux-x86_64/egg/Skype4Py/skype.py", line 296, in _Property
value = self._DoCommand('GET %s' % jarg, jarg)
File "build/bdist.linux-x86_64/egg/Skype4Py/skype.py", line 281, in _DoCommand
raise SkypeError(int(errnum), errstr)
SkypeError: [Errno 105] Invalid chat name
Also the group chat ID does not show up in /chats/. Any ideas what might be the problem?
I'm running sevabot on CentOS 6 with python 2.6 and skype 4.3.0.37
Hey guys,
After installing sevabot and trying to run it, I got the following messages:
(venv)root@sx3:~/sevabot# sevabot
Starting sevabot
Discovered module ping: /root/sevabot/modules/ping.sh
Discovered module sad: /root/sevabot/modules/sad.py
Discovered module timeout: /root/sevabot/modules/timeout.sh
Discovered module memoryhog: /root/sevabot/modules/memoryhog.sh
Discovered module soundcloud: /root/sevabot/modules/soundcloud.rb
Discovered module weather: /root/sevabot/modules/weather.py
Skype API connection established
opened
Traceback (most recent call last):
File "/root/sevabot/venv/bin/sevabot", line 8, in <module>
load_entry_point('sevabot==1.1.dev0', 'console_scripts', 'sevabot')()
File "/root/sevabot/sevabot/frontend/main.py", line 139, in entry_point
exit_code = plac.call(main)
File "/root/sevabot/venv/local/lib/python2.7/site-packages/plac-0.9.1-py2.7.eg g/plac_core.py", line 309, in call
cmd, result = parser_from(obj).consume(arglist)
File "/root/sevabot/venv/local/lib/python2.7/site-packages/plac-0.9.1-py2.7.eg g/plac_core.py", line 195, in consume
return cmd, self.func(*(args + varargs + extraopts), **kwargs)
File "/root/sevabot/sevabot/frontend/main.py", line 89, in main
sevabot.start()
File "/root/sevabot/sevabot/bot/bot.py", line 28, in start
self.skype = Skype4Py.Skype(Transport='x11')
File "build/bdist.linux-i686/egg/Skype4Py/skype.py", line 250, in __init__
File "build/bdist.linux-i686/egg/Skype4Py/api/posix.py", line 40, in SkypeAPI
File "build/bdist.linux-i686/egg/Skype4Py/api/posix_x11.py", line 254, in __in it__
Skype4Py.errors.SkypeAPIError: Could not open XDisplay
Segmentation fault (core dumped)
Any idea why this is happening? Is something wrong with Skype4Py?
Thanks
Kelvin
What's the user and password for the vagrant box? I have it up and running but don't know what to do next. Could you expand that page a bit?
aasdasd
Hi,
It seems like in later versions of python, sevabot won't install unless the following line is added to "setup.py":
import multiprocessing
It seems like this affects more than sevabot, but it would be nice if somebody could confirm this bug and resolve it. I've verified its presence in both Ubuntu and Windows.
Extend bot functionality so it can automatically accept incoming contact request.
Make this functionality configurable.
Is this possible? I'm sorry I'm quite the noob, but it would be nice a guide in the documentation on how to perform a headless installation on the Raspberry Pi!
Is it possible to send messages to a specific list of people and groups?
Don't know if anyone has already requested, but it would be nice to be able to !reload and get a one command per line, sorted alphabetically list instead of the randomness we seem to get now. Maybe even a short description of each command pulled from the modules? Maybe a hidden configuration option for each one also, so "tainted" modules don't appear in the list.
Example:
!reload
dice - rolls the dice reports back the total sum of the two dice.
Branch: master
Script start-server.sh on line 68 has such text:
skype > /dev/null 2&>1 &
and I guess it should be 2>&1 ..
I had a very strange sequence of things, that this small misprint led to sevabot crash :D
Hi,
I know you guys aren't really focused on windows, but while sevabot launches and works (for the most part) on Windows, it seems that any of the commands which uses modules.py fails. The specific error seems to have to do with line 64 of modules.py:
process = subprocess.Popen(args, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=False, env=env)
It complains that the env variable (a dictionary object) can only contain strings.
env = os.environ.copy()
env["SKYPE_USERNAME"] = username.encode("utf-8")
env["SKYPE_FULLNAME"] = full_name.encode("utf-8")
As far as I can tell, and was able to test in the python interpreter, env does contain only strings. I even tried passing it a hardcoded dictionary object and it failed with the same Type Error.
I should note that I'm using Python 2.7.
I've got some ideas I would like to implement, take a look and maybe add some yours:
Hello there.
I'm not very sure how I would go about setting Sevabot's webpages on nginx, rather than Apache.
By a simple grep I've seen that it revolves around venv, which is different from editing some configuration files...
A little hand?
I followed this guide : https://sevabot-skype-bot.readthedocs.org/en/latest/ubuntu.html
When I type the command "python virtualenv.py venv", wich sould install Sevabot, I get this error :
skype@**********:~/sevabot$ python virtualenv.py venv
New python executable in venv/bin/python
Cannot find a wheel for setuptools
Cannot find a wheel for pip
Installing setuptools, pip...
Complete output from command /home/skype/sevabot/venv/bin/python -c "import sys, pip; sys...d\"] + sys.argv[1:]))" setuptools pip:
Traceback (most recent call last):
File "<string>", line 1, in <module>
ImportError: No module named pip
----------------------------------------
...Installing setuptools, pip...done.
Traceback (most recent call last):
File "virtualenv.py", line 2338, in <module>
main()
File "virtualenv.py", line 824, in main
symlink=options.symlink)
File "virtualenv.py", line 992, in create_environment
install_wheel(to_install, py_executable, search_dirs)
File "virtualenv.py", line 960, in install_wheel
'PIP_NO_INDEX': '1'
File "virtualenv.py", line 902, in call_subprocess
% (cmd_desc, proc.returncode))
OSError: Command /home/skype/sevabot/venv/bin/python -c "import sys, pip; sys...d\"] + sys.argv[1:]))" setuptools pip failed with error code 1
I'm running Debian Wheezy 7.5.
Shuts down bot. Have to run it again. In what could be the problem?
Just for fun, I've changed the protocol for DBUS and, on Ubuntu, the only extra configuration (to be added to docs) is:
sudo apt-get install python-dbus python-gobject dbus-x11
and on venv configuration, change to:
python virtualenv.py --system-site-packages venv
If possible I'd like to remove Bootstrap from core files and use CDN hosted version
Do you know any reason not to do so?
I have been playing around with Docker and containers recently and when I stumpled accross Sevabot I decided to try and package it up as container. I was able to follow all the steps for Ubuntu (I had to take some extra steps b/c containers are so bare-bones) but when I got to the:
SERVICES="xvfb fluxbox skype" ~/sevabot/scripts/start-server.sh start
step I get the following:
skype@9641df0a5587:~$ SERVICES="xvfb fluxbox skype" ~/sevabot/scripts/start-server.sh start
starting Xvfb
starting fluxbox
Error: Couldn't connect to XServer
Fatal server error: Could not create lock file in /tmp/.tX1-lock
I have done quite a bit of googling on this but as I don't have much experience with fluxbox I was not able to get very far. Some people suggested the culprit might be .xinitrc but I tried a couple suggestions none worked.
I have run programs over X11 before (Am I phrasing that right) without busybox and since that is the end goal (To login and change skype settings). I am going to attempt to get that working a different way but I thought I would ask here if you have seen that error before.
All of my progress thus far can be found on index.docker.com joshstrange/sevabot.
Add web page for administrator for viewing and accepting/rejecting incoming contact requests.
Depends on #17
In perspective, it would be great to increase web functionality.
Taking this into consideration, we need to add standart login/logout for administrators.
http://flask.pocoo.org/docs/tutorial/views/#login-and-logout
You guys are doing great job :)
When I use the provided send.sh file, I get validation failed. I assume its because I'm not sending from the same host that is listening on port 5000 although I can use the web interface from my remote host just fine. Any suggestions? did I miss a setting?
Currently we got a bunch of templates and all of them written from scratch.
Would be cool to inherit from base template, where we could include styles, favicons, page structure, etc.
Add functionality to view/add/search contacts from web page.
XXX needs to update Skype to participate in this chat.
Help by sending them to Skype.com/updateme.
Learn more about new group chat.
Running Sevabot on Ubuntu. If I upgrade is it going to break things (me thinks so...)?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.