Giter Site home page Giter Site logo

Comments (10)

Daylily-Zeleen avatar Daylily-Zeleen commented on August 21, 2024 1

@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.

from gdscript-formatter.

Daylily-Zeleen avatar Daylily-Zeleen commented on August 21, 2024

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.

from gdscript-formatter.

lethefrost avatar lethefrost commented on August 21, 2024

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.

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.

from gdscript-formatter.

Daylily-Zeleen avatar Daylily-Zeleen commented on August 21, 2024

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:

  1. gdformat is required for formatting.
  2. pip is required for installing/updating gdformat.

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).

from gdscript-formatter.

lethefrost avatar lethefrost commented on August 21, 2024

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).

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?

from gdscript-formatter.

Daylily-Zeleen avatar Daylily-Zeleen commented on August 21, 2024

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.

from gdscript-formatter.

Daylily-Zeleen avatar Daylily-Zeleen commented on August 21, 2024

@lethefrost If the issue is solved, please close this issue.

from gdscript-formatter.

lethefrost avatar lethefrost commented on August 21, 2024

@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.

from gdscript-formatter.

Daylily-Zeleen avatar Daylily-Zeleen commented on August 21, 2024

The latest version in AssetLib is waiting for revision.

from gdscript-formatter.

michaelwschultz avatar michaelwschultz commented on August 21, 2024

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 

from gdscript-formatter.

Related Issues (4)

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.