No commands registered
Closed this issue · 10 comments
Hi!
I am working on Godot 4.2.1 stable, and I downloaded your formatter plugin from the AssetLib (ver 0.0.4). After enabling it in the Project Settings > Plugins, there's no command as described in the README file showing up in the command palette nor in the menu Project > Tools. Moreover, when trying to disable the plugin, it prints this error message below:
The Command 'GDScript Formatter/Format GDScript' doesn't exists. Unable to remove it.
Are there any error/warning message when enabling this plugin?
If gdformat
or pip
command can't be found when enabling, it should print a warning messag.
To eliminate errors as soon as possible, please provide your operating system version and your godot version.
Are there any error/warning message when enabling this plugin?
If
gdformat
orpip
command can't be found when enabling, it should print a warning messag.To eliminate errors as soon as possible, please provide your operating system version and your godot version.
Thank you! I work on Godot 4.2.1 stable, and macOS Sonoma 14.3.1.
It prints this warning message: (maybe the [/color]
is mistakenly included?)
GDScript Formatter: the command "gdformat" can't be found in your envrionment.
Installs gdtoolkit is required "pip".
Please install it and ensure it can be found inyour envrionment.[/color]
I am not sure why this is showing when enabling the plugin. Shouldn't there be a command or menu item to control the installation/update of that package?
By the way, would it be possible to let the user specify which python/pip environment to use when there are multiple of them in the system? And I am not sure about how it executes the shell commands. I configured the PATH variable in zshrc, but not in bashrc. I'm not sure if that's related or could cause errors when trying to find pip.
I am not sure why this is showing when enabling the plugin. Shouldn't there be a command or menu item to control the installation/update of that package?
These commands' will be checked when enableing, but not all of them are required:
gdformat
is required for formatting.pip
is required for installing/updatinggdformat
.
pip
should install by youself, if you want this plugin to install pip
, it will required python
or any other dependency. In orther words, this plugin can't help you to setup enveriment.
By the way, would it be possible to let the user specify which python/pip environment to use when there are multiple of them in the system? And I am not sure about how it executes the shell commands. I configured the PATH variable in zshrc, but not in bashrc. I'm not sure if that's related or could cause errors when trying to find pip.
Sorry, I'm not familiar with macos.
However, I add two settings to config the actual gdformat
and pip
commands, if these command can't be found by default, try to change them (plaese download the latest version from Github).
Sorry, I'm not familiar with macos. However, I add two settings to config the actual
gdformat
andpip
commands, if these command can't be found by default, try to change them (plaese download the latest version from Github).
Thank you very much! Now I have 0.0.5, but it cannot be enabled anymore in the plugins setting and pops up
Unable to load addon script from path: 'res://addons/gdscript_formatter/gdscript_formatter.gd'. This might be due to a code error in that script.
Disabling the addon at 'res://addons/gdscript_formatter/plugin.cfg' to prevent further errors.
Do you know what's happening?
Unable to load addon script from path: 'res://addons/gdscript_formatter/gdscript_formatter.gd'. This might be due to a code error in that script.
Disabling the addon at 'res://addons/gdscript_formatter/plugin.cfg' to prevent further errors.Do you know what's happening?
Sorry, it's my fault. I use a new constant which not exists in Godot 4.2.
Now I fixed it, please download the latest from github page.
@lethefrost If the issue is solved, please close this issue.
@lethefrost If the issue is solved, please close this issue.
Hi, sorry that I've been quite busy these days and haven't yet found a time to test. I just downloaded from GitHub and at least it can enable now. But seems that the one in the AssetLib isn't up-to-date.
The latest version in AssetLib is waiting for revision.
Thanks for the incredible work @Daylily-Zeleen. My favorite addon by far!
I'm having this issue as well on MacOS. Works great on my PC with Windows.
-- Begin install gdtoolkit.
-- Install gdtoolkit successfully.
%sGDScript Formatter: The command "gdformat" can't be found in your envrionment.
%s If have not install "gdtoolkit", install it first.
%s If had installed "gdtoolkit", change "gdformat_command" to a valid command in "res://addons/gdscript_formatter/format_preference.tres", and save this resource.
I'm using pip3 as the pip command due to how MacOS installs pip. Doing this installs gdtoolkit just find and I can verfiy the gdformat
command works just fine in the terminal. But for some reason, your addon still can't see it.
Path looks good to me. Any other ideas?
~/Library/Python/3.9/bin/gdformat
@michaelwschultz, please refer to this comment.
I have not macOS device and not familiar with macOS. I'm not sure these steps can help you solve this problem.
By the way, in principle, do not reply to closed issues. Please open a new issue and link the closed one.