Giter VIP home page Giter VIP logo

discodo's Introduction

Hi there ๐Ÿ‘‹


Windows Linux Mint

AWS Cloudflare Firebase Oracle Raspberry Pi

C C# C++ CSS3 HTML5 Java JavaScript Python

Visual Studio Visual Studio Code

discodo's People

Contributors

akiacode avatar deepsource-autofix[bot] avatar deepsourcebot avatar dependabot[bot] avatar eunwoo1104 avatar kijk2869 avatar minibox24 avatar restyled-commits avatar saidbysolo avatar sannoob3144 avatar wonderlandpark avatar yoruroong 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

Watchers

 avatar  avatar

discodo's Issues

discodo.DPYClient().register_local_node() ํ•จ์ˆ˜ ํ˜ธ์ถœ ์‹œ NotImplementedError ๋ฐœ์ƒ

register_local_node() ํ•จ์ˆ˜๋ฅผ ์ด์šฉํ•ด ๋กœ์ปฌ ๋…ธ๋“œ๋ฅผ ๋“ฑ๋กํ•˜๋ ค๊ณ  ํ•˜๋ฉด ๋‹ค์Œ๊ณผ ๊ฐ™์€ ์—๋Ÿฌ๊ฐ€ ๋ฐœ์ƒํ•˜๋ฉด์„œ ๋…ธ๋“œ๊ฐ€ ๋“ฑ๋ก๋˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค.

Task exception was never retrieved
future: <Task finished name='Task-1' coro=<DPYClient._register_local_event() done, defined at D:\Programs\Python38\lib\site-packages\discodo\client\DPYClient.py:116> exception=NotImplementedError()>
Traceback (most recent call last):
  File "D:\Programs\Python38\lib\site-packages\discodo\client\DPYClient.py", line 121, in _register_local_event
    LocalNodeProc = await launchLocalNode(**launchOptions)
  File "D:\Programs\Python38\lib\site-packages\discodo\client\node.py", line 42, in launchLocalNode
    LocalNodeProc = await asyncio.create_subprocess_exec(
  File "D:\Programs\Python38\lib\asyncio\subprocess.py", line 236, in create_subprocess_exec
    transport, protocol = await loop.subprocess_exec(
  File "D:\Programs\Python38\lib\asyncio\base_events.py", line 1630, in subprocess_exec
    transport = await self._make_subprocess_transport(
  File "D:\Programs\Python38\lib\asyncio\base_events.py", line 491, in _make_subprocess_transport
    raise NotImplementedError
NotImplementedError

์˜ค๋ฅ˜

[2020-09-16 09:04:47,097] [event.py] [discodo.event:event] [INFO]: Voice Client of 621870504147681311 not found. create new one.
Task exception was never retrieved
future: <Task finished name='Task-22' coro=<DiscordEvent.parseVoiceServerUpdate() done, defined at /usr/local/lib/python3.8/dist-packages/discodo/event.py:53> exception=ValueError()>
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/dist-packages/discodo/event.py", line 63, in parseVoiceServerUpdate
    vc = VoiceClient(self.client, data)
  File "/usr/local/lib/python3.8/dist-packages/discodo/voice_client.py", line 18, in __init__
    super().__init__(*args, **kwargs)
  File "/usr/local/lib/python3.8/dist-packages/discodo/voice_connector.py", line 42, in __init__
    self.encoder = opus.Encoder()
  File "/usr/local/lib/python3.8/dist-packages/discodo/natives/opus.py", line 150, in __init__
    raise ValueError
ValueError
[2020-09-16 09:04:47,350] [voice_client.py] [discodo.VoiceClient:voice_client] [INFO]: destroying voice client of 621870504147681311.
Exception ignored in: <function VoiceClient.__del__ at 0x7ff83802a0d0>
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/dist-packages/discodo/voice_client.py", line 90, in __del__
    if self.player and self.player.is_alive():
AttributeError: 'VoiceClient' object has no attribute 'player'

ํŒŒ์ด์ฌ 3.8.2, ์ƒ˜ํ”Œ์ฝ”๋“œ๋กœ !join์„ ์‹คํ–‰ํ•  ๋•Œ ๋””์Šค์ฝ”๋„ ์„œ๋ฒ„์—์„œ ์˜ค๋ฅ˜๊ฐ€ ๋ฐœ์ƒํ•จ

[Deprecated] Sanic variables

Setting variables on Sanic instances is deprecated and will be removed in version 21.9.

You should change your Sanic instance to use instance.ctx.ClientManagers instead.

เผผ ใค โ—•_โ—• เผฝใค

Ignoring exception in on_message
Traceback (most recent call last):
  File "C:\Users\yoru\AppData\Local\Programs\Python\Python37\lib\site-packages\discord\client.py", line 333, in _run_event
    await coro(*args, **kwargs)
  File "test.py", line 65, in on_message
    Source = await vc.loadSource(message.content[5:].strip())
  File "C:\Users\yoru\AppData\Local\Programs\Python\Python37\lib\site-packages\discodo\client\voice_client.py", line 70, in loadSource
    return (await self.query("loadSource", {"query": Query}))["source"]
KeyError: 'source'

await self.query("loadSource", {"query": Query})

{'traceback': {'JSONDecodeError': 'Extra data: line 1 column 258633 (char 258632)'}, 'guild_id': 621870504147681311}

server(ubuntu 20.04)

[2020-12-12 08:33:43,024] [websocket.py] [discodo.server:websocket] [INFO]: new websocket connection created from 
[2020-12-12 08:33:44,456] [event.py] [discodo.event:event] [INFO]: recieve self voice update. set session id 9544877c55b74a23ac04b5faa78f065e
[2020-12-12 08:33:44,459] [event.py] [discodo.event:event] [INFO]: Voice Client of 621870504147681311 not found. create new one.
[2020-12-12 08:33:44,646] [event.py] [discodo.event:event] [INFO]: Voice server update recieved. connect to new endpoint
[2020-12-12 08:33:44,646] [voice_connector.py] [discodo.VoiceConnector:voice_connector] [INFO]: voice endpoint south-korea367.discord.media detected.
[2020-12-12 08:33:44,709] [gateway.py] [discodo.gateway:gateway] [INFO]: select encrypt mode xsalsa20_poly1305_suffix
[2020-12-12 08:33:44,721] [gateway.py] [discodo.gateway:gateway] [INFO]: recieved voice secret key.
[2020-12-12 08:33:47,292] [search.py] [discodo.extractor.youtube:search] [INFO]: Downloading search page of how far ill go
[2020-12-12 08:33:48,150] [search.py] [discodo.extractor.youtube:search] [INFO]: Downloading search page of how far ill go

(PTC-W0043) Unnecessary `delete` statement in a local scope

Description

Passing a local variable to a del statement results in that variable being removed from the local namespace. When exiting a function all local variables are deleted, so it is unnecessary to explicitly delete variables in such cases. It is recommended to remove this del statement. Not preferred: ```python def โ€ฆ

Occurrences

There is 1 occurrence of this issue in the repository.

See all occurrences on DeepSource โ†’ deepsource.io/gh/kijk2869/discodo/issue/PTC-W0043/occurrences/

VoiceClient.skip์‹œ AttributeError ๋ฐœ์ƒ

File "/usr/local/lib/python3.8/site-packages/discord/ext/commands/core.py", line 85, in wrapped
    ret = await coro(*args, **kwargs)
  File "/green/Cogs/music.py", line 165, in _skip
    await voice.skip()
  File "/usr/local/lib/python3.8/site-packages/discodo/client/voice_client.py", line 99, in skip
    return (await self.query("skip", {"offset": offset}))["remain"]
  File "/usr/local/lib/python3.8/site-packages/discodo/client/voice_client.py", line 57, in query
    raise NodeException(*list(Data["traceback"].items())[0])
NodeException: AttributeError: 'NoneType' object has no attribute 'current'

System Info
OS: Ubuntu 20.04 LTS
Python Version: 3.8.6
Discodo Version: 2.3.13

NoSearchResults(ํŠน์ •์˜์ƒ์ด ๊ฒ€์ƒ‰์•ˆ๋˜๋Š”๋ฌธ์ œ)

Ignoring exception in command play:
Traceback (most recent call last):
  File "C:\Users\name\AppData\Local\Programs\Python\Python38\lib\site-packages\discord\ext\commands\core.py", line 85, in wrapped
    ret = await coro(*args, **kwargs)
  File "SECRET\MusicBot-master\MusicBot-master\cogs\play.py", line 18, in play
    Data = await VC.loadSource(Query)
  File "C:\Users\name\AppData\Local\Programs\Python\Python38\lib\site-packages\discodo\client\voice_client.py", line 69, in loadSource
    return (await self.query("loadSource", {"query": Query}))["source"]
KeyError: 'source'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "C:\Users\name\AppData\Local\Programs\Python\Python38\lib\site-packages\discord\ext\commands\bot.py", line 903, in invoke
    await ctx.command.invoke(ctx)
  File "C:\Users\name\AppData\Local\Programs\Python\Python38\lib\site-packages\discord\ext\commands\core.py", line 859, in invoke
    await injected(*ctx.args, **ctx.kwargs)
  File "C:\Users\name\AppData\Local\Programs\Python\Python38\lib\site-packages\discord\ext\commands\core.py", line 94, in wrapped
    raise CommandInvokeError(exc) from exc
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: KeyError: 'source'

๊ฒ€์ƒ‰์˜์ƒ- ๋‹น์‹ ์„ ๊ธฐ๋‹ค๋ฆฌ๋Š” ์—ฌ์šฐ ์„ค์•ผ
ใ„ด ์œ ํŠœ๋ธŒ์—์„œ๋Š” ์ •์ƒ์ ์œผ๋กœ ์ž˜ ๋‚˜์˜ด, ๋ชจ๋“ˆ๋‚ด์—์„œ ๊ฒ€์ƒ‰์ด ๋ถˆ๊ฐ€ํ•œ ์ฆ์ƒ

VoiceClient.state raises AttributeError on specific condition.

VoiceClient.state raises AttributeError when its just created or never played any song.

Traceback (most recent call last):
  File "C:\Users\sions\PycharmProjects\slashm\cogs\music.py", line 70, in play
    is_playing = codo.state == "playing"
  File "C:\Users\sions\AppData\Local\Programs\Python\Python37\lib\site-packages\discodo\voice_client.py", line 127, in state
    if not self.Queue and not self.player.current:
AttributeError: 'NoneType' object has no attribute 'current'

Code:

codo = self.bot.discodo.getVC(ctx.guild.id, safe=True)
if not codo:
    await self.bot.connect_voice(ctx.guild, ctx.author.voice.channel)
    await ctx.send(content="์Œ์„ฑ ์ฑ„๋„์— ์—ฐ๊ฒฐํ–ˆ์–ด์š”! ์ž ์‹œ๋งŒ ๊ธฐ๋‹ค๋ ค์ฃผ์„ธ์š”...") # Delays so vc can be created.
    codo = self.bot.discodo.getVC(ctx.guild.id, safe=True)
try:
    is_playing = codo.state == "playing" # Here is where exception occur
except Exception as ex:
    __import__("traceback").print_exc()
    is_playing = False

Guide to ubuntu(and derivatives) users experiencing 'illegal hardware instruction'

I solved this problem by running the following commands, and my system is Linux Mint 20 Ulyana.

sudo apt update
sudo apt install --no-install-recommends -y gcc libopus-dev python3-dev libnacl-dev
sudo apt install --no-install-recommends -y pkg-config ffmpeg libavformat-dev libavcodec-dev libavdevice-dev libavutil-dev libswscale-dev libavresample-dev libavfilter-dev
python3.8 -m pip install discodo --no-binary av --force

Please share your method of solving if you are using other distributions in the comments to contribute

IP Rotate Planner

To avoid 429 of youtube, discodo has to rotate ip.
It should be applied to youtube_dl and related fetcher.

Song crash sometimes

[2020-08-18 13:48:41,774] [Loader.py] [libav.matroska,webm:Loader] [ERROR]: File ended prematurely

may be occured in Stream ip tunneling.

Empty thumbnails and other attributes

I printed whole track source. But there is no value in thumbnail attribute

์Šคํฌ๋ฆฐ์ƒท 2021-01-07 ์˜คํ›„ 11 07 23

[INFO][MainCog][2021-01-07 23:06:44,396]: {'_type': 'AudioData', 'id': 'UwLFTav2IGQ', 'title': 'BIGONE - Imgonnaparty', 'webpage_url': 'https://www.youtube.com/watch?v=UwLFTav2IGQ', 'thumbnail': None, 'url': None, 'duration': 194, 'is_live': False, 'uploader': 'lovetoken', 'description': None, 'subtitles': {}, 'chapters': {}, 'related': False}

Also tested other videos, also unable to bring thumbnails.

[INFO][MainCog][2021-01-07 23:09:15,855]: {'_type': 'AudioData', 'id': 'E4NO9lnuVNo', 'title': '[MV] Forever 84 - ๋‹ค๋ชจ์ž„ (์—ผ๋”ฐ, ๋” ์ฝฐ์ด์—‡, ์‚ฌ์ด๋จผ ๋„๋ฏธ๋‹‰, ํŒ”๋กœ์•Œํ† , ๋”ฅํ”Œ๋กœ์šฐ) X ๋”ฉ๊ณ  [DF FILM]', 'webpage_url': 'https://www.youtube.com/watch?v=E4NO9lnuVNo', 'thumbnail': None, 'url': None, 'duration': 242, 'is_live': False, 'uploader': 'dingo freestyle', 'description': None, 'subtitles': {}, 'chapters': {}, 'related': False}

Remote AudioManager resume feature

The player should be able to recover.
However, to implement this feature, you need to change the way your current node server is managed.

Running it on Raspi 4

ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-b12nueh3/av/setup.py'"'"'; file='"'"'/tmp/pip-install-b12nueh3/av/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-at90a7e2
cwd: /tmp/pip-install-b12nueh3/av/
Complete output (48 lines):
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-aarch64-3.8
creating build/lib.linux-aarch64-3.8/av
copying av/init.py -> build/lib.linux-aarch64-3.8/av
copying av/main.py -> build/lib.linux-aarch64-3.8/av
copying av/datasets.py -> build/lib.linux-aarch64-3.8/av
copying av/deprecation.py -> build/lib.linux-aarch64-3.8/av
creating build/lib.linux-aarch64-3.8/av/container
copying av/container/init.py -> build/lib.linux-aarch64-3.8/av/container
creating build/lib.linux-aarch64-3.8/av/data
copying av/data/init.py -> build/lib.linux-aarch64-3.8/av/data
creating build/lib.linux-aarch64-3.8/av/audio
copying av/audio/init.py -> build/lib.linux-aarch64-3.8/av/audio
creating build/lib.linux-aarch64-3.8/av/filter
copying av/filter/init.py -> build/lib.linux-aarch64-3.8/av/filter
creating build/lib.linux-aarch64-3.8/av/codec
copying av/codec/init.py -> build/lib.linux-aarch64-3.8/av/codec
creating build/lib.linux-aarch64-3.8/av/video
copying av/video/init.py -> build/lib.linux-aarch64-3.8/av/video
creating build/lib.linux-aarch64-3.8/av/sidedata
copying av/sidedata/init.py -> build/lib.linux-aarch64-3.8/av/sidedata
creating build/lib.linux-aarch64-3.8/av/subtitles
copying av/subtitles/init.py -> build/lib.linux-aarch64-3.8/av/subtitles
running build_ext
running config
PyAV: 8.0.3 (unknown commit)
Python: 3.8.5 (default, Jan 27 2021, 15:41:15) \n[GCC 9.3.0]
platform: Linux-5.4.0-1035-raspi-aarch64-with-glibc2.29
extension_extra:
include_dirs: [b'include']
libraries: []
library_dirs: []
define_macros: []
runtime_library_dirs: []
config_macros:
PYAV_COMMIT_STR="unknown-commit"
PYAV_VERSION=8.0.3
PYAV_VERSION_STR="8.0.3"
Could not find libavformat with pkg-config.
Could not find libavcodec with pkg-config.
Could not find libavdevice with pkg-config.
Could not find libavutil with pkg-config.
Could not find libavfilter with pkg-config.
Could not find libswscale with pkg-config.
Could not find libswresample with pkg-config.

ERROR: Failed building wheel for av

์˜ค๋ฅ˜ ๊ด€๋ จ ์งˆ๋ฌธ

python 3.8.5, ์ƒ˜ํ”Œ์ฝ”๋“œ๋กœ ์‹คํ–‰ํ•ด ๋ณด์•˜์Šต๋‹ˆ๋‹ค. (!join ๋ช…๋ น์–ด)
discord.py 1.5.1, discodo 2.3.9์ž…๋‹ˆ๋‹ค.

Ignoring exception in command join:
Traceback (most recent call last):
  File "C:\Users\user\AppData\Local\Programs\Python\Python38-32\lib\site-packages\discord\ext\commands\core.py", line 85, in wrapped
    ret = await coro(*args, **kwargs)
  File "E:\Happytree Samsung\Discord File\Team HT\Shrimp\Cogs\music2.py", line 18, in _join
    await self.bot.ws.voice_state(ctx.guild.id, ctx.author.voice.channel.id)
AttributeError: 'NoneType' object has no attribute 'voice_state'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "C:\Users\user\AppData\Local\Programs\Python\Python38-32\lib\site-packages\discord\ext\commands\bot.py", line 902, in invoke
    await ctx.command.invoke(ctx)
  File "C:\Users\user\AppData\Local\Programs\Python\Python38-32\lib\site-packages\discord\ext\commands\core.py", line 864, in invoke
    await injected(*ctx.args, **ctx.kwargs)
  File "C:\Users\user\AppData\Local\Programs\Python\Python38-32\lib\site-packages\discord\ext\commands\core.py", line 94, in wrapped
    raise CommandInvokeError(exc) from exc
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: AttributeError: 'NoneType' object has no attribute 'voice_state'

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.