GithubHelp home page GithubHelp logo

startup of bot fails about botamusique HOT 11 CLOSED

azlux avatar azlux commented on May 27, 2024
startup of bot fails

from botamusique.

Comments (11)

azlux avatar azlux commented on May 27, 2024 1

@thejustsoul Better ?
My bad, the python3 binary was hard coded

from botamusique.

thejustsoul avatar thejustsoul commented on May 27, 2024 1

@azlux problem solved :)

from botamusique.

thejustsoul avatar thejustsoul commented on May 27, 2024 1

@azlux yes, /usr/bin/env ffmpeg is fix it.

from botamusique.

azlux avatar azlux commented on May 27, 2024

I forgot to update the install readme.
I'm on it.

from botamusique.

azlux avatar azlux commented on May 27, 2024

Fix with you on live ( not the good version of pymumble b674029 )

from botamusique.

thejustsoul avatar thejustsoul commented on May 27, 2024

In order not to create a new question, I will post the error log here, tell me please, how to fix it?

root@srv:/tmp# uname -a

Linux srv 3.16.0-5-686-pae #1 SMP Debian 3.16.51-3+deb8u1 (2018-01-08) i686 GNU/Linux

root@srv:/tmp# lsb_release -a

No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux 8.10 (jessie)
Release:   8.10
Codename:  jessie

root@srv:/tmp# cat b.sh

#!/bin/bash
#sudo aptitude install python3 python3-pip
virtualenv -p python3 env_botamusique
source env_botamusique/bin/activate
cd env_botamusique
git clone --recurse-submodules https://github.com/azlux/botamusique.git
cd botamusique
pip3 install -r requirements.txt
chmod +x ./mumbleBot.py
./mumbleBot.py -s mymumbleserver.tld -u botamusique -p 64738 -c Lobby

root@srv:/tmp# ./b.sh

Running virtualenv with interpreter /usr/bin/python3
Using base prefix '/usr'
New python executable in /tmp/env_botamusique/bin/python3
Also creating executable in /tmp/env_botamusique/bin/python
Installing setuptools, pip, wheel...done.
Cloning into 'botamusique'...
remote: Counting objects: 296, done.
remote: Compressing objects: 100% (53/53), done.
remote: Total 296 (delta 48), reused 78 (delta 37), pack-reused 198
Receiving objects: 100% (296/296), 70.24 KiB | 0 bytes/s, done.
Resolving deltas: 100% (148/148), done.
Checking connectivity... done.
Submodule 'pymumble' (git://github.com/azlux/pymumble.git) registered for path 'pymumble'
Cloning into 'pymumble'...
remote: Counting objects: 439, done.
remote: Compressing objects: 100% (13/13), done.
remote: Total 439 (delta 8), reused 12 (delta 5), pack-reused 421
Receiving objects: 100% (439/439), 1.80 MiB | 1.00 MiB/s, done.
Resolving deltas: 100% (259/259), done.
Checking connectivity... done.
Submodule path 'pymumble': checked out 'd2ad1fde0c9e427622fb9c69ca7e20783a19d101'
Collecting opuslib==2.0.0 (from -r requirements.txt (line 1))
  Downloading https://files.pythonhosted.org/packages/1d/7f/6dd65372355c8fd27cff78deb4fa0f2a6948f72a851035fb64aba6041b9f/opuslib-2.0.0.tar.gz
Collecting protobuf==3.4.0 (from -r requirements.txt (line 2))
  Downloading https://files.pythonhosted.org/packages/b7/24/e7514e574b025bd86eed3bff69bf342abacd77e680a0b0c61f89a3197de3/protobuf-3.4.0-py2.py3-none-any.whl (375kB)
    100% |████████████████████████████████| 378kB 1.3MB/s
Collecting flask (from -r requirements.txt (line 3))
  Downloading https://files.pythonhosted.org/packages/7f/e7/08578774ed4536d3242b14dacb4696386634607af824ea997202cd0edb4b/Flask-1.0.2-py2.py3-none-any.whl (91kB)
    100% |████████████████████████████████| 92kB 1.3MB/s
Collecting youtube-dl (from -r requirements.txt (line 4))
  Downloading https://files.pythonhosted.org/packages/d6/f5/cf0fbd6002ac46e72629035beff6c9e6bbc9afa82a7a46c7bc495ab6084b/youtube_dl-2018.6.4-py2.py3-none-any.whl (1.7MB)
    100% |████████████████████████████████| 1.7MB 839kB/s
Collecting python-magic (from -r requirements.txt (line 5))
  Downloading https://files.pythonhosted.org/packages/42/a1/76d30c79992e3750dac6790ce16f056f870d368ba142f83f75f694d93001/python_magic-0.4.15-py2.py3-none-any.whl
Collecting Pillow (from -r requirements.txt (line 6))
  Downloading https://files.pythonhosted.org/packages/db/0e/72e6bf83935993ee928be0e27d3ca14e20335c7c430483aa84ba7679768b/Pillow-5.1.0-cp34-cp34m-manylinux1_i686.whl (1.8MB)
    100% |████████████████████████████████| 1.9MB 735kB/s
Collecting six>=1.9 (from protobuf==3.4.0->-r requirements.txt (line 2))
  Downloading https://files.pythonhosted.org/packages/67/4b/141a581104b1f6397bfa78ac9d43d8ad29a7ca43ea90a2d863fe3056e86a/six-1.11.0-py2.py3-none-any.whl
Requirement already satisfied: setuptools in /tmp/env_botamusique/lib/python3.4/site-packages (from protobuf==3.4.0->-r requirements.txt (line 2)) (39.2.0)
Collecting itsdangerous>=0.24 (from flask->-r requirements.txt (line 3))
  Downloading https://files.pythonhosted.org/packages/dc/b4/a60bcdba945c00f6d608d8975131ab3f25b22f2bcfe1dab221165194b2d4/itsdangerous-0.24.tar.gz (46kB)
    100% |████████████████████████████████| 51kB 1.1MB/s
Collecting click>=5.1 (from flask->-r requirements.txt (line 3))
  Downloading https://files.pythonhosted.org/packages/34/c1/8806f99713ddb993c5366c362b2f908f18269f8d792aff1abfd700775a77/click-6.7-py2.py3-none-any.whl (71kB)
    100% |████████████████████████████████| 71kB 1.2MB/s
Collecting Jinja2>=2.10 (from flask->-r requirements.txt (line 3))
  Downloading https://files.pythonhosted.org/packages/7f/ff/ae64bacdfc95f27a016a7bed8e8686763ba4d277a78ca76f32659220a731/Jinja2-2.10-py2.py3-none-any.whl (126kB)
    100% |████████████████████████████████| 133kB 1.4MB/s
Collecting Werkzeug>=0.14 (from flask->-r requirements.txt (line 3))
  Downloading https://files.pythonhosted.org/packages/20/c4/12e3e56473e52375aa29c4764e70d1b8f3efa6682bef8d0aae04fe335243/Werkzeug-0.14.1-py2.py3-none-any.whl (322kB)
    100% |████████████████████████████████| 327kB 1.3MB/s
Collecting MarkupSafe>=0.23 (from Jinja2>=2.10->flask->-r requirements.txt (line 3))
  Downloading https://files.pythonhosted.org/packages/4d/de/32d741db316d8fdb7680822dd37001ef7a448255de9699ab4bfcbdf4172b/MarkupSafe-1.0.tar.gz
Building wheels for collected packages: opuslib, itsdangerous, MarkupSafe
  Running setup.py bdist_wheel for opuslib ... done
  Stored in directory: /root/.cache/pip/wheels/a2/6e/92/421e586c65ec15713ba6da6c22e4f09e84d37ee14df6272ee3
  Running setup.py bdist_wheel for itsdangerous ... done
  Stored in directory: /root/.cache/pip/wheels/2c/4a/61/5599631c1554768c6290b08c02c72d7317910374ca602ff1e5
  Running setup.py bdist_wheel for MarkupSafe ... done
  Stored in directory: /root/.cache/pip/wheels/33/56/20/ebe49a5c612fffe1c5a632146b16596f9e64676768661e4e46
Successfully built opuslib itsdangerous MarkupSafe
Installing collected packages: opuslib, six, protobuf, itsdangerous, click, MarkupSafe, Jinja2, Werkzeug, flask, youtube-dl, python-magic, Pillow
Successfully installed Jinja2-2.10 MarkupSafe-1.0 Pillow-5.1.0 Werkzeug-0.14.1 click-6.7 flask-1.0.2 itsdangerous-0.24 opuslib-2.0.0 protobuf-3.4.0 python-magic-0.4.15 six-1.11.0 youtube-dl-2018.6.4
Traceback (most recent call last):
  File "./mumbleBot.py", line 15, in <module>
    import pymumble.pymumble_py3 as pymumble
  File "/tmp/env_botamusique/botamusique/pymumble/pymumble_py3/__init__.py", line 3, in <module>
    from .mumble import Mumble
  File "/tmp/env_botamusique/botamusique/pymumble/pymumble_py3/mumble.py", line 12, in <module>
    from . import users
  File "/tmp/env_botamusique/botamusique/pymumble/pymumble_py3/users.py", line 4, in <module>
    from . import soundqueue
  File "/tmp/env_botamusique/botamusique/pymumble/pymumble_py3/soundqueue.py", line 6, in <module>
    import opuslib
ImportError: No module named 'opuslib'

from botamusique.

thejustsoul avatar thejustsoul commented on May 27, 2024

Another problem, the path to ffmpeg is also hardcoded.. I have ffmpeg not installed globally, but installed locally and the path is different from /usr/bin/ffmpeg, if replace to simple ffmpeg in https://github.com/azlux/botamusique/blob/master/mumbleBot.py#L282, ffmpeg start normally.

from botamusique.

azlux avatar azlux commented on May 27, 2024

@thejustsoul is /usr/bin/env ffmpeg will be better ? Or do you think I need to add an entry into the config file ?

from botamusique.

thejustsoul avatar thejustsoul commented on May 27, 2024

Oh, I'm sorry, ffmpeg comes up twice in the code, and I only replaced one and it worked, replaced both, and it stopped.. Only if replaced with ffmpeg in both places, it works.
FileNotFoundError: [Errno 2] No such file or directory: '/usr/bin/env ffmpeg'

https://github.com/azlux/botamusique/blob/master/mumbleBot.py#L233
https://github.com/azlux/botamusique/blob/master/mumbleBot.py#L282

And even if you don't mind, no, if you specify a direct link to the mp3, error .jpg. I commented out a block of code:

#            im = Image.open(var.config.get('bot', 'tmp_folder') + hashlib.md5(url.encode()).hexdigest() + '.jpg')
#            im.thumbnail((100, 100), Image.ANTIALIAS)
#            buffer = BytesIO()
#            im.save(buffer, format="JPEG")
#            thumbnail_base64 = base64.b64encode(buffer.getvalue())
#            thumbnail_html = '<img - src="data:image/PNG;base64,' + thumbnail_base64.decode() + '"/>'
#
#            logging.debug(thumbnail_html)
#            self.send_msg_channel(var.config.get('strings', 'now_playing') % (title, thumbnail_html))

And now it plays normally, but is not displayed in the chat. Possible disable get and say in chat thumbnail?
And still a small typo, in the output of the command !help specify command: !play_url but it doesn't work, but it works !url.

from botamusique.

azlux avatar azlux commented on May 27, 2024

ho ok,
the ffmpeg under the dunction launch_play_file is for a futur use. It's never called into this version.

For the other case, open a new ticket. Give me the error and the url you try to play.
Thank you for all the feedback. I will change the !help at the next commit

from botamusique.

Glowsome avatar Glowsome commented on May 27, 2024

boterror05062018.txt

This change broke bot - in reverting the change the bot is fine again ... will wait for a more definite 'fix'

from botamusique.

Related Issues (20)

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.