(V3) Audio cog doesnt load #2033

Closed
opened 2018-08-20 04:05:20 +02:00 by TheFallenAngel2001 · 9 comments
TheFallenAngel2001 commented 2018-08-20 04:05:20 +02:00 (Migrated from github.com)

Other bugs

What were you trying to do?

I was normally, like everyone does, trying to load audio cog.

What were you expecting to happen?

I was expecting it to load normally and to be usable.

What actually happened?

It failed to load, throwing in the terminal this:

[20/08/2018 02:50] ERROR core_commands _load 89: Package loading failed
Traceback (most recent call last):
  File "/home/ruben/.local/lib/python3.6/site-packages/redbot/core/core_commands.py", line 87, in _load
    await bot.load_extension(spec)
  File "/home/ruben/.local/lib/python3.6/site-packages/redbot/core/bot.py", line 226, in load_extension
    await lib.setup(self)
  File "/home/ruben/Downloads/Red-DiscordBot-3-develop/redbot/cogs/audio/__init__.py", line 53, in setup
    await start_lavalink_server(bot.loop)
  File "/home/ruben/Downloads/Red-DiscordBot-3-develop/redbot/cogs/audio/manager.py", line 68, in start_lavalink_server
    java_available, java_version = await has_java(loop)
  File "/home/ruben/Downloads/Red-DiscordBot-3-develop/redbot/cogs/audio/manager.py", line 47, in has_java
    version = await get_java_version(loop)
  File "/home/ruben/Downloads/Red-DiscordBot-3-develop/redbot/cogs/audio/manager.py", line 63, in get_java_version
    major, minor = version_string.split(".")[:2]
ValueError: not enough values to unpack (expected 2, got 1)
Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x7f8b24284ef0>

How can we reproduce this issue?

Im not sure, as i only installed like in the guide on arch linux, and it failed to load the cog right after the 1st startup, and i had java installed
Version below v
[ruben@arch redbot]$ java -showversion
Picked up _JAVA_OPTIONS:
java version "1.8.0_181"
Java(TM) SE Runtime Environment (build 1.8.0_181-b13)

Edit: I was using python 3.6.6 from the aur, as the python that was in the repos was already python 3.7

# Other bugs <!-- Did you find a bug with something other than a command? Fill out the following: --> #### What were you trying to do? I was normally, like everyone does, trying to load audio cog. #### What were you expecting to happen? I was expecting it to load normally and to be usable. #### What actually happened? It failed to load, throwing in the terminal this: ```py [20/08/2018 02:50] ERROR core_commands _load 89: Package loading failed Traceback (most recent call last): File "/home/ruben/.local/lib/python3.6/site-packages/redbot/core/core_commands.py", line 87, in _load await bot.load_extension(spec) File "/home/ruben/.local/lib/python3.6/site-packages/redbot/core/bot.py", line 226, in load_extension await lib.setup(self) File "/home/ruben/Downloads/Red-DiscordBot-3-develop/redbot/cogs/audio/__init__.py", line 53, in setup await start_lavalink_server(bot.loop) File "/home/ruben/Downloads/Red-DiscordBot-3-develop/redbot/cogs/audio/manager.py", line 68, in start_lavalink_server java_available, java_version = await has_java(loop) File "/home/ruben/Downloads/Red-DiscordBot-3-develop/redbot/cogs/audio/manager.py", line 47, in has_java version = await get_java_version(loop) File "/home/ruben/Downloads/Red-DiscordBot-3-develop/redbot/cogs/audio/manager.py", line 63, in get_java_version major, minor = version_string.split(".")[:2] ValueError: not enough values to unpack (expected 2, got 1) Unclosed client session client_session: <aiohttp.client.ClientSession object at 0x7f8b24284ef0> ``` #### How can we reproduce this issue? Im not sure, as i only installed like in the guide on arch linux, and it failed to load the cog right after the 1st startup, and i had java installed Version below v [ruben@arch redbot]$ java -showversion Picked up _JAVA_OPTIONS: java version "1.8.0_181" Java(TM) SE Runtime Environment (build 1.8.0_181-b13) Edit: I was using python 3.6.6 from the aur, as the python that was in the repos was already python 3.7
Tobotimus commented 2018-08-20 04:11:56 +02:00 (Migrated from github.com)

@TheFallenAngel2001 Hi, thanks for reporting this issue. Could you please provide the output of pip freeze?

@TheFallenAngel2001 Hi, thanks for reporting this issue. Could you please provide the output of `pip freeze`?
TheFallenAngel2001 commented 2018-08-20 04:13:11 +02:00 (Migrated from github.com)

[ruben@arch redbot]$ pip freeze
appdirs==1.4.3
async-timeout==3.0.0
attrs==18.1.0
btrfsutil==1.0.0
CacheControl==0.12.5
chardet==3.0.4
colorama==0.3.9
discord.py==1.0.0a0
distlib==0.2.7
distro==1.3.0
evdev==1.0.0
fuzzywuzzy==0.16.0
html5lib==1.0.1
idna==2.7
idna-ssl==1.1.0
isc==2.0
lockfile==0.12.2
lutris==0.4.18.1
msgpack==0.5.6
multidict==4.3.1
numpy==1.15.0
packaging==17.1
progress==1.4
pycairo==1.17.0
pygobject==3.28.3
pyparsing==2.2.0
python-Levenshtein==0.12.0
python-libtorrent==1.1.9
pytoml==0.1.16
PyYAML==3.13
raven==6.9.0
raven-aiohttp==0.7.0
Red-Lavalink==0.1.1
Red-Trivia==1.1.1
requests==2.19.1
retrying==1.3.3
scapy===git-archive.devae348f861
six==1.11.0
team==1.0
urllib3==1.23
webencodings==0.5.1
websockets==6.0
yarl==1.2.6
youtube-dl==2018.8.4

[ruben@arch redbot]$ pip freeze appdirs==1.4.3 async-timeout==3.0.0 attrs==18.1.0 btrfsutil==1.0.0 CacheControl==0.12.5 chardet==3.0.4 colorama==0.3.9 discord.py==1.0.0a0 distlib==0.2.7 distro==1.3.0 evdev==1.0.0 fuzzywuzzy==0.16.0 html5lib==1.0.1 idna==2.7 idna-ssl==1.1.0 isc==2.0 lockfile==0.12.2 lutris==0.4.18.1 msgpack==0.5.6 multidict==4.3.1 numpy==1.15.0 packaging==17.1 progress==1.4 pycairo==1.17.0 pygobject==3.28.3 pyparsing==2.2.0 python-Levenshtein==0.12.0 python-libtorrent==1.1.9 pytoml==0.1.16 PyYAML==3.13 raven==6.9.0 raven-aiohttp==0.7.0 Red-Lavalink==0.1.1 Red-Trivia==1.1.1 requests==2.19.1 retrying==1.3.3 scapy===git-archive.devae348f861 six==1.11.0 team==1.0 urllib3==1.23 webencodings==0.5.1 websockets==6.0 yarl==1.2.6 youtube-dl==2018.8.4
TheFallenAngel2001 commented 2018-08-20 04:18:37 +02:00 (Migrated from github.com)

[ruben@arch redbot]$ python3.6 -m pip freeze
aiohttp==3.3.2
aiohttp-json-rpc==0.11
appdirs==1.4.3
async-timeout==3.0.0
attrs==18.1.0
chardet==3.0.4
colorama==0.3.9
discord.py==1.0.0a0
distro==1.3.0
fuzzywuzzy==0.16.0
idna==2.7
idna-ssl==1.1.0
multidict==4.3.1
python-Levenshtein==0.12.0
PyYAML==3.13
raven==6.9.0
raven-aiohttp==0.7.0
Red-DiscordBot==3.0.0b19
Red-Lavalink==0.1.1
Red-Trivia==1.1.1
websockets==6.0
yarl==1.2.6

Sry wrong command, that one was from python 3.7

[ruben@arch redbot]$ python3.6 -m pip freeze aiohttp==3.3.2 aiohttp-json-rpc==0.11 appdirs==1.4.3 async-timeout==3.0.0 attrs==18.1.0 chardet==3.0.4 colorama==0.3.9 discord.py==1.0.0a0 distro==1.3.0 fuzzywuzzy==0.16.0 idna==2.7 idna-ssl==1.1.0 multidict==4.3.1 python-Levenshtein==0.12.0 PyYAML==3.13 raven==6.9.0 raven-aiohttp==0.7.0 Red-DiscordBot==3.0.0b19 Red-Lavalink==0.1.1 Red-Trivia==1.1.1 websockets==6.0 yarl==1.2.6 Sry wrong command, that one was from python 3.7
Tobotimus commented 2018-08-20 04:24:26 +02:00 (Migrated from github.com)

That's all good, thanks for the quick reply. I think I can see the issue, it's to do with how we're expecting java -version to display, that first line Picked up by _JAVA_OPTIONS: is unexpected. I'll try open a PR today to fix this.

That's all good, thanks for the quick reply. I think I can see the issue, it's to do with how we're expecting `java -version` to display, that first line `Picked up by _JAVA_OPTIONS:` is unexpected. I'll try open a PR today to fix this.
Tobotimus commented 2018-08-20 08:04:14 +02:00 (Migrated from github.com)

@TheFallenAngel2001 Could you try for me, on your machine, run the following command and restart the bot? Then try loading audio.

pip3 install --upgrade --process-dependency-links --no-cache-dir --force-reinstall https://github.com/Tobotimus/Red-DiscordBot/tarball/V3/bugfix/2033#egg=Red-DiscordBot[voice]

If you have 3rd party cogs loaded, it'll likely cause them to fail for now after installing the above version, but you can roll back to Beta 19 with the following command, and your cogs will work again:

pip3 install --upgrade --process-dependency-links --no-cache-dir --force-reinstall Red-DiscordBot[voice]==3.0.0b19
@TheFallenAngel2001 Could you try for me, on your machine, run the following command and restart the bot? Then try loading audio. ``` pip3 install --upgrade --process-dependency-links --no-cache-dir --force-reinstall https://github.com/Tobotimus/Red-DiscordBot/tarball/V3/bugfix/2033#egg=Red-DiscordBot[voice] ``` If you have 3rd party cogs loaded, it'll likely cause them to fail for now after installing the above version, but you can roll back to Beta 19 with the following command, and your cogs will work again: ``` pip3 install --upgrade --process-dependency-links --no-cache-dir --force-reinstall Red-DiscordBot[voice]==3.0.0b19 ```
TheFallenAngel2001 commented 2018-08-20 18:03:27 +02:00 (Migrated from github.com)

2018-08-20_17-02
Worked right away after the change

![2018-08-20_17-02](https://user-images.githubusercontent.com/37851870/44351921-dd542c00-a49a-11e8-8d02-823713370b56.png) Worked right away after the change
TheFallenAngel2001 commented 2018-08-20 18:05:38 +02:00 (Migrated from github.com)

2018-08-20_17-04
And did load perfectly

![2018-08-20_17-04](https://user-images.githubusercontent.com/37851870/44352050-3623c480-a49b-11e8-93d1-bfa58a817874.png) And did load perfectly
TheFallenAngel2001 commented 2018-08-20 19:56:36 +02:00 (Migrated from github.com)

Oh, and cogs do work, at least the ones i installed

Oh, and cogs do work, at least the ones i installed
Tobotimus commented 2018-08-26 15:49:52 +02:00 (Migrated from github.com)

Thanks for reporting this issue @TheFallenAngel2001 ❤️

Resolved by #2035.

Thanks for reporting this issue @TheFallenAngel2001 :heart: Resolved by #2035.
Sign in to join this conversation.
No labels
Automated PR
Blocked
Blocked By: Damage Control
Blocked By: Dependency
Blocked By: Other PR
Breaking Change
Category: CI
Category: Cogs - Admin
Category: Cogs - Alias
Category: Cogs - Audio
Category: Cogs - Bank
Category: Cogs - Cleanup
Category: Cogs - CustomCommands
Category: Cogs - Dev
Category: Cogs - Downloader
Category: Cogs - Economy
Category: Cogs - Filter
Category: Cogs - General
Category: Cogs - Image
Category: Cogs - Mod
Category: Cogs - Modlog
Category: Cogs - Mutes
Category: Cogs - Permissions
Category: Cogs - Reports
Category: Cogs - Streams
Category: Cogs - Trivia
Category: Cogs - Trivia - Lists
Category: Cogs - Warnings
Category: Core - API - App Commands Package
Category: Core - API - Audio
Category: Core - API - Bank
Category: Core - API - Commands Package
Category: Core - API - Config
Category: Core - API - Other
Category: Core - API - Utils Package
Category: Core - Bot Class
Category: Core - Bot Commands
Category: Core - Command-line Interfaces
Category: Core - Downloader
Category: Core - Help
Category: Core - i18n
Category: Core - Modlog
Category: Core - Other Internals
Category: Core - RPC/ZMQ
Category: Docker
Category: Docs - Changelogs
Category: Docs - For Developers
Category: Docs - Install Guides
Category: Docs - Other
Category: Docs - User Guides
Category: Meta
Category: RPC/ZMQ methods
Category: Vendored Packages
Changelog Entry: Added
Changelog Entry: Pending
Changelog Entry: Skipped
Closed: Duplicate
Closed: External
Closed: Invalid
Closed: User Error
Closed: Won't Fix
Complex Issue
Docs-only
Feature Branch
Good First Issue
Help Wanted
High Priority
Needs Backport To stable-docs
No Activity
No Repro
QA: Bypassed
QA: Changes Requested
QA: Passed
Release Blocker
Status: Accepted
Status: Frozen
Status: In Progress
Status: Needs Discussion
Status: Needs Info
Status: Needs Triage
Status: PRs Welcome
Type: Bug
Type: Dependency Update
Type: Deprecation
Type: Enhancement
Type: Feature
Type: Informational
Type: Merge
Type: Optimisation
Type: Question
Type: Removal
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
Mrcoolgamer11/Red-DiscordBot#2033
No description provided.