Code Monkey home page Code Monkey logo

sevabot's People

Contributors

aegil avatar b2jrock avatar benh57 avatar bkmeneguello avatar builtinnya avatar femueller avatar gelma avatar gii-brian-johnson avatar grundic avatar jmandel avatar miohtama avatar navhaxs avatar robations avatar sevanteri avatar sfossen avatar tenpn avatar vkavun avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sevabot's Issues

error message: !reload - shutdown

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! :)

Jenkins plugin returns "KeyError: 'status'"

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

module Q&A

Tell me how to create a module like "question and answer"
for example:
!qa name
will test1
!qa name2
will test2
etc.

Missing Chat Messages

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?

Missing steps on the tutorial

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.

With windows many problem...

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

What next?

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?

hudson.model.ParameterValue.buildEnvironment

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

Could not load settings file: settings.py

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?

UserID Parameter

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.

settings.py not found

~/sevabot/scripts/start-server.sh must be called from inside ~/sevabot or settings.py will not be found

OpenVZ can't start sevabot anymore.

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.

Logo needed

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

  • Skype avatatar for Sevabot
  • Favicon on admin
  • Favicon on docs
  • Icon on github

etc.

Any ideas?

python setup.py develop fails

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

Issue with group chats

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

Issues after starting sevabot (Ubuntu 12.04)

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

Vagrant user?

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?

Sevabot won't install on Python 2.7 without import multiprocessing

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.

Sevabot on the Raspberry Pi

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!

send list&groups

Is it possible to send messages to a specific list of people and groups?

Feature request: sort alphabetically results of reload command

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.

Script start-server.sh has a minor misprint

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

Modules fail on Windows

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.

TODO

I've got some ideas I would like to implement, take a look and maybe add some yours:

  1. Implement login for administrators - http://flask.pocoo.org/docs/tutorial/views/#login-and-logout
  2. Make it possible for bot to automatically accept incoming contact request or make it possible to do via web interface
  3. Add/search contacts from web interface
  4. Implement chat grouping: for example, I've got several people, who are interested in notification on build failure. I can configure several url handlers on Teamcity. But it's better if we can implement chat grouping and sending notification for group chat will send a message to all configured people.
  5. Change status from web
  6. Favicon

Sevabot's frontend on nginx?

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?

Can't create Virtualenv

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.

DBUS Support

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

Docker Containers - Couldn't connect to XServer

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.

remote hosts cannot relay messages to http api

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?

Refactor templates

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.

New Group Chat creation failing

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...)?

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.