rakugoteam/Rakugo-Dialogue-System

Couldn't fully load the Singleton script "Rakugo"

Sandvich opened this issue · 10 comments

Hi,

I'm trying to use Rakugo in a jam game, but I'm getting this error when I enable it as a plugin. The project is mostly empty other than that, a few assets and one script that imports Rakugo (below). I've done a bit of searching online and it seems that this is because lib/systems/Executor.gd calls the module by name, meaning that it's a cyclic reference. However, I'm not sure how to resolve this.

My Godot version is v3.5.1.stable.official [6fed1ffa3], via Steam, on Linux.

My script is almost identical to the example, as follows:

extends Node2D

const default_script = "res://scripts/default.rk"

# Called when the node enters the scene tree for the first time.
func _ready():
	Rakugo.connect("say", self, "_on_say")
	Rakugo.connect("step", self, "_on_step")
	
	Rakugo.parse_and_execute_script(default_script)

func _on_say(character:Dictionary, text:String):
	prints("say", character.get("name", ""), text)
  
func _on_step():
	prints("Press 'Enter' to continue...")
  
func _process(delta):
	if Rakugo.is_waiting_step() and Input.is_action_just_pressed("ui_accept"):
		Rakugo.do_step()

I don't know why, but github just now give show me your message in my notifactions, normaly it is instant.
So about your problem I'm afriad it has something to do with this version of Godot.
I myself had an identical problem with another script not long ago, after I put Linux fresh, and installed Godot,
after a few days earlier on a mega similar system there were no problems with this script.

And @theludovyc always lets Rakugo through a series of tests using GUT before he push commits with those changes.
I search on this topic, maybe I will find a solution.

I found out that this is bug in godot it self: godotengine/godot#21461
So the only thing I can recomend is try to crate project project with Rakugo.
If I find other solucion I will write it here @Sandvich

Hello @Sandvich and @Jeremi360 :) !

@Sandvich I am happy to know you want to use rakugo !
Did you remember how do you install it ?
It is :
Copy folder then launch Godot or
You have already Godot launched on your project and copy folder then enable the plugin ?

Hey, thanks to both of you for your responses.

I initially tried to install it as a submodule, but because of the tree not being what Godot expected, I had to go with the zip approach.

I'm fairly sure godot was open when I copied the folder in, as I was trying to get the submodule working first. I could disable, restart godot, then re-enable?

Hey, thanks to both of you for your responses.

I initially tried to install it as a submodule, but because of the tree not being what Godot expected, I had to go with the zip approach.

I'm fairly sure godot was open when I copied the folder in, as I was trying to get the submodule working first. I could disable, restart godot, then re-enable?

So I'm not sure what you mean by submodule, as in godot modules most often they refer to engine modules in C ++, which you have to compile into the engine yourself.
But you didn't do it because you have Godot from steam, which means you probably mean git submoduly ?
Yes, unfortunately this cannot be used in the case of godot, because it expects a specific structure and in most cases uses paths without relative, therefore any file move should be performed in its File System dock.
It's best for you to download zip and then have the * Rakugo * folder in the * addons * folder.
I honestly never installed Rakugo so much that I dumped him while the project was open.
Also only, reopening the project and including Rakugo again can work.

@Sandvich did you refer to the installation guide on Readme page ? https://github.com/rakugoteam/Rakugo#installation

@Jeremi360 Yes, sorry, that was unclear. I generally try to load external libraries as git submodules, because that way I can sync the exact versions of the library to my code.
Once I realised that it needed to be in a different folder structure, I downloaded the release and copied it over manually. A little bit annoying to do it that way, but oh well.

Could well be the restarting Godot thing - I'll give that a try when I get back to my personal laptop.

@theludovyc I did, but I derped and forgot to restart Godot. I'll let you both know when I get the opportunity to test it :)

I waiting your answer :) !

Yeah Godot is sometimes capricious... I have become used to restart it often to avoid problems ^^'

sigh
That fixed it. Frustrating that such a simple thing was the issue, but at least that means that this isn't a Rakugo problem. Thanks for your help!

sigh
That fixed it. Frustrating that such a simple thing was the issue, but at least that means that this isn't a Rakugo problem. Thanks for your help!

I'm happy to hear that 😄

@Sandvich with pleasure :) !