New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cog packages starting with a strict prefix of redbot
crash the drivers on load
#4956
Comments
Red is a protected namespace, I wouldnt say this is an issue at all. |
This issue is not limited to "red", a cog named "r" would also cause this. Also, "red" is not a protected namespace, all people shouldn't (currently) do is name their cogs with anything that is an existing module. "red" (and "r" :)) is not an existing module so it should be working fine but it currently doesn't. I made a fix for this for 3.4.x series (3.5 will change our import logic and hopefully resolve more weird issues with it). I would appreciate it if you could test it @Kreusada. |
Yee, at the time I thought it was just |
Just to note, using |
Yes, I was aware of this and it wouldn't be smart to name a cog as |
redbot
crash the drivers on load
redbot
crash the drivers on loadredbot
crash the drivers on load
redbot
crash the drivers on loadredbot
crash the drivers on load
redbot
crash the drivers on loadredbot
crash the drivers on load
What Red version are you using?
3.4.9 / 3.4.10.dev1
Cog name
CogManagerUI
Command name
load
What did you expect to happen?
For a private cog package to be loaded, named 'red'.
What actually happened?
The package failed to load, with the traceback provided below:
This occured on the following bots:
Bot 1:
Version: 3.4.10.dev1
Py version: 3.8.5
Dpy version: 1.7.0
Storage type: JSON
System arch: aarch64
OS: Linux
Bot 2:
Version: 3.4.9
Py version: 3.8.5
Dpy version: 1.7.1
Storage type: JSON
System arch: AMD64
OS: Windows
I haven't looked into the side-effects of this, but it could be damaging to the backend. Perhaps a simple fix for this would be to check if the cog is named 'red' when loading, and return if it is - im happy to PR something for that. Obviously, a sensible workaround would be to just rename the package, but I still believe this should be handled.
Edit: This red cog does not use config. It doesn't matter whether they use config or not.
How can we reproduce this error?
[p]ping
command will still function, because it does not use config.[p]info
uses config to set custominfo, so this errors, same with help, or any customizable command.The text was updated successfully, but these errors were encountered: