-
-
Notifications
You must be signed in to change notification settings - Fork 21.3k
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
Cannot instantiate File class to read CSV file #50831
Comments
CC @aaronfranke Haven't checked in depth yet but from the changes in #50511 to ClassDB, this part might have changed behavior: I think now we're always making a copy while before we were copying only when doing a validation. |
Tested, that doesn't impact this bug indeed. I'll add a fix for this anyway in #50809. |
Found it, it is here: godot/modules/gdscript/gdscript.cpp Lines 1647 to 1658 in 2a8a59e
More exactly this line: You can see than the n value is erased here Before it was, Very small change, I will prepare a PR |
Too bad, avoiding n to be erased is not enough... Got a new error
Didn't try yet with PR #50809. ------------------------ modules/gdscript/gdscript.cpp ------------------------
index 79cc90b92f..7015c1aa95 100644
@@ -1647,10 +1647,10 @@ void GDScriptLanguage::init() {
for (StringName &n : class_list) {
String s = String(n);
if (s.begins_with("_")) {
- n = s.substr(1, s.length());
+ s = s.substr(1, s.length());
}
- if (globals.has(n)) {
+ if (globals.has(s)) {
continue;
}
Ref<GDScriptNativeClass> nc = memnew(GDScriptNativeClass(n)); Worst case, I will have a look later today |
Ah found it, forgot to also change line: |
Godot version
4.0.dev (fb821b8)
System information
Linux
Issue description
When trying to open a CSV file using this code:
I get the following errors:
The CSV file is set at Do not import.
The issue started from a commit 2 or 3 days ago, but it is hard to bisect it since many scene file formats had some changes which make them incompatible with older versions of Godot.
Steps to reproduce
Open the reproduction project and launch it
Minimal reproduction project
FileInstantiate.zip
The text was updated successfully, but these errors were encountered: