Can't load audio cog on Linux #5314

Closed
opened 2021-09-13 05:48:29 +02:00 by turtlenator0316 · 9 comments
turtlenator0316 commented 2021-09-13 05:48:29 +02:00 (Migrated from github.com)

What Red version are you using?

3.4.13

Cog name

Audio

Command name

load

What did you expect to happen?

I tried to load the cog on a fresh install of Red on Raspbian

What actually happened?

I get through the install process of Red just fine. Start it up, add it to server, and then do --load audio and get the following error:

Sep 13 04:42:12 octopi python[1244]: Loaded 2 cogs with 38 commands
Sep 13 04:42:12 octopi python[1244]: Invite URL:
Sep 13 04:42:12 octopi python[1244]: https://discord.com/[redacted]
Sep 13 04:46:39 octopi python[1244]: [2021-09-13 04:46:39] [ERROR] red: Package import failed
Sep 13 04:46:39 octopi python[1244]: Traceback (most recent call last):
Sep 13 04:46:39 octopi python[1244]: File "/home/pi/redenv/lib/python3.9/site-packages/redbot/core/core_commands.py", line 160, in _load
Sep 13 04:46:39 octopi python[1244]: spec = await bot._cog_mgr.find_cog(name)
Sep 13 04:46:39 octopi python[1244]: File "/home/pi/redenv/lib/python3.9/site-packages/redbot/core/cog_manager.py", line 288, in find_cog
Sep 13 04:46:39 octopi python[1244]: return await self._find_core_cog(name)
Sep 13 04:46:39 octopi python[1244]: File "/home/pi/redenv/lib/python3.9/site-packages/redbot/core/cog_manager.py", line 256, in _find_core_cog
Sep 13 04:46:39 octopi python[1244]: mod = import_module(real_name, package=package)
Sep 13 04:46:39 octopi python[1244]: File "/home/pi/.pyenv/versions/3.9.7/lib/python3.9/importlib/init.py", line 127, in import_module
Sep 13 04:46:39 octopi python[1244]: return _bootstrap._gcd_import(name[level:], package, level)
Sep 13 04:46:39 octopi python[1244]: File "", line 1030, in _gcd_import
Sep 13 04:46:39 octopi python[1244]: File "", line 1007, in _find_and_load
Sep 13 04:46:39 octopi python[1244]: File "", line 986, in _find_and_load_unlocked
Sep 13 04:46:39 octopi python[1244]: File "", line 680, in _load_unlocked
Sep 13 04:46:39 octopi python[1244]: File "", line 850, in exec_module
Sep 13 04:46:39 octopi python[1244]: File "", line 228, in _call_with_frames_removed
Sep 13 04:46:39 octopi python[1244]: File "/home/pi/redenv/lib/python3.9/site-packages/redbot/cogs/audio/init.py", line 3, in
Sep 13 04:46:39 octopi python[1244]: from .core import Audio
Sep 13 04:46:39 octopi python[1244]: File "/home/pi/redenv/lib/python3.9/site-packages/redbot/cogs/audio/core/init.py", line 19, in
Sep 13 04:46:39 octopi python[1244]: from . import abc, cog_utils, commands, events, tasks, utilities
Sep 13 04:46:39 octopi python[1244]: File "/home/pi/redenv/lib/python3.9/site-packages/redbot/cogs/audio/core/abc.py", line 18, in
Sep 13 04:46:39 octopi python[1244]: from redbot.core.utils.dbtools import APSWConnectionWrapper
Sep 13 04:46:39 octopi python[1244]: File "/home/pi/redenv/lib/python3.9/site-packages/redbot/core/utils/dbtools.py", line 7, in
Sep 13 04:46:39 octopi python[1244]: import apsw
Sep 13 04:46:39 octopi python[1244]: ImportError: libicui18n.so.67: cannot open shared object file: No such file or directory

How can we reproduce this error?

  1. Install Red
  2. Add to discord server
  3. Run load audio command
    ...

Anything else?

I've looked around on google for results but nothing seems to match or solve the problem. Any help is appreciated. Thanks.

### What Red version are you using? 3.4.13 ### Cog name Audio ### Command name load ### What did you expect to happen? I tried to load the cog on a fresh install of Red on Raspbian ### What actually happened? I get through the install process of Red just fine. Start it up, add it to server, and then do --load audio and get the following error: Sep 13 04:42:12 octopi python[1244]: Loaded 2 cogs with 38 commands Sep 13 04:42:12 octopi python[1244]: Invite URL: Sep 13 04:42:12 octopi python[1244]: https://discord.com/[redacted] Sep 13 04:46:39 octopi python[1244]: [2021-09-13 04:46:39] [ERROR] red: Package import failed Sep 13 04:46:39 octopi python[1244]: Traceback (most recent call last): Sep 13 04:46:39 octopi python[1244]: File "/home/pi/redenv/lib/python3.9/site-packages/redbot/core/core_commands.py", line 160, in _load Sep 13 04:46:39 octopi python[1244]: spec = await bot._cog_mgr.find_cog(name) Sep 13 04:46:39 octopi python[1244]: File "/home/pi/redenv/lib/python3.9/site-packages/redbot/core/cog_manager.py", line 288, in find_cog Sep 13 04:46:39 octopi python[1244]: return await self._find_core_cog(name) Sep 13 04:46:39 octopi python[1244]: File "/home/pi/redenv/lib/python3.9/site-packages/redbot/core/cog_manager.py", line 256, in _find_core_cog Sep 13 04:46:39 octopi python[1244]: mod = import_module(real_name, package=package) Sep 13 04:46:39 octopi python[1244]: File "/home/pi/.pyenv/versions/3.9.7/lib/python3.9/importlib/__init__.py", line 127, in import_module Sep 13 04:46:39 octopi python[1244]: return _bootstrap._gcd_import(name[level:], package, level) Sep 13 04:46:39 octopi python[1244]: File "<frozen importlib._bootstrap>", line 1030, in _gcd_import Sep 13 04:46:39 octopi python[1244]: File "<frozen importlib._bootstrap>", line 1007, in _find_and_load Sep 13 04:46:39 octopi python[1244]: File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked Sep 13 04:46:39 octopi python[1244]: File "<frozen importlib._bootstrap>", line 680, in _load_unlocked Sep 13 04:46:39 octopi python[1244]: File "<frozen importlib._bootstrap_external>", line 850, in exec_module Sep 13 04:46:39 octopi python[1244]: File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed Sep 13 04:46:39 octopi python[1244]: File "/home/pi/redenv/lib/python3.9/site-packages/redbot/cogs/audio/__init__.py", line 3, in <module> Sep 13 04:46:39 octopi python[1244]: from .core import Audio Sep 13 04:46:39 octopi python[1244]: File "/home/pi/redenv/lib/python3.9/site-packages/redbot/cogs/audio/core/__init__.py", line 19, in <module> Sep 13 04:46:39 octopi python[1244]: from . import abc, cog_utils, commands, events, tasks, utilities Sep 13 04:46:39 octopi python[1244]: File "/home/pi/redenv/lib/python3.9/site-packages/redbot/cogs/audio/core/abc.py", line 18, in <module> Sep 13 04:46:39 octopi python[1244]: from redbot.core.utils.dbtools import APSWConnectionWrapper Sep 13 04:46:39 octopi python[1244]: File "/home/pi/redenv/lib/python3.9/site-packages/redbot/core/utils/dbtools.py", line 7, in <module> Sep 13 04:46:39 octopi python[1244]: import apsw Sep 13 04:46:39 octopi python[1244]: ImportError: libicui18n.so.67: cannot open shared object file: No such file or directory ### How can we reproduce this error? 1. Install Red 2. Add to discord server 3. Run load audio command ... ### Anything else? I've looked around on google for results but nothing seems to match or solve the problem. Any help is appreciated. Thanks.
benno1237 commented 2021-09-13 06:43:22 +02:00 (Migrated from github.com)

I would highly recommend you to update your bot before doing any other troubleshooting. 3.4.5 is really oudated.

I would highly recommend you to update your bot before doing any other troubleshooting. 3.4.5 is really oudated.
turtlenator0316 commented 2021-09-13 15:49:39 +02:00 (Migrated from github.com)

I would highly recommend you to update your bot before doing any other troubleshooting. 3.4.5 is really oudated.

Sorry, I put 3.4.5 because that's what the template showed and I thought it was the latest. I just downloaded Red yesterday, so it should be on whatever the latest version is

> I would highly recommend you to update your bot before doing any other troubleshooting. 3.4.5 is really oudated. Sorry, I put 3.4.5 because that's what the template showed and I thought it was the latest. I just downloaded Red yesterday, so it should be on whatever the latest version is
yamikaitou commented 2021-09-13 16:31:20 +02:00 (Migrated from github.com)

Please join us on Discord at discord.gg/red so we can assist in troubleshooting your issue

Please join us on Discord at discord.gg/red so we can assist in troubleshooting your issue
yamikaitou commented 2021-09-13 17:07:16 +02:00 (Migrated from github.com)

After some troubleshooting on Discord, it looks like Debian Buster (and Raspberry Pi OS by association) doesn't have version 67 of libicu in the repos, only Bullseye (11) does.

After some troubleshooting on Discord, it looks like Debian Buster (and Raspberry Pi OS by association) doesn't have version 67 of libicu in the repos, only Bullseye (11) does.
turtlenator0316 commented 2021-09-13 18:55:05 +02:00 (Migrated from github.com)

After some troubleshooting on Discord, it looks like Debian Buster (and Raspberry Pi OS by association) doesn't have version 67 of libicu in the repos, only Bullseye (11) does.

What can I do to amend this without installing a new OS? (Sorry, not super versed with Linux. If you have a command that I can just paste to install it, that would be greatly appreciated)

> After some troubleshooting on Discord, it looks like Debian Buster (and Raspberry Pi OS by association) doesn't have version 67 of libicu in the repos, only Bullseye (11) does. What can I do to amend this without installing a new OS? (Sorry, not super versed with Linux. If you have a command that I can just paste to install it, that would be greatly appreciated)
yamikaitou commented 2021-09-14 00:00:57 +02:00 (Migrated from github.com)

So I've managed to trace/confirm the issue to Raspberry Pi OS and Python 3.9 (Python 3.8 works fine and both 3.8 and 3.9 work on a Debian install (non-arm)). Someone else can continue to troubleshoot this with hopes to find a real solution as I've run out of time today.

A temporary workaround is to use Python 3.8 instead (use the following 2 commands to install 3.8, then follow the rest of the guide for the rest)

CONFIGURE_OPTS=--enable-optimizations pyenv install 3.8.12 -v
pyenv global 3.8.12
So I've managed to trace/confirm the issue to Raspberry Pi OS and Python 3.9 (Python 3.8 works fine and both 3.8 and 3.9 work on a Debian install (non-arm)). Someone else can continue to troubleshoot this with hopes to find a real solution as I've run out of time today. A temporary workaround is to use Python 3.8 instead (use the following 2 commands to install 3.8, then follow the rest of the guide for the rest) ``` CONFIGURE_OPTS=--enable-optimizations pyenv install 3.8.12 -v pyenv global 3.8.12 ```
turtlenator0316 commented 2021-09-14 00:49:02 +02:00 (Migrated from github.com)

Ok, I'll let my Pi download/install it over dinner and will get back with a result asap. Thank you for the help!

Ok, I'll let my Pi download/install it over dinner and will get back with a result asap. Thank you for the help!
turtlenator0316 commented 2021-09-14 03:30:33 +02:00 (Migrated from github.com)

Ok, I deleted Red's files to start over. Did 3.8.12. Now I'm getting this:

(redenv) pi@octopi:~ $ redbot-setup -bash: /home/pi/redenv/bin/redbot-setup: /home/pi/redenv/bin/python: bad interpreter: No such file or directory

Ok, I deleted Red's files to start over. Did 3.8.12. Now I'm getting this: `(redenv) pi@octopi:~ $ redbot-setup -bash: /home/pi/redenv/bin/redbot-setup: /home/pi/redenv/bin/python: bad interpreter: No such file or directory`
turtlenator0316 commented 2021-09-15 05:40:49 +02:00 (Migrated from github.com)

Deleted the wrong folder. Deleting the correct folder and then reinstalling with Python 3.8 instead of 3.9 worked nicely. Side note if this gets put in documentation: users need to use command 'python3.8' instead of 'python3.9' like in tutorial.

Deleted the wrong folder. Deleting the correct folder and then reinstalling with Python 3.8 instead of 3.9 worked nicely. Side note if this gets put in documentation: users need to use command 'python3.8' instead of 'python3.9' like in tutorial.
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#5314
No description provided.